Closed Pong420 closed 6 years ago
The main thing I suggest is to not do source changes during ad mode. Is player.ads.isInAdMode()
true when you are changing sources? If you want to change sources during an ad, I suggest you first end the ad.
player.ads.isInAdMode()
is false
Hmm this all seems OK. The error you're seeing in the console is a normal result of how cancelContentPlay
works (we're changing how that works in this PR which will make that error go away).
I'm curious to know more about the state of the player when it is stalled. Is it paused? What is displayed visually?
If you could share an example that demonstrates the issue that would help a lot too.
Sorry, i am not state clearly.
Action
Change another video source and receive a loadedmetadata
event
Expectation The player continue to play
Result The player continue to play after 5 second
So my problem is how to remove the 5 second.
If set timeout
to 0 work fine, but i worry that this may cause other problems
Here is the example, after video ad ended, click on the button to change video https://ads-issue-346.herokuapp.com/
Ah I see, this is because the plugin does preroll checks again after you change sources. You can either play a preroll the same way you do for the initial source, or you can trigger a nopreroll
event on the player like this: player.trigger('nopreroll');
thanks so much~
Hi,
i am working on resolution change by changing video source, but seems conflict with this plugin, player is stalled around 5 second after source change