Html5 Video Element Request Stay Pending Forever (On Chrome)

HTML5 video element request stay pending forever (on chrome)

Apparently that's a bug from Chrome. And there's nothing to do about it ATM.

I reported the issue a while ago on the Chromium project and it's been assigned. So hopefully it'll be fixed in near future.

Bug report: https://code.google.com/p/chromium/issues/detail?id=234779

HTML Video's status becomes pending after some times

I suspect what's happening here is that the video elements you removed are still in memory and trying to download. The browser doesn't stop buffering or even playing a video once it's no longer attached to the DOM, because you might use attach it again later or use it for other things like canvas or Web Audio API. And Chrome can only download so many streams at once before it starts blocking new ones.

To really get rid of your old video elements, you need to set the src to an empty string and then call .load(). That will force the browser to stop buffering that element, and then you can truly be done with it.

Or, you can just re-use the same video element and set the new src (or source child elements) on it the next time through the loop. Just remember to call .load() on the video element whenever you change the src.

In theory, the browser could decide to stop buffering a video element that isn't playing and has no references to it in memory and just garbage collect it. But not having seen your code, I can't say if you've got any stray references around. And Chrome can be weird about this kind of thing sometimes.



Related Topics



Leave a reply



Submit