Open Ddog800 opened 3 years ago
Hi,
I have the same problem: I'm manually handling a playlist. if I'm casting a video, then trigger the next video via videojs.loadMedia()
, then this error is thrown.
After checking, the loadMedia
calls reset
, so it's exactly the same issue.
If the player is loaded and then
player.reset()
is called before the playback ever begins, this plugin throws the following error:This is causing a problem in my case due to how we're handling the player lifetime. We create the player on page load, in a hidden Bootstrap modal. When the user clicks on a video, it opens the modal and sets the player source. When the modal is closed, we have an event listener fire on the modal close event that will grab the player instance and then call
player.reset()
to clear the source and other things. The error thrown by this plugin then causes the the event listener to prematurely end, and the modal never closes.In testing, I've determined that this error will always appear any time the player is reset before playback begins. It won't always be a breaking error depending on what's going on, but it does throw an error where it should not.
I've tested with Video.js 7.8.2 and 7.10.2 and the Chromecast plugin 1.2.2.