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.