videojs-contrib-ads
videojs-contrib-ads copied to clipboard
What should we do after failed content?
Hi, I have a question about failed content video.
The case:
- Play preroll ad + video content with failed response(for example, the source not found)
- Change player content source
- Catch warning
Unexpected startLinearAdMode invocation (Preroll)
Logs for successful case (with success content):
VIDEOJS: ADS: Received play event (BeforePreroll)
VIDEOJS: ADS: BeforePreroll -> Preroll
VIDEOJS: ADS: Received adsready event (Preroll)
VIDEOJS: ADS: Triggered readyforpreroll event (Preroll)
VIDEOJS: ADS: Starting ad break
VIDEOJS: ADS: Ending ad break
VIDEOJS: ADS: Preroll -> ContentPlayback
Logs for failuer case (with failure content):
VIDEOJS: ADS: Received contentchanged event (ContentState)
VIDEOJS: ADS: ContentPlayback -> BeforePreroll
VIDEOJS: ADS: BeforePreroll -> Preroll
`log with some error: The media could not be loaded, either because the ...`
VIDEOJS: ADS: Received adsready event (Preroll)
VIDEOJS: ADS: Triggered readyforpreroll event (Preroll)
VIDEOJS: ADS: Starting ad break
VIDEOJS: ADS: Ending ad break
The main diff is an absence state.transitionTo
.
Is there something what I should do in my side for correct work?
Or is this bug?
It sounds like the root cause of your troubles is probably the same as in #464 - so, let's focus on that issue first.
Hi @misteroneill,
I have prepared example https://codepen.io/zhulduz/pen/GzpYer?editors=1010
Step to reproduce:
- watch until the end of the ad first video
- click on the button
Change source
- watch until the end of the ad second video
- get the warning
Unexpected startLinearAdMode invocation (Preroll)
- click on the button
Change source
- after watching until the end of the ad third video is not play automatically