AdDisplayContainer size issue
See original GitHub issueHi,
When the player is initialized inside a hidden container, adsManager is not initialized.
<div style="display:none">
var player = videojs()...
player.on("adserror", function (data) {
console.error("adserror", data); // console doesn't show any errors
});
player.ima(options);
player.one('click', function() {
player.ima.initializeAdDisplayContainer();
player.ima.requestAds();
});
</div>
adsLoader doesn’t trigger AD_ERROR or ADS_MANAGER_LOADED events. if take a look on “SdkImpl.initAdObjects” then I see: adDisplayContainer.width is 0 adDisplayContainer.height is 0 getPlayerWidth() - 900 getPlayerHeight() - 560
and here is screenshot of AdLoader after click / requestAd:
Please advise how to correctly initialize plugin in such situation.
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Where does IMA get the values to pass as width, height to ...
I would assume it's from AdDisplayContainer, which gets it from the containerElement ... Do you have a page where we can see the...
Read more >Google IMA sdk - Maximum call stack size exceeded
I setup the adDisplayContainer; I have added a watcher to detect the issue. THE CODE: this.adDisplayContainer = new google.ima.
Read more >Get started | IMA SDK for HTML5 - Google Developers
AdDisplayContainer : A container object where ads are rendered. ... this element's width controls the effective height */ /* of the video container's ......
Read more >Changes to the IMA SDK for iOS - Google Ads Developer Blog
adDisplayContainer = [[IMAAdDisplayContainer alloc] initWithAdContainer:self. ... each of which is initialized with a width and height.
Read more >VideoAdUnit AdUnit:Instream for Header Bidding
Create a new Video Instream Ad Unit associated with a Prebid Server configuration ID and a video size. See AdUnit for additional parameters...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Note that
display: none
results in no width/height whilevisibility: hidden
hides element, but preserve dimensions.Hi @onix-sergey ,
I am going to close this issue, but please feel free to reopen if the problem persists.