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

HTML DOM Video seekable Property

Video seekable property

Video Object Reference The Video object

Example

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

var x = document.getElementById("myVideo");

document.getElementById("demo").innerHTML = "Start: " + x.seekable.start(0)

x The output result is:

Start: 0 End: 12.612

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 streaming video, the user can usually seek to any position in the video, even if it has not finished buffering.

Note: This attribute is read-only.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the seekable attribute.

**Note:** Internet Explorer 8 or earlier browsers do not support this property.


Syntax

videoObject

.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 is index 0.

    |

    Video Object Reference The Video object