2016-03-23 64 views
0

我想在JWPlayer上投放音頻廣告。MEDIA_ERR_SRC_NOT_SUPPORTED當JWPlayer中的廣告廣告被觸發時

但是,當廣告被稱爲JWPlayer拋出錯誤代碼「MEDIA_ERR_SRC_NOT_SUPPORTED」

雖然http頭中的Content-Type是audio/mpeg,但是在浩瀚的視頻/ mp4中。

巨大的xml中的內容類型會影響JWPlayer中的錯誤?

以下URL是測試頁。 http://webdemo.dac.co.jp/nt/radio/audio_test.html

用於廣告的JavaScript代碼如下。

advertising: { 
    client: "vast", 
    schedule: { 
     preroll: { 
      offset: "pre", 
      tag: 'http://xp1.zedo.com/asw/fnsr.vast?n=2696&c=4/2&d=80&s=0&v=vast2&pu=__page-url__&ru=__referrer__&pw=__player-width__&ph=__player-height__&z=__random-number__', 
      'skipoffset':1, 
     }, 
     postroll: { 
      offset: "post", 
      tag: 'http://xp1.zedo.com/asw/fnsr.vast?n=2696&c=4/2&d=80&s=0&v=vast2&pu=__page-url__&ru=__referrer__&pw=__player-width__&ph=__player-height__&z=__random-number__', 
     }, 
     adbreak1: { 
      offset: 5, 
      tag: 'http://xp1.zedo.com/asw/fnsr.vast?n=2696&c=4/2&d=80&s=0&v=vast2&pu=__page-url__&ru=__referrer__&pw=__player-width__&ph=__player-height__&z=__random-number__', 
     }, 
    }, 
} 

回答

0

雖然我自己對JW播放器不太熟悉,但VAST XML中的MediaFile節點應該具有正確的type屬性。

<MediaFile delivery="progressive" bitrate="300" width="1" height="1" type="audio/mpeg"> 

使用audio/mpeg告訴玩家不要期待視頻,這可以防止媒體錯誤。