Restarting or restoring after chromecast session (VMAP)
Closed this issue · 1 comments
jbreemhaar commented
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
- https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/faq#8 (calling destroy() on AdsManager and contentComplete() on AdsLoader) and then calling player.ima.changeAdTag with an updated AdTagUrl (to make it unique for IMA).
- (re) calling player.ima() with an updated AdTagUrl
but no cigar.
Is there any way to temporarily pause videojs-ima (during the cast session) or restart this plugin?
Thanks!
jbreemhaar commented
Solved. For reference:
player.ima.getAdsManager?.().destroy();
adsLoader?.contentComplete();
player.ima.changeAdTag(updatedAdTagUrl);
player.ima.requestAds();
Is the way to go.