These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:19 pm Advanced search

How can i determine if a video/audio loading is complete?

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

How can i determine if a video/audio loading is complete?

Postby fmvilas » Sat Aug 28, 2010 9:19 pm

Hi everybody!

I'm just trying to know how can i determine if a video/audio loading is complete. I red the HTML5 Draft but i did not find how.

Thanks!
_____________
Peace!
Fran
fmvilas
<h6>
 
Posts: 1
Joined: Sat Aug 28, 2010 9:14 pm
Location: Badajoz, Spain

Re: How can i determine if a video/audio loading is complete

Postby sean_dorman » Thu Jun 09, 2011 6:48 pm

Have you tried looking at when media.initialTime gets set? It will return a zero if the initial playback position is still unknown.
sean_dorman
<h6>
 
Posts: 4
Joined: Thu Jun 09, 2011 4:06 pm

Re: How can i determine if a video/audio loading is complete

Postby zcorpan » Thu Jun 09, 2011 8:15 pm

fmvilas wrote:Hi everybody!

I'm just trying to know how can i determine if a video/audio loading is complete. I red the HTML5 Draft but i did not find how.

It might never be complete. The browser may avoid downloading the entire media resource in order to not fill up all available memory, and may evict past media data from the cache (for the same reason).

There was at first a 'load' event for media elements, but it was removed for the above reasons.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Re: How can i determine if a video/audio loading is complete

Postby zcorpan » Thu Jun 09, 2011 8:16 pm

You can use the .buffered attribute to see which ranges of the media are buffered.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests