Adaptive Streaming in Playing state while not really playing

Nov 23, 2011 at 1:07 AM

When playing an adaptive streaming video such as The player will indicate it is in the "Playing" state while there are no frames rendering in the player.

The Big Buck Bunny link above has proved quite problematic for me (perhaps my requests are being throttled or something), whereby quite often I am getting 404s on the chunk downloads resulting in the player entering a retrying loop and this "In a Playing state whilst not actually rendering anything" problem becomes very apparent.

When it receives a Media Failed event and enters the retrying loop, the player will go to an Opening state. As it manages to download a couple of chunks it will transition into a Playing state BEFORE it actually starts rendering the video frames on the screen and while it is still trying to retrieve the chunks necessary to begin playback. If it has trouble downloading the next few chunks that it needs it can get stuck in this retrying loop where it alternates between Opening and Playing states all the while never actually rendering any of the video.

This becomes problematic as I am trying to track the amount of time that the client actually spends watching the video playing (not necessarily tied to the Playback Position if the user is scrubbing through the video). I am currently counting the amount of time that the user spends in the Playing state, but with the playing state not appearing to actually represent the state whereby the player is rendering video frames it is quite inaccurate.


Does anyone know:

a) Why it is entering a Playing state without actually playing anything and if there's a fix for it?

b) A workaround to track the time that video is actually rendering on the screen?

Nov 23, 2011 at 1:16 AM

Seems I was able to get this test app in the source to do it, will post when I figure out the issue in my app.