Closed ing-norante closed 3 years ago
Did you try to trigger player.ima.initializeAdDisplayContainer() asynchronously ? :) This might help, I remember I had problems where if I triggered play() or resume() on IOS it would crash the whole player and making it async fixed the issue.
Also try to test on real device (real iphone) because the safari responsive design emulator is weird (I can not see any ads there either, not sure if just videojs-ima does not work there or what :thinking:, but works perfectly on browserstack iphone)
Summary:
Hello @ing-norante ,
We have seen some issue in the past related to React. IMA does not support moving the video player in the DOM after IMA has been initiated. My recommendation would be to ensure all restructuring of the DOM is complete before initiating IMA. There may also be more information on React help forums related to the best way to handle this situation.
Thank you, Jackson IMA SDK team
Hello, I'm trying to use the videojs player in a React-based (NextJS) project. I need to serve pre-roll Ads through Google Ad Manager and the Ads are working on desktop and for Androids but aren't for Safari on Apple's mobile devices.
This is the React Video Component:
Please note that
process.env.NEXT_PUBLIC_IMA_AD_TAG_URL
is an env variable that contains a valid VAST URL generated from the Ad Manager.This is the section of the page I'm loading the React video component from:
Please note that this
block
is an object that comes from the CMS and it hosts a video with its options such as width, height, url, mimeType, etc..As seen on other issues and comments I've already tried adding
disableCustomPlaybackForIOS10Plus: true
to theimaOptions
hash, my html player has theplaysInline
attribute and I'm manually callingplayer.ima.initializeAdDisplayContainer()
as the repo examples.When I try starting the video on an iPhone (iOS 14 Safari) it hangs with this kind of strange video embedded one into the other... see screenshot below:
Any help would be super appreciated because I'm really stuck here.
Thanks!