videojs-contrib-ads icon indicating copy to clipboard operation
videojs-contrib-ads copied to clipboard

What should we do after failed content?

Open zhulduz opened this issue 6 years ago • 2 comments

Hi, I have a question about failed content video.

The case:

  1. Play preroll ad + video content with failed response(for example, the source not found)
  2. Change player content source
  3. 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?

zhulduz avatar Jan 23 '19 09:01 zhulduz

It sounds like the root cause of your troubles is probably the same as in #464 - so, let's focus on that issue first.

misteroneill avatar Jan 24 '19 20:01 misteroneill

Hi @misteroneill,

I have prepared example https://codepen.io/zhulduz/pen/GzpYer?editors=1010

Step to reproduce:

  1. watch until the end of the ad first video
  2. click on the button Change source
  3. watch until the end of the ad second video
  4. get the warning Unexpected startLinearAdMode invocation (Preroll)
  5. click on the button Change source
  6. after watching until the end of the ad third video is not play automatically

zhulduz avatar Jan 25 '19 17:01 zhulduz