kslimani / clappr-ima-plugin Goto Github PK
View Code? Open in Web Editor NEWInteractive Media Ads (IMA) SDK plugin for Clappr
License: MIT License
Interactive Media Ads (IMA) SDK plugin for Clappr
License: MIT License
Can you tell me how can I get information from IMA SDK if the ad is a preroll, postroll?
Something similar to this in VideoJs.
ima.addEventListener(google.ima.AdEvent.Type.COMPLETE, evt => {
if (evt.getAd().getAdPodInfo().getPodIndex() == -1) { //-1 is postroll
this.events.onPause();
}
});
Workaround : setting disableNonLinearForIOS
to true will skip non-linear on iOS devices.
Sometimes when I'm playing the same content with preroll, after preroll plays till end Clappr is informing about an error "no extm3u delimiter". Does not happen when I do not use preroll. Any idea what could be wrong?
Edit: happens for any kind of content - mp4, m3u8, ogg. Clappr shows an error hls:networkError_manifestParsingError
Environment
Google Chrome 75
Clappr 0.3.6 (Newest)
IMA SDK plugin for Clappr
Issue
Clappr stuck in loading state when executing play of HLS content with IMA tag.
Clappr has been configured according to the example presented in this repo.
Source: https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8
IMA tag: https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/ad_rule_samples&ciu_szs=300x250&ad_rule=1&impl=s&gdfp_req=1&env=vp&output=vmap&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ar%3Dpremidpostlongpod&cmsid=496&vid=short_tencue&correlator=
Hi
I'm using Google's video ads and if they serve pre-roll, it's all fine.
But if it's a banner, like on the screenshot below, closing an ad (which then minimizes itself) or even if it's up, the interface is unresponsive.
Viewer is unable to click on anything but play/pause, including volume, cast, fullscreen...
Even keyboard shortcuts don't work ๐คทโโ๏ธ
There's no error in the console or anything which would point in the right direction.
Environment
Google Chrome 75
Clappr 0.3.6 (Newest)
IMA SDK plugin for Clappr / IMA SDK plugin preroll only
Description
Is it possible to support ads when playing audio content? Seems to be reasonable usecase to make the user to listen to some audio advert when playing some content.
Test
VAST: https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=
Source: https://file-examples.com/wp-content/uploads/2017/11/file_example_MP3_5MG.mp3
I tested it with sample audio and sample VAST tag. Seen behaviour is that both advert and content start to play together. Once advert comes to end, content starts to play from the beginning.
shame on me !
On iOS 10+ devices, if IMA custom playback is disabled using setDisableCustomPlaybackForIOS10Plus(true)
(ima settings) then the video content may not be properly restored.
EDIT: muted autoplay is failing on some old iOS devices with iOS 9.x.
Note: it worked on iPhone 7 with iOS 13.3.1.
Help wanted : test on iOS between 9 and 13 and confirm if it works.
Suggested workaround is :
var isNotSupported = Clappr.Browser.isiOS
&& Clappr.Browser.os.majorVersion
&& Clappr.Browser.os.majorVersion <= 9;
var player = new Clappr.Player({
autoPlay: !isNotSupported,
mute: true,
// [...]
});
HI, I am trying to mute the add but it's not working.
Following is my code so that you can understand what I have tried maybe this is some issue with the plugin.
`(function (){
console.log("50001");
var vd_scr = 'song.webm?t=1';
var TAG_VMAP = 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=';
var player = new Clappr.Player({
parentId: ".player",
source: vd_scr,
width: '100%',
height: '100%',
autoPlay:true,
//mute: true,
plugins: [
ClapprImaPlugin,
],
imaPlugin:{
playInline: true,
isableNonLinear: true,
isableNonLinearForIOS: true,
resetAdOnEnded: true,
requestAdIfNoAutoplay: true,//always set it to true, to undertand please follow this https://github.com/kslimani/clappr-ima-plugin
resetAdOnEnded: true,
imaAdPlayer:{
adWillAutoPlay:true,
tag: TAG_VMAP,
locale: 'us',
adWillPlayMuted: true,
timeout:300, //The duration in milliseconds to wait for the IMA SDK library to be loaded.
maxDuration: 300000,//The maximum duration in milliseconds an ad is displayed
},
},
});
})();`
Environment 1
Google Chrome 76
Clappr (Newest)
IMA SDK plugin for Clappr (Newest)
Environment 2
Chrome 73 based browser (NFBE)
Clappr (Newest)
IMA SDK plugin for Clappr (Newest)
Issue
When we're preparing some VAST file with media that possibly has the duration metadata not at the beginning of the file, we reach some kind of timeout with IMA. On video screen we get then html5_video:4 error. Do you have any idea what could be going on?
This plugin is tested with HLS VOD ?
Feature request upcoming!
In our implementations we do not recreate Clappr player. We initialize it only once, keep it as permanent part of DOM and then just manipulate the source. Therefore (afaik) it is not possible to change VAST url dynamically (based on what I understood from your ImaAdPlayer source). It would be quite handy for us to be able to load new VAST source on demand, i.e. using something like this
playerObject.core.getPlugin("ima-plugin").loadTag(res)
Would it be possible to create and expose such API?
Hello! THis plugin not work on iOS, by click on video opened iphone player (not web). pls tell me how to fix this issue?
Ads which are available on https://developers.google.com/interactive-media-ads/docs/sdks/html5/tags
can be clicked, which then redirects to some google website. I am wondering if it is possible to disable redirecting when clicking on ad?
Certain AdBlockers are causing issues with the plugin. Privacy Badger on Firefox is one. When it's enabled the ad is obviously blocked but the video player shows a frame from the video and no controls. It's essentially a frozen image of the video/stream with no controls.
This plugin attempt to give best user experience, but when autoplay is disabled, the content source may briefly appear before pre-roll.
Workaround : setting requestAdIfNoAutoplay
to true should reduce this behaviour.
There seems to be no documentation on how to add ad controls like play, pause and mute.
In the current implementation that is shown on the example player ad controls are not coming.
Take a look at the screenshot which demonstrates the same.
Please explain how can I add play-ad and pause-ad button on ads, so that users can play and pause ad whenever they need.
Workaround: do not use VMAP VAST tag with live source.
Like discussed here, clappr changed to a new project:
@clappr/player.
The old project on npm now has this message:
This package has been deprecated, Author message:
This version is no longer supported. Please use the @clappr/player versions instead.
Can this clappr IMA plugin have a new version (maybe better on other project to don't brake latest), that is compatible with @clappr/player ?
Or it's already compatible? Sorry, it's a bit confusing.
Openning a new issue from this conversation.
@YuThandar in your player configuration, could you try to modify :
autoPlay: true,
by
autoPlay: !Clappr.Browser.isMobile,
I have one request.
In our UI we have one feature called idle mode
. When conditions for idle mode
are reached, we load different playlist to clappr. Requirement is - no user interaction within period of time after playback was stopped, paused, ended.
When we're playing ads, playback is paused and ads are playing. When ads are quite long, conditions for idle mode
can be reached.
Therefore could it be possible for you to provide an interface (some events) when ad started to play, when ad finished playing, etc?
When resetAdOnEnded
is set to true, post-roll may be played twice and player may not be properly stopped when video has ended.
Hi
Super lame/noob question:
What's vpaidMode and why is it's value 2 in the demo?
I've got a pre-roll ad that works great on desktop, but on Chrome on iOS it plays in a loop and there's no way to stop it. Is there a certain setting that would cause this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.