html5 广告sdk,Preloading media

The IMA SDK supports preloading video ad assets.

You can enable this feature in your SDK integration

to provide a more seamless transition between ads and content.

This guide goes over the technical details of implementing

media preload with the IMA SDK.

Prerequisite

Preloading requires version 3.135.1 or higher of the HTML5 SDK.

Enable preloading

To enable preloading, set

AdsRenderingSettings.enablePreloading

to true. This must be done as a result of the ADS_MANAGER_LOADED event:

function onAdsManagerLoaded(adsManagerLoadedEvent) {

var adsRenderingSettings = new google.ima.AdsRenderingSettings();

adsRenderingSettings.enablePreloading = true;

...

var adsManager = adsManagerLoadedEvent.getAdsManager(

videoContent, adsRenderingSettings);

}

Timing

The following table summarizes the changes in ad-load timing when preloading

is enabled:

Event

With Preload

Without Preload

Ad VAST requestedAdsLoader.requestAds()AdsLoader.requestAds()

Pre-roll loaded (single ad)AdsManager.init()AdsManager.start()

Pre-roll loaded (VMAP/Ad rules)AdsManager.init()AdsManager.init()

Mid-roll or post-roll loadedFor the 1st ad in an ad break, 4 seconds before ad start time.

For consecutive ads, when the previous ad starts playing.At ad start time.

Limitations

Preloading is subject to the following limitations:

Media preloading is not available on the mobile web on iOS devices or when

using the HTML5 IMA SDK on connected smart TVs.

VPAID is preloaded, but none of the ad's dependencies—including

media played by that ad—are loaded until the ad is executed.

Autoplay must be enabled for preloading to work. Ensure that

settings.isAutoPlayAdBreaks() is set to true, which is the default value.

FAQ

Does media preloading load the full creative?

No, the creative is usually not fully loaded when ad playback begins.

Preloading is intended for improving the user experience by minimizing the time

it takes for the ad to load. It is not intended to support offline ad serving.

The IMA SDK loads as much of the media as the browser allows, limited by the

user's internet connection and the size of the creative.

Does media preloading need to be enabled for the ad's VAST as well as media?

No, the SDK always preloads the ad's VAST, regardless of this preload

setting.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值