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

时间:2016-04-06 07:53:14

标签: javascript jquery html5 flash jwplayer

我使用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 个答案:

答案 0 :(得分: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" width="400" height="300" 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标签看起来很糟糕。