Closed RajasekarPR closed 4 years ago
Hi,
Assuming you want to display your video ad repeatedly, you can modify our AdvancedExample and add the snippet below to the ads.js file, in the onAdEvent
function (line 107):
if(event.type === google.ima.AdEvent.Type.COMPLETE){
adsManager = this.player.ima.getAdsManager();
if(adsManager != null){
adsManager.destroy();
this.player.ima.controller.sdkImpl.adsLoader.contentComplete();
}
this.player.ima.setContentWithAdTag(null, this.adTagInput.value, false);
this.player.ima.requestAds();
}
I have added the above snippet of code in SdkImpl.prototype.onAdComplete = function () {} its not working and its playing only one time. Does anyone achieves this.
Hello all,
I wanted some help clarifying the desired behavior being asked for in this bug.
My understanding is it is asking how to create a playlist of videos, which each have their own set of ads requested by the IMA SDK. I may suggest you look at the IMA SDK HTML5 playlist example, as it may better answer your questions. This behavior is equally possible to achieve with the videoJS-IMA plugin.
Please let me know if that help, and how I can farther help resolve your issue.
You are actually trying to use "preroll" as "midroll". This plugin is not intended to be used in that way. So, you have to fork on the project and do some modification with this plugin.
hi i have used the above snippet of code for infinite video play ads but after 30 to 40 times plays I got the below error Ad error: AdError 402: VAST media file loading reached a timeout of 8 seconds. what might be the issue and how can i resolve this.?
That looks like it may be a server side issue, possibly related to rate capping if the same ad is being loaded many times in a row.
I understand that might be an server issue but is there any workaround to play ads infinitely and avoid this AdError 402: VAST media file loading reached a timeout of 8 seconds?
Hello @lavisor ,
The IMA SDK does not support this type of ad playback, as it can be seen as spammy ad behavior. However, I may be misunderstanding your intent with playing ads infinitely. If you could clarify the situation, or perhaps provide a test page, I may be able to help with a work around.
@arnaudcasame How to play ima sdk again for n times after each time the ads get completed ?