HTML 오디오/비디오 DOM 재생 속성

❮ HTML 오디오/비디오 DOM 참조

예시

비디오의 첫 번째 재생 범위(일부)를 초 단위로 가져옵니다.

var vid = document.getElementById("myVideo");
alert("Start: " + vid.played.start(0) + " End: " + vid.played.end(0));

정의 및 사용

Played 속성은 TimeRanges 개체를 반환합니다.

TimeRanges 객체는 사용자가 이미 재생(본)한 오디오/비디오의 범위를 나타냅니다.

재생 범위는 재생된 오디오/비디오의 시간 범위입니다. 사용자가 오디오/비디오에서 건너뛰면 여러 재생 범위를 얻습니다.

참고: 이 속성은 읽기 전용입니다.


브라우저 지원

표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.

Property
played Yes 9.0 15.0 Yes Yes

통사론

audio|video.played

반환 값

Type Description
TimeRanges Object Represents the played parts of the audio/video.

TimeRanges Object Properties:

  • length - get the number of played ranges in the audio/video
  • start(index) - get the start position of a played range
  • end(index) - get the end position of a played range

Note: The first played range is index 0


❮ HTML 오디오/비디오 DOM 참조