Tag Archives: ima_android

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.

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.

Deprecating GMF for Android

On March 15, 2018, we are stopping development and support for Google Media Framework (GMF) for Android in favor of the new ExoPlayer IMA extension. GMF's technology and approach are based on an older version of ExoPlayer.

The new v2 version of ExoPlayer and the ExoPlayer IMA Extension make basic integration simple enough that a layer between ExoPlayer and the IMA SDK is no longer necessary. The new approach is cleaner, requires less code, and uses the most up-to-date version of ExoPlayer.

Support for GMF for Android will end on March 15, 2018, after which we will no longer respond to issues or make any further releases of GMF for Android. The repository will also be shut down at this time. If you want to access the code, you can clone the repository before the March 15, 2018 shutdown date.

Note: We are NOT deprecating GMF for iOS.

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

Latency best practices in the IMA SDKs

One of the most important factors in keeping users on your page or in your app is latency - the lower your latency, the more likely your users are to stick around. With this in mind, we'd like to remind you about our best practices for reducing latency with the IMA SDKs. In general, you can reduce latency by doing as much IMA set-up work as possible on page or app load, before your user tries to play a video. The following can be done in all of the SDKs before the user attempts to play a video:

  • Creating your ads loader.
  • Creating your ads request.
  • Requesting ads.
  • Obtaining the ads manager.
  • Registering ads manager event handlers.

You can find more information on optimizing latency in each of our SDKs at the links below:

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