HTML 5 Video Buffering a certain portion of a longer video


Use the TimeRanges object in HTML to set a series of non-overlapping ranges of time. You can also set the start and stop time.

The following are the properties −

  • length − Length of time ranges.
  • start(index) − start time, in seconds
  • end(index) − end time, in seconds

Here is the code snippet showing buffering −

// displays 12
myAudio.buffered.start(1);

// displays 20
myAudio.buffered.end(1);



Updated on: 25-Jun-2020

509 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements