Tag Archives: ima_sdk

The Video.js-IMA plugin adds DAI support for HLS streams

The IMA Dynamic Ad Insertion (DAI) SDK lets apps make stream requests for ad and content video streams, either VOD or live content. The SDK then enables a video player to play the combined stream so you don't have to manage switching between ad and content video within your apps.

To improve support for HTML5 publishers, we have expanded the features provided by the Video.js-IMA plugin to include DAI for HLS streams. With the latest version of the plugin, you can enable a Video.js player to request ads and content in a single HLS stream. Check out the new DAI sample app and the DAI README file for implementation details on how the Video.js-IMA plugin can simplify your IMA DAI integration.

For more information on IMA DAI, please see the IMA HTML5 DAI getting started guide. If you have any questions or feedback about using DAI with the Video.js-IMA plugin, please raise an issue on GitHub.

Updates to Chromecast integrations with Interactive Media Ads



CAF DAI SDK Released

The Interactive Media Ads team is excited to announce that we’ve teamed up with the Cast Application Framework team to bring you the CAF DAI SDK, a fully supported solution for casting DAI video streams to Chromecast devices. This project is a complete rewrite of our original IMA SDK for Cast, significantly reducing the amount of code publishers need to write and streamlining the integration between the two SDKs.

The CAF DAI SDK provides a deep integration with Chromecast Application Framework's native Ad Breaks, meaning that adding around 30 lines of code to an existing CAF receiver can enable:
  • DAI support for both Live and VOD streams
  • Media queue management
  • Sender and receiver UI, including ad break markers
  • Bidirectional communications between sender and receiver
  • Skippable ad support on VOD streams

With the previous SDK, all of these functions required manual implementation.


A fully-featured CAF DAI integration



IMA SDK for Cast deprecated

As of December 13, 2021, both the client-side and DAI versions of the IMA SDK for cast are now deprecated. Publishers who are currently using the IMA SDK for cast to implement client-side advertisements are encouraged to migrate to using CAF native ad breaks. Publishers who are currently using the IMA SDK for cast to implement DAI advertisements are encouraged to migrate to the new CAF DAI SDK. These new implementation options offer publishers significantly simpler integrations with better stability and tighter integration with the entire cast ecosystem.
Advertisement Type Deprecated Solution Recommended Solution
Client Side IMA SDK for Cast CAF native ad breaks
DAI IMA SDK for Cast CAF DAI SDK

The Client side and DAI versions of the IMA SDK for Cast will continue to function for the foreseeable future but support and new development will be focused on the CAF DAI SDK moving forward. The IMA SDK team will continue to offer best attempt support for the deprecated SDKs through December of 2022, however, some limitations of the older platform may only be resolved by migrating to the new workflows described above.


We highly recommend that publishers who are currently using the older IMA SDK for Cast begin migrating to these new workflows for improved stability, simplified integration, and a much more polished developer experience.





For more information about these changes, check out the developer documentation. If you have any issues migrating your integration from the IMA SDK for Cast to the CAF DAI SDK, feel free to reach out via our developer forums.

Changes to pause behavior in the Interactive Media Ads (IMA) SDK

The IMA SDK is preparing to release changes to pause behavior when user clicks cause navigation away from the page or app. When this happens, the ad will be paused automatically by the SDK. These changes are targeted for October 13th, 2020.

The IMA client-side SDKs already pause ad playback for ad click-throughs, but these changes add automatic pausing to many other user actions. The IMA DAI SDKs currently do not pause for any click events. For either implementation, if your code does not already provide a way for users to resume ad playback when ads are paused, we recommend adding a way to resume ad playback following ad pause events.

When the SDK automatically pauses the ad, the PAUSED event will be fired. We recommend that publishers listen for this event, and update the UI to allow the viewer to resume the ad. If this UI is not shown, the player may be permanently paused on the ad without a way for the user to resume ad or content playback.

Client-side changes

  • On Desktop web, the SDK will automatically pause when the user clicks on an ad which results in navigation away from the page.
    • This behavior already exists for mobile web and mobile apps.
  • On all platforms, the SDK will attempt to automatically pause if the user clicks on the:
    • Learn more button
    • Ad click (desktop)
    • Non-linear ad
    • Icon click
    • AdChoices icon

Dynamic Ad Insertion (DAI) changes

  • On all platforms for DAI, the SDK will attempt to automatically pause if the user clicks on the:
    • Learn more button
    • Ad click (desktop)
    • Icon click
    • AdChoices icon

Pause events

The table below shows which API is called when a pause event occurs:

