Coder Social home page Coder Social logo

googleads-ima-html5's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

googleads-ima-html5's Issues

Vpaid Error - Ad error: AdError 901: An unexpected error occurred within the VPAID creative. Refer to the inner error for more info.

Banner not displayed but tracking URLs called

Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.

Hey there,

Hope all is well.

When testing on Android Chrome I have recently started getting the following error:

Failed to execute 'play' on 'HTMLMediaElement': API can only be initiated by a user gesture.

I'm calling initialize as instructed and I'm correctly passing in my container and videoSlot to the AdDisaplyContainer.

Just wanted to sanity check with you - there are no bugs that you are aware of?

Seeking trouble example

I saw in the documentation a solution for seeking issues; however, when implementing it, seems like there are typos and it doesn't produce the desire behavior. Can you provide an example that shows the behavior correctly, or add it into this repository, please?

Thanks in advance for any hints

VMAP with non linear overlay iOS emptied problem

When i try the following vmap with the advanced or other examples, on iPad preroll works perfectly but when overlay or fullslot ads start player fires emptied event and video starts from the beginning.

<?xml version="1.0" encoding="utf-8"?> <vmap:VMAP version="1.0" xmlns:vmap="http://www.iab.net/videosuite/vmap"> <vmap:AdBreak timeOffset="start" breakType="linear" breakId="preroll"> <vmap:AdSource id="preroll-ad-1" allowMultipleAds="false" followRedirects="true"> <vmap:AdTagURI templateType="vast3"> <![CDATA[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=]]> </vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> <vmap:AdBreak timeOffset="00:00:20.000" breakType="nonlinear" breakId="overlay"> <vmap:AdSource id="overlay-ad-3" allowMultipleAds="false" followRedirects="true"> <vmap:AdTagURI templateType="vast3"> <![CDATA[https://pubads.g.doubleclick.net/gampad/ads?sz=480x70&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%3Dnonlinear&correlator=]]> </vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> <vmap:AdBreak timeOffset="00:00:40.000" breakType="linear" breakId="middroll"> <vmap:AdSource id="middroll-ad-4" allowMultipleAds="false" followRedirects="true"> <vmap:AdTagURI templateType="vast3"> <![CDATA[https://googleads.g.doubleclick.net/pagead/ads?client=ca-video-pub-6042571565839072&slotname=8759539312/3322294072&ad_type=text_image_flash&description_url=http%3A%2F%2Fkanald.com.tr&max_ad_duration=30000&videoad_start_delay=0]]> </vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> <vmap:AdBreak timeOffset="end" breakType="linear" breakId="postroll"> <vmap:AdSource id="postroll-ad-7" allowMultipleAds="false" followRedirects="true"> <vmap:AdTagURI templateType="vast3"> <![CDATA[https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/9927946/kanald/programlar/postroll&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[timestamp]]]> </vmap:AdTagURI> </vmap:AdSource> </vmap:AdBreak> </vmap:VMAP>

Bug with subtitles/HLS on IPHONE

I created a pull request to show the bug: #9

To reproduce the bug:

  • Click on on first item of the playlist on IPHONE devices.
  • The preroll will play.
  • The content never start.

The first item of the playlist don't play with subtitles but play without subtitles.
The second item of the playlist is always playing fine with subtitles and without subtitles.

Both item of the playlist contains on-demand HLS videos.

If you don't inject the vtt file, both items of the playlist are playing fine.

Ad replacing <video> src on iOS 12

Hello,

I have a strange issue with the IMA3 SDK on iOS 12. The video ad replaces the source from the main video. Here is an example:

http://staging53.wendyshow.com/ios12bug/

Scenario:

  • The main video should autoplay.
  • The ad should appear below the main video after 5 seconds (setTimeout()).
  • After the ad has ended, the main video should continue playing.

It works as expected on any device I was testing with, except on iOS 12.

Thanks,
Muris

Wrapper tracking urls

I've created an xml with one Wrapper element, that redirect to other Inline ad.
Both of them have one Tracking event=start.
VASTv3_0 says that all ad server in chain should be pinged with tracking urls. But when the ad started only Inline.Tracking event will be pinged.

i have follow this in my customized player

I have follow this example into my own customized player ,

But i am getting this error although i have same html structure of my player
uncaught exception: AdError 1101: The provided containerElement information: element is invalid.

Can anyone help me please
Thankyou in advance

[Question] Where is VAST video ad started event ?

Hi,

The AdEvent types are described here but i can't figure which one is the VAST video ad started ? (especially when it is a VPAID which play video ad)

According IAB VPAID 2.0 documentation, the AdStarted event (google.ima.AdEvent.type.STARTED ?) is fired as the result of calling the startAd() VPAID method. (ad unit started)

But i can't find in documentation the IMA equivalent to VAST AdVideoStart event :

AdStarted             -->  google.ima.AdEvent.type.STARTED
AdImpression          -->  google.ima.AdEvent.type.IMPRESSION
AdVideoStart          -->  ???
AdVideoFirstQuartile  -->  google.ima.AdEvent.type.FIRST_QUARTILE
AdVideoMidpoint       -->  google.ima.AdEvent.type.MIDPOINT
AdVideoThirdQuartile  -->  google.ima.AdEvent.type.THIRD_QUARTILE
AdVideoComplete       -->  google.ima.AdEvent.type.COMPLETE

Does someone have a clue ?

Autoplay does not work on Android

To reproduce the bug:

  • Take the playlist example.
  • Load the page on android device.
  • Click on the second item of the play.

Result: The companion loads but the video ad does not start.

I did the same on IOS devices and it's work properly.

My guess is that video tag did not receive the authorization to play on Android, maybe because IMA use two tags videos on Android and only one tag on IOS.

IMA SDK Loading

Hi,

In the simple example index.html, ima sdk script:

<script type="text/javascript" src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>

But in the advanced example index.html:

<script type="text/javascript" src="//s0.2mdn.net/instream/html5/ima3.js"></script>

What is difference? Which is right choose?

Sample not working with Adsense for games (AFG) tag

I'm trying to integrate the HTLM5 IMA SDK in my game launcher as described here.

I use the simple sample to get started. This sample works perfectly with the tag provided in the sample, however, when I use the tag for games mentioned in the Adsense for Games support doc, I get:
{l: "Unable to request ads from server due to network error.", h: 1012, o: "adLoadError"}

Here's the tag that should be used for games to get approved:
https://googleads.g.doubleclick.net/pagead/ads?ad_type=video&client=ca-games-pub-4968145218643279&videoad_start_delay=0&description_url=http%3A%2F%2Fwww.google.com&max_ad_duration=20000&adtest=on

I also noticed that this tag also doesn't work on VAST testers like Vast Inspector. It does seem to work in Google's inspector.

Anyone knows what's causing this issue, and how to resolve this?
Thanks a lot in advance!

[Question] AdsLoader re-use mechanism

On SDK documentation page, it is recommanded to use the same AdsLoader instance for the entire lifecycle of page.

I am working on a web project where user interactions with GUI creates new video elements without changing page. (and destroy previously created)

AdsLoader constructor require an AdDisplayContainer instance which itself accepts an optional HTMLVideoElement. In my case, the HTMLVideoElement should be the newly created video element.

My issue here is that AdsLoader seems to have to no method to set/replace AdDisplayContainer instance.

I would like to know, if it is an acceptable solution to destroy AdDisplayContainer and AdsLoader and re-create them for each newly created video element ? (or should I expect to have issues ?)

Don't trigger 'paused' event when clicking on the X button when in fullscreen on mobile

I am displaying preroll ads on mobile in fullscreen mode.
It works fine.
However there is an issue when clicking on the X button (top left) when in fullscreen mode, since it trigger the paused event.

Screenshot 2020-07-29 at 16 26

I am listening to the pause event and resume the play of the preroll video.

I would expect the paused event to be triggered only when clicking on the pause button.

And I would expect the clicking of the X button to behave in the same way as when pinching the video with two fingers, in which case the video exit the fullscreen mode and keep playing.

What do you think?
Would be possible to avoid to trigger the paused event when clicking on the X button?

Video tag source with '@' causes a crash after the preroll

I just notice that video tag url with '@' causes a crash after the preroll.

For example:

Result:

  • The preroll play correctly.
  • The events are correct apparently:

Ads loaded.
Ad event: loaded
Ad event: start
Ad event: firstquartile
Ad event: midpoint
Ad event: thirdquartile
Ad event: complete

  • However, google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED is never fired.
  • The content video never starts.

Is there a workaround for this issue ?

AdDisplayContainer stuck in endless update - Maximum call stack size exceeded

I have an issue with the google IMA sdk.

It seems the adDisplayContainer it's stuck an endless update loop.

this.adDisplayContainer = new google.ima.AdDisplayContainer(
          this.$refs.adContainer, this.videoContent);

When I watch the AdDisplayContainer I get the following error:

Maximum call stack size exceeded

I have reproduced the issue in this JSFiddle:
https://jsfiddle.net/fraMussi/53f6vbjh/7/

And made a question on StackOverflow:
https://stackoverflow.com/questions/61640725/maximum-call-stack-size-exceeded-with-vue-google-ima-sdk

Could you be so kind to have a look?

AUTOPLAY exception not getting caught

Dear googleads-ima html5 team,

From the release notes, it reads:
|3.186.1 | 12/7/2017 | AdErrorEvent.getInnerError() may now return an inner AdError object. This allows checking to see if autoplay failed.|

I created a codepen to have a try on this, but I can't see an autoplay issue get caught, the codepen link is: https://codepen.io/anon/pen/ppWOPN .

I am using Chrome v63, with autoplay policy set to "Document User Activation is Required". (For what I am seeing is that the player is freezing on the first frame of the video ad, but no adError message from web console )

Is there anything I've missed?

Thanks,
Iries

VPAID example

Hi
Help I did not understand how to use the vpaid sample.
Where can I find the documentation?
How to connect the vast xml stream to this script?

about IMA's usage problem

flvjs is a HTML5 FLV Player

Below is flvjs's Features

  1. FLV container with H.264 + AAC / MP3 codec playback
  2. Multipart segmented video playback
  3. HTTP FLV low latency live stream playback
  4. FLV over WebSocket live stream playback
  5. Compatible with Chrome, FireFox, Safari 10, IE11 and Edge
  6. Extremely low overhead, and hardware accelerated by your browser!

and I want to ask is it could use Google IMA SDK?(Live broadcast for example)

and I found title 'Request video ads' with below code

// Request video ads.
var adsRequest = new google.ima.AdsRequest();
adsRequest.adTagUrl = '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=';

I want to ask what is adTagUrl , and where it come from?

[Question] I have a question of IMA support format.

Hello, I have a simple question.
I use ima3 to load mpegdash format in Chrome browser, It can't play advert.
But it can play in Edge browser.

this problem is normal?
Thank you for considering my request.

Error on running simple example

hi, i got this error while running simple example.

Uncaught SyntaxError: Unexpected identifier
'+V(ky(d))+':1 Failed to load resource: the server responded with a status of 404 (Not Found)
'+V(ky(b))+':1 Failed to load resource: the server responded with a status of 404 (Not Found)
'+V(ky(f))+':1 Failed to load resource: the server responded with a status of 404 (Not Found)
bridge3.389.0_en.html:1032 Uncaught ReferenceError: ima is not defined
at bridge3.389.0_en.html:1032

how to reproduce:

  • clone the googleads-ima-html5
  • cd to simple folder
  • run the local server with : serve .

Can't make it work on iOS when script async

loadSdk: function() {
    var script = document.createElement('script')
    script.setAttribute('src', '//imasdk.googleapis.com/js/sdkloader/ima3_debug.js') // debugging mode

    script.onload = this.requestAds.bind(this)

    document.getElementsByTagName('head')[0].appendChild( script )
}

I'm doing this but on iOS (only?) it doesn't work:

" [  0.728s] [ima.loader.AdSourceFetcher] Creating VastAdSource." bridge3.95.1_debug_en.html:483

" [  0.731s] [ima.loader.VastAdSource] hasMoreAds, this.ads.length: 1 , this.currentAdIndex: -1" bridge3.95.1_debug_en.html:483

" [  0.733s] [ima.loader.VastAdSource] getNextAd, this.currentAdSource: null" bridge3.95.1_debug_en.html:483

" [  0.734s] [ima.loader.VastAdSource] hasMoreAds, this.ads.length: 1 , this.currentAdIndex: -1" bridge3.95.1_debug_en.html:483

" [  0.737s] [ima.loader.VastAdSource] processNextAd_, currentAdIndex: 0, ads.length: 1" bridge3.95.1_debug_en.html:483

" [  0.740s] [ima.loader.VastAdSource] processInlineAd, successCallback with 1 ads" bridge3.95.1_debug_en.html:483

" [  0.742s] [ima.loader.VastAdSource] hasMoreAds, this.ads.length: 1 , this.currentAdIndex: 0" bridge3.95.1_debug_en.html:483

" [  0.744s] [ima.loader.AdsLoaderImpl] exhaustAdSource_, calling success for 1 ads" bridge3.95.1_debug_en.html:483

" [  0.746s] [ima.loader.AdsLoaderWrapper] dispatchAdsManagerLoadedEvent_, ads.length: 1" bridge3.95.1_debug_en.html:483

" [  0.749s] [ima.managers.AdsManagerFactory] createAdsManager, adType: video" bridge3.95.1_debug_en.html:483

" [  0.945s] [ima.managers.BaseAdsManager] Could not display companion ads." bridge3.95.1_debug_en.html:483

" [ 15.952s] [ima.vast.VideoAdEventTracker] dispatching event mediaLoadTimeout" bridge3.95.1_debug_en.html:483

" [ 15.957s] [ima.managers.VastVideoAdsManager] Playback error: [object Object]" bridge3.95.1_debug_en.html:483

" [ 15.969s] [ima.common.ErrorUtils] Error play dispatched: AdError 402: VAST media file loading reached a timeout of 15 seconds."

It works though I do not add the script async, but add it directly in the dom. Any idea?

Simple example not rendering post-roll VMAP ads

Hi Team,

Have used ad url "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%3Dpremidpost&cmsid=496&vid=short_onecue&correlator="
which is VMAP xml contains pre-roll, midroll (15s) , post-roll ad

Player plays pre-roll and midroll fine. But not post-roll ad
Have used various VMAP ad urls provided by google ima sdk "https://developers.google.com/interactive-media-ads/docs/sdks/html5/tags" and facing issue with post-roll ad

Used simple example provided in github

Thanks and Regards
BHARATH SN

VMAP Overlay

Hello,

Nonlinear ads in VMAP not working. When Html5 IMA SDK support it?

Playback Error Thrown.

We have been using this for years, and just recently it's begun to stop serving ads. Diving into the errors, I see its throwing "Failed to initialize ad playback element before starting ad playback." and I can not seem to find why.

If I look through the VAST URL from Adsense, the creatives are coming in just fine, it should be running the chosen ad(s). But the player throws this error for some reason. We'd really like to figure out how we can resolve this issue. Currently costing us hundreds $$$ a day in lost revenue.

var adVideoContainer   = document.getElementById('ad-video');
var adDisplayContainer = new google.ima.AdDisplayContainer(adVideoContainer);
var adsLoader          = new google.ima.AdsLoader(adDisplayContainer);

adsLoader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED, function(adEvent){
    console.log('ADS_MANAGER_LOADED');
    onAdsManagerLoaded(adEvent);
}, true);

adsLoader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR, function(adEvent) {
    console.log('AD_ERROR');
    onMediaEnd();
},false);

