catch how much a video has already been uploaded (buffer)

Asked

Viewed 25 times

-1

How can I get the value of how much a video has already been loaded (buffer)? Example: Assuming I have a 5-minute video, then I agree that I will be watching it is being loaded, but how to get this load value?. I may be watching the video in part 2:30, but the video might already have been uploaded by 3:00 a.m., so in this case it has been uploaded an extra 30 seconds. I looked for some Javascript resource that does this, but could not find anything about buffer (I believe the name is the same).

1 answer

2

Hello Otavio all right?

I did some research on this and found some content on the site https://developer.mozilla.org/en-US/docs/Web/Guide/Audio_and_video_delivery/buffering_seeking_time_ranges

The content is in English but basically we have the buffered property that returns an object of type Timeranges that also contains other attributes.

Timeranges will let us know which parts of the media have been downloaded. This is usually contiguous, but if the user jumps while the media is storing in buffer, it may contain holes.

For more information, visit the source from which you extract this information:

Media buffer

Hugs!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.