IMA platform SDK version Pause event for client-side SDK Pause event for DAI SDK
HTML5 The current evergreen version. google.ima.AdEvent.Type.PAUSED The video player’s pause event.
Android V3.20.0 and later. videoAdPlayer.pauseAd() videoStreamPlayer.pause()
iOS/tvOS All versions kIMAAdEvent_PAUSE kIMAAdEvent_PAUSE

Note: For Android, the onPause event is only available on v3.20.0 and later. For previous versions the IMA SDK will not automatically pause ads, and developers will not have to implement these changes.

Please see the following code snippet as an example of setting up a listener for the PAUSED event for a client-side HTML5 IMA SDK implementation:

adsManager.addEventListener(google.ima.AdEvent.Type.PAUSED, function() {
showAdResumeUI();
});

function showAdResumeUI() {
// TODO: Add a play button that resumes playback.
}

Please review your IMA SDK integrations and make any necessary adjustments to handle the pause event so that you’re prepared for when the changes go live on October 13th. Please look for announcements about pause behavior changes in the IMA HTML5 SDK release notes. If you have questions about making these changes for your own IMA SDK integrations, feel free to reach out to us on the IMA SDK forum.

SIMID support in the Interactive Media Ads SDK

The Secure Interactive Media Interface Definition (SIMID) is a new ad format for interactive video ads. It was designed to be the successor of the Video Player Ad-Serving Interface Definition (VPAID) according to the Interactive Advertising Bureau. SIMID addresses many of the issues with VPAID, including slow loading times, security limitations, and being difficult to debug with only a single error code (901).

SIMID support is available in the HTML5, Android, and iOS IMA SDKs for client-side ads starting with the following releases:

Improvements in the SIMID API Model over VPAID

Unlike VPAID, the code for SIMID ad creatives runs in a secure sandbox so that it cannot access other resources on the page. With SIMID, the player maintains control while the creative sends messages to the player about which actions are needed to perform its functions. This is demonstrated in the diagram below:

As a result, SIMID offers the following advantages over VPAID:

  • Improved security by sandboxing the ad from the publishers page
  • Improved asset transparency by including the media file in the VAST response
  • Support for pre-caching
  • Faster load times
  • Improved error reporting from more granular error codes

Using SIMID with the IMA SDK

SIMID creatives are ready to be used within VAST ad-tags. To get started, see the IAB’s example on GitHub or test it yourself using this SIMID ad tag. If you have questions about the IMA SDK, see the SDK documentation or reach out to us on the IMA SDK forum.

The Interactive Media Ads (IMA) SDK for Android moves to Google’s Maven repository

With the release of version 3.16.0 of the Interactive Media Ads SDK (IMA SDK) for Android, the location where we host the SDK has changed to Google's Maven Repository.