function onAdsManagerLoaded(adEvent)
{
    var adsRenderingSettings = new google.ima.AdsRenderingSettings();

    var adsManager = adEvent.getAdsManager({
        currentTime: 0
    });

    window.adsManager = adsManager;

    adsManager.addEventListener( google.ima.AdErrorEvent.Type.AD_ERROR, function(adEvent) {
        console.log('AD_ERROR');
        onMediaEnd();
    });

    adsManager.addEventListener( google.ima.AdEvent.Type.ALL_ADS_COMPLETED, function(adEvent) {
        console.log('ALL_ADS_COMPLETED');
        onMediaEnd();
    });

    adsManager.addEventListener( google.ima.AdEvent.Type.COMPLETE, function(adEvent) {
        console.log('COMPLETE');
        onMediaEnd();
    });

    adsManager.addEventListener(google.ima.AdEvent.Type.LOADED,function(adEvent){
        console.log('LOADED');

        var ad = adEvent.getAd();
        var adData = adEvent.getAdData();

        console.log(adData);

        if (!ad.isLinear())
        {
            // show game content
            onMediaEnd();
        }
        else
        {
            // Ad is being shown, lets do nothing for now...
        }
    });


    try
    {
        adsManager.init(640, 480, google.ima.ViewMode.NORMAL);
        adsManager.start();
    }
    catch (adError)
    {
        // this is currently where the ad keeps failing! 

        console.log(adError);
        onMediaEnd();
    }
}


    var adsRequest = new google.ima.AdsRequest();
    adsRequest.adTagUrl               = '<?=$adsenseVASTURL?>';
    adsRequest.linearAdSlotWidth      = 640;
    adsRequest.linearAdSlotHeight     = 480;
    adsRequest.nonLinearAdSlotHeight  = 480;
    adsRequest.nonLinearAdSlotWidth   = 640;

    adsLoader.requestAds(adsRequest);

