Open rhodh opened 6 years ago
Also It misses first loadstart and then, for whatever reason, triggers readyforpreroll twice while adsready was triggered once.
Can this issue be reproduced in the example integration? It is difficult to debug this without a reduced test case, or know which project the issue lies within.
@incompl I tried it in both videojs-ima (reported above) and also mine integration with same behaviour. I didnt try contrib-ads-example. I guess that it will be related to missing loadstart event which breaks (somehow) contrib-ads internal workflow.
Description
When loading live dash stream with autoplay we can get a race condition where paused is called before play request is complete.
Steps to Reproduce
Download the example demo showcasing the error from here.
Startup the project.
Zap between two streams until we get a hang.
Note that during each zap we get an error Caught pending play exception - continuing (AbortError: The play() request was interrupted by a call to pause(). https://goo.gl/LdLk22)
Expected Results
We don't get a "Caught pending play exception" every time we zap and the stream doesn't hang.
Actual Results
Stream hangs after continuous zapping and we get a "Caught pending play exception" every time we zap.
Workaround
In cancelContentPlay() before pausing the player I added
while(video.seeking()) { }
This did fix the issue. But maybe this isn't the correct way to go about resolving the issue. But if it is I'm happy to create a PR for it.
Versions
videojs-contrib-ads version: 6.4.1
Video-js version: 7.2
videojs-ima version: 1.5.1
Platforms
Browsers: Chrome v69
OS/Devices: Windows 10