I have a YouTube player written in ActionScript 3. Recently it's been crashing when playing videos, not at the same point but generally around 1/4 of the way in.
I'm echoing the player state and any event changes to console which is listing it as state 1 while it's playing (this is expected behaviour) but then when it crashes it changes to '3' which is "buffering". From here however it never plays again and from what I can tell from my network window (Chrome developer tools) it's not loading any new information
Play Time: 83.421
Player state: 1
Player Loaded fraction: 0.48829904193497725
Play Time: 83.922
Player state: 1
Player Loaded fraction: 0.48829904193497725
State Change: 3
Play Time: 84.166
Player state: 3
Player Loaded fraction: 0.48829904193497725
Play Time: 84.166
Player state: 3
Player Loaded fraction: 0.48829904193497725
The Loaded fraction refers to this which seems to stop incrementing at around 75 seconds in the above case.
Our code is pretty much the example code from here with a few ExternalInterface.call('console.log', foo)
lines here and there.
First question:
Is this a common issue? I can't see much else about videos changing to a "buffering" state and not recovering. Do I need to run anything to resume play?
Second question:
If this is a bigger problem than just flash (network issues etc), what would be the best way to tell the client. I was thinking of checking if it was in a buffering state for more than X seconds and then displaying a message. Any better ideas?
Edit:
I've been trying to pinpoint the exact cause and try to find patterns in what happens. I've noticed this morning that (with the video I am testing) the stalls always happened around 0.25. If it hadn't stalled by then, the whole video will play through fine.
The more I take down details, the more I see re-occurrences in the ratio, with a number that long, it can't be a random disconnect.