Google IMA SDK Android对VAST支持调研(已弃更)

广告类型支持

不支持非线性广告播放,解析时直接报错:The provided ad type: nonlinear is not supported.
非线性广告仅在HTML5的版本支持。

代码研读

数据结构

Ad

包含了一个CreativeId,代表选中的主广告素材。

也就是一个Ad只能包含一个主广告素材(Linear or NonLinear)。如果有多个主广告素材,只有第一个会被选择,其他会被丢弃。
demo:one-ad-with-two-linear-creative.xml 在一个Ad中包含了两个线性素材,只有第一个会被选中,第二个直接丢弃,且不会报错。
同理,如果在一个Ad中包含了两个CompanionAds素材,只有第一个会被选中,第二个直接丢弃,且不会报错。demo:one-ad-with-two-companion-ads-creative.xml
仔细研读了一下VAST3.0的规范文档,发现Google的这个结构可能是会有问题的。
原文:

The <Creative> element may contain a sequence attribute that identifies the numerical order in which each creative should display. For example, an Ad may wish to play a Linear creative followed by a NonLinear creative. Values for the sequence attribute in this case would be 1 for the Linear creative and 2 for the NonLinear creative. Sequential display of creative in the absence of sequence values is at the video player’s discretion.

意思就是说<Creative>是可以有sequence属性的,如果有这个属性,就要按顺序播,理解下来就是主广告可能包含多个素材,而Google的这个Ad结构是不支持的。

使用adEvent.getAd().getCompanionAds()拿不到伴随广告的信息

然后伴随广告是可以正常渲染的,尚不确定是不是bug。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容