After a discussion with Apple Support, the problem has been fixed. The problem has to do with the hardware H264 decoder. Basically, I was never removing the videos from the hardware decoder buffer by never releasing the video resources (which I thought javascript would do itself).
So I was setting the source like this:
$(vid).src = "some source file";
$(vid).play();
... some other stuff happens ...
$(vid).remove();
Doing it this way never removed the video from the decoder buffer, which meant that eventually it not be able to decode any more videos.
To fix this, this is how you must remove the video from the DOM:
$(vid).src = "some source file";
$(vid).play();
... some other stuff happens ...
$(vid).remove();
$(vid).src = "";
$(vid).load();
Now I realize that this doesn't make a ton of sense because after .remove()
is called, I would have assumed that the control has been removed from the DOM and any garbage collection would do the rest automatically. However, it doesn't work like that. I hope this helps other people.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…