So timeupdate events themselves were not reliable, but what else could be used to make a better determination of if we're waiting? We checked player.currentTime() on the timeupdate events, and found that when we caught the last timeupdate event, the one after the waiting event, the player was at the same time as the timeupdate event prior to the waiting event (and the same time as when the waiting event was triggered). Some browsers emitted a timeupdate event immediatley after the waiting event. * handleTechWaiting_ ( ) Īfter logging the events emitted by the player, the issue became clear. * Retrigger the `waiting` event that was triggered by the Tech}. In the code, the vjs-waiting class is added to the HTML element when the tech triggers a waiting event, and is removed on the next timeupdate event. To approach the bug, we started with the most glaring problem, the disappearance of the loading spinner. Here’s a quick tour of what happened and how we fixed it. You can see this behavior yourself by checking out Video.js 7.3.0, loading as the source, and using Chrome Dev Tools to disconnect and reconnect the network. Even worse, the loading spinner simply disappeared, leaving a frozen frame on screen. But recently, we found that for some content played in Video.js, the video didn’t resume. Thankfully, video players are usually pretty robust against such issues as network connectivity (and rogue microwaves), and the video resumed after the network recovered. So I’d start the microwave, watch whatever video was streaming on my laptop until the buffer ran out, then watch the loading spinner until the microwave gave the triple ding. It was an annoyance, but I was hungry, the apartment was too small to move the router further from the microwave, and I didn’t want to buy anything that operated on a different frequency. In my old apartment, whenever I nuked a bowl of oats in the microwave, my WIFI cut out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |