通过 VAST 标记的 SWF 广告未在 JW 播放器中播放

Posted

技术标签:

【中文标题】通过 VAST 标记的 SWF 广告未在 JW 播放器中播放【英文标题】:SWF advertisements through VAST Tag not played in JW player 【发布时间】:2016-07-26 11:34:22 【问题描述】:

我使用 jwplayer 之类的方式通过 VAST 标签配置广告。

$(document).ready(function()
var playerInstance = jwplayer("player1");
playerInstance.setup(
    file: 'https://d150hyw1dtprld.cloudfront.net/videos/HP_VideoTest_NoPostRoll_v2_720p.mp4',
    width: "100%",
    displaytitle: false,
    controls: false,
    primary: 'flash',
    mute:'false',
    autostart: true,
    advertising: 
          client: "vast",
          tag: 'http://ads.adaptv.advertising.com/a/h/DLhbzlB+8BBfoyyx+Qo7i7Bx_Mpt2nNJbie4rwz4DHkL4tzFA61JtQ==?cb=$cachebreaker&pageUrl=$embeddingPageUrl&description=$description&duration=$duration&id=$id&keywords=$keywords&title=$title&url=$videourl&eov=eov&width=$width&height=$height&videourl=$videourl&duration=$duration&br_i=ad&context=$context.homepage&adap_uid=7924494155751153126'
        
);
);

上面的 SWF 广告没有播放。只有主视频(文件)只播放。我该如何解决这个问题??

【问题讨论】:

【参考方案1】:

the VAST file representing the advertisement you linked to in your code snippet 似乎有问题 — 当我将其粘贴到 Google's VAST Inspector 时,我收到此错误:

(下午 4:29:36)广告错误:AdError 901:VPAID 广告素材中出现意外错误。有关详细信息,请参阅内部错误。原因:错误:错误:在广告代码响应中未找到广告

在广告中,有一个<MediaFile>标签:

 <MediaFiles>
 <MediaFile delivery="progressive"   type="application/x-shockwave-flash" apiFramework="VPAID">
 <![CDATA[
http://redir.adap.tv/redir/client/VPAIDClient.swf?adTagUrl=http%3A%2F%2Fads.adaptv.advertising.com%2Fa%2Fh%2FDLhbzlB%2B8BBfoyyx%2BQo7i7Bx_Mpt2nNJbie4rwz4DHkL4tzFA61JtQ%3D%3D%3Fcb%3D%24%7Bcachebreaker%7D%26pageUrl%3D%24%7BembeddingPageUrl%7D%26description%3D%24%7Bdescription%7D%26duration%3D%24%7Bduration%7D%26id%3D%24%7Bid%7D%26keywords%3D%24%7Bkeywords%7D%26title%3D%24%7Btitle%7D%26url%3D%24%7Bvideourl%7D%26eov%3Deov%26width%3D%24%7Bwidth%7D%26height%3D%24%7Bheight%7D%26videourl%3D%24%7Bvideourl%7D%26duration%3D%24%7Bduration%7D%26br_i%3Dad%26context%3D%24%7Bcontext.homepage%7D%26adap_uid%3D7924494155751153126%26a.cluster%3D0%26a.pvt%3D0&companionId=&cpmPassback=&placementId=266469&orgId=5047&injectCompanionDummy=&pauseOnClick=&d.vw=&d.app=
]]>
</MediaFile>
</MediaFiles>

查询参数adTagUrl 的值为:

http://ads.adaptv.advertising.com/a/h/DLhbzlB+8BBfoyyx+Qo7i7Bx_Mpt2nNJbie4rwz4DHkL4tzFA61JtQ==?cb=$cachebreaker&pageUrl=$embeddingPageUrl&description=$description&duration=$duration&id=$id&keywords=$keywords&title=$title&url=$videourl&eov=eov&width=$width&height=$height&videourl=$videourl&duration=$duration&br_i=ad&context=$context.homepage&adap_uid=7924494155751153126&a.cluster=0&a.pvt=0&companionId=&cpmPassback=&placementId=266469&orgId=5047&injectCompanionDummy=&pauseOnClick=&d.vw=&d.app=

这似乎是循环回到与您链接的文件相同的 VAST 文件。因此,看起来您的 VAST 标记确实不正确。

【讨论】:

以上是关于通过 VAST 标记的 SWF 广告未在 JW 播放器中播放的主要内容,如果未能解决你的问题,请参考以下文章

jw player 配置参数

JW Player参数详解

替换从 VAST 代码返回的多个 HLS VOD 片段

Google Adsense 广告未在 UIWebView 中加载

JW Player 任何 javascript 交互都失败

插页式dfp广告未在Android平板电脑上全屏显示