As a result of this change, your Android project should include a reference to the google() repository (Google's Maven Repository) as a dependency. Previously, the SDK was hosted on JCenter. You can now remove the jcenter() reference from your Android project’s build.gradle file, as long as none of your other dependencies are hosted there.

The google() repository should be referenced in the project-level build.gradle file of your project. You should then import the IMA SDK in the app/build.gradle file. See an example in the following code snippet from the Adding the IMA Android SDK to the player app section of the Android IMA SDK getting started guide.

repositories {
google()
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.16.0'
}

Another change that comes from this update is that the com.google.android.gms:play-services-ads-identifier target is now included as a dependency of the IMA SDK and is no longer required to be explicitly included in the app/build.gradle file.

If you have questions about the IMA SDK for Android, please see the SDK documentation, or reach out to us on the IMA SDK forum.

Subscribe to our RSS feed to get blog posts via email

(If you want to continue getting email updates about our blog posts, read on. If you don't want email updates from this blog, you can skip this post.)

For some products, the Google Ads Developer team has used Google groups as a way to allow API users to subscribe and get new relevant blog posts delivered to their email address. Starting now, the way you can get email updates about blog posts is changing. We will no longer send an email to the Google group for each new blog post. We will continue to use the Google groups for other important updates, however.

For users who still want email updates, we've introduced new FeedBurner links on the right-hand panel of our blog homepage. You can subscribe to the RSS feed by clicking on the link for the product you're interested in, or subscribe by email by clicking on the [+] link to the right of the product name.

If you use any of the APIs that we discuss on this blog, make sure you subscribe to the feed to keep up with the latest news and updates:

Sunsetting Flash in the IMA SDKs

On May 15, 2018, Google will be sunsetting Flash in the IMA SDKs. This change will affect all users of the Flash IMA SDK, and a very small number of users of the HTML5 IMA SDK.

Changes to the Flash SDK

As of May 15, 2018, attempts to load the Flash IMA SDK will fire an AdErrorEvent.AD_ERROR from the AdsLoader. This is a change to the portion of the Flash SDK that is loaded at run time, and therefore will affect all Flash SDK implementations in production. If you've followed our implementation best practices, your handler for this error will play your content video:


private function initAdsLoader():void {
  ...
  adsLoader.addEventListener(AdErrorEvent.AD_ERROR, adsLoadErrorHandler);
}

private function adsLoadErrorHandler(event:AdErrorEvent):void {
  trace("warning", "Ads load error: " + event.error.errorMessage);
  videoPlayer.play();
}
We strongly encourage all publishers still using the Flash SDK to migrate to the HTML5 SDK. As part of this sunset, we will also be removing the Flash SDK documentation from developers.google.com and removing the Flash samples from GitHub.

Changes to the HTML5 SDK

As of May 15, 2018, the HTML5 IMA SDK will stop supporting all Flash ads. This includes linear, non-linear, and companion ads. If your VAST response includes only Flash media files, the IMA SDK will throw error 403 - VAST_LINEAR_ASSET_MISMATCH for linear ads, and error 503 - VAST_NONLINEAR_ASSET_MISMATCH for non-linear ads. Flash companion ads will fail silently. The HTML5 SDK stopped supporting Flash VPAID ads with the deprecation of the Flash IMA SDK last June.


As always, if you have any questions, feel free to contact us via the support forum.


Sunsetting Flash in the IMA SDKs

On May 15, 2018, Google will be sunsetting Flash in the IMA SDKs. This change will affect all users of the Flash IMA SDK, and a very small number of users of the HTML5 IMA SDK.

Changes to the Flash SDK

As of May 15, 2018, attempts to load the Flash IMA SDK will fire an AdErrorEvent.AD_ERROR from the AdsLoader. This is a change to the portion of the Flash SDK that is loaded at run time, and therefore will affect all Flash SDK implementations in production. If you've followed our implementation best practices, your handler for this error will play your content video:


private function initAdsLoader():void {
  ...
  adsLoader.addEventListener(AdErrorEvent.AD_ERROR, adsLoadErrorHandler);
}

private function adsLoadErrorHandler(event:AdErrorEvent):void {
  trace("warning", "Ads load error: " + event.error.errorMessage);
  videoPlayer.play();
}
We strongly encourage all publishers still using the Flash SDK to migrate to the HTML5 SDK. As part of this sunset, we will also be removing the Flash SDK documentation from developers.google.com and removing the Flash samples from GitHub.

Changes to the HTML5 SDK

As of May 15, 2018, the HTML5 IMA SDK will stop supporting all Flash ads. This includes linear, non-linear, and companion ads. If your VAST response includes only Flash media files, the IMA SDK will throw error 403 - VAST_LINEAR_ASSET_MISMATCH for linear ads, and error 503 - VAST_NONLINEAR_ASSET_MISMATCH for non-linear ads. Flash companion ads will fail silently. The HTML5 SDK stopped supporting Flash VPAID ads with the deprecation of the Flash IMA SDK last June.


As always, if you have any questions, feel free to contact us via the support forum.


Google Media Framework for Android is Deprecated

As previously announced, as of March 15th, 2018, the Google Media Framework (GMF) for Android is deprecated in favor of the IMA ExoPlayer plugin. All development and support for GMF has been halted. If you are a GMF Android user, we recommend you migrate to the IMA ExoPlayer plugin at your earliest convenience. Alternatively, to keep using GMF Android, you will have to fork and maintain it yourself.

Note: We are NOT deprecating GMF for iOS.

If you have any questions, feel free to contact us via the IMA SDK developer forum.

Announcing the IMA SDK AMP Extension

We’re excited to announce that we’ve teamed up with the Accelerated Mobile Pages team to bring you amp-ima-video, an IMA-SDK-enabled video player extension for AMP pages. This extension has been an AMP experiment for the past few months, but today we’re moving from experiment to public release.

amp-ima-video provides an AMP-enabled video player with the IMA SDK pre-integrated, so you can easily play and monetize content on your AMP pages. Simply provide your content URL and an ad tag, and we’ll handle playing back the video and ad(s). The extension currently supports linear in-stream single ads and VMAP playlists. To see it in action, check out the AMP by Example page for the extension.

If you have any questions or issues with the extension, please file them via the AMP issue tracker on GitHub.