Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML Audio/Video DOM seekable Property

HTML Audio/Video DOM seekable Property

HTML audio/video Tag Reference HTML Audio/Video DOM Reference

Example

Get the first seekable range (portion) of the video, in seconds:

myVid=document.getElementById("video1");

alert("Start: " + myVid.seekable.start(0)

Try it »


Definition and Usage

The seekable attribute returns a TimeRanges object.

The TimeRanges object represents the seekable range of the audio/video for the user.

The seekable range refers to the time range within the audio/video that the user can seek (move the playback position).

For non-streaming video, it is usually possible to seek to any position in the video, even if it has not finished buffering.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the seekable attribute.

**Note:** Internet Explorer 8 and earlier versions do not support this property.


Syntax

audio|video

.seekable

Return Value

Type Description
TimeRanges Object Represents the seekable portion 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 index of the first seekable range index is 0.

    |

    HTML audio/video Tag Reference HTML Audio/Video DOM Reference