HTML 오디오/비디오 DOM 버퍼링 속성

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

예시

비디오의 첫 번째 버퍼링된 범위(일부)를 초 단위로 가져옵니다.

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

정의 및 사용

buffered 속성은 TimeRanges 객체를 반환합니다.

TimeRanges 객체는 오디오/비디오의 사용자 버퍼링 범위를 나타냅니다.

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

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


브라우저 지원

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

Property
buffered Yes 9.0 4.0  Yes Yes

통사론

audio|video.buffered

반환 값

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

TimeRanges Object Properties:

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

Note: The first buffered range is index 0


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