HTMLオーディオ/ビデオDOMシーク可能プロパティ

❮HTMLオーディオ/ビデオDOMリファレンス

ビデオの最初のシーク可能な範囲(一部)を数秒で取得します。

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

定義と使用法

seekableプロパティは、TimeRangesオブジェクトを返します。

TimeRangesオブジェクトは、ユーザーを探すために使用できるオーディオ/ビデオの範囲を表します。

シーク可能な範囲は、ユーザーがシーク(再生位置を移動)できるオーディオ/ビデオの時間範囲です。

非ストリーミングビデオの場合、バッファリングされる前であっても、ビデオ内のどこかを探すことができる場合がよくあります。

注:このプロパティは読み取り専用です。


ブラウザのサポート

表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。

Property
seekable Yes 9.0 8.0 Yes Yes

構文

audio|video.seekable

戻り値

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

TimeRanges Object Properties:

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

Note: The first seekable range is index 0


❮HTMLオーディオ/ビデオDOMリファレンス