broken with latest release for videojs

Dear @shawnbuso

with the release of 1 1/2 weeks ago google ima sdk is kinda broken for us.

We are using videojs with your videojs-ima plugin. We actually are on the latest tag (0.8.0, unfortunatelly it is cloaking itself as 0.7.0 in videojs), but since few days only - so we don't think upgrading from videojs-ima github tag 0.6.0 to 0.8.0 did break the behaviour nor did it improve the situation.

We do but think that for some reason the ima sdk does not reuqest ad-video in all cases anymore - one sees the xml-file-reuqest, but no ad-file is done subsequently. This is being true for 15% of our traffic now.

Love to get in touch with you on how to best communicate this issue.

regards
Benedikt

Could you provide IMA HTML5 SDK sample for game

It is confused when i use IMA HTML5 SDK for game, it is difficult to find any useful information let me use IMA HTML SDK in my games. there only samples about video. Could you provide official sample about IMA HTML5 SDK for game ?

Can't scroll page when touching video element while playing vast

When debugging on chrome I get the following exceptions:

"Uncaught TypeError: document.createTouch is not a function"
"Uncaught TypeError: Cannot read property 'apply' of undefined"
image

Which probably prevents the touchmove event

In vPaid it does not happen (probably different code flow)

can not play ad in iphone.

Hi Shawn,
i am trying to play ad in iphone safari browser but it is not able to play the ad. may be the problem is youtube api iframe flash player. please suggest me what should i do now?

Error with some IMA SDK tags: 1009: The VAST response document is empty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.