googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

Restarting or restoring after chromecast session (VMAP) #1052

Closed jbreemhaar closed 2 years ago

jbreemhaar commented 2 years ago

Hi all,

I'm trying to find a way to restart, pause or restore after a chromecast session (e.g. playing in videojs, then chromecasting, then back to playing in browser) within the same videojs player session.

I've tried

Is there any way to temporarily pause videojs-ima (during the cast session) or restart this plugin? Thanks!

jbreemhaar commented 2 years ago

Solved. For reference:

player.ima.getAdsManager?.().destroy(); adsLoader?.contentComplete(); player.ima.changeAdTag(updatedAdTagUrl); player.ima.requestAds();

Is the way to go.