Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
11-05-2012, 12:00 PM #1
- Join Date
- Oct 2012
- Thanked 0 Times in 0 Posts
I'm using youtube api to get to know when a video is fully buffered
when the fraction is 1, the video is fully buffered
but I have to poll this function to check whether it is 1 and then get the time
since a video could be tens of minutes
will this polling creates a heavy load on the browser/client and thus affect the video streaming? are there any other better polling methods or ways to detect when youtube finishes buffering?
BTW, the link for youtube api is:
11-05-2012, 06:45 PM #2
- Join Date
- Sep 2005
- Sydney, Australia
- Thanked 633 Times in 623 Posts
Instead of testing every millisecond why not test just a few times a second - make the 1 into 250 to test four times a second or 500 to test twice a second.
11-05-2012, 08:28 PM #3
there is the onStateChange event listener which "fires whenever the player's state changes" - if I understand correctly I'm guessing that you would be looking for 5 (video cued), which is fired once the buffering has finished and the video is ready to play.