如何向 jw 播放器添加大量广告



我正在尝试在jwplayer上添加来自广告网站的大量广告 这是我从广告网站上得到的

Bebi Video Ads :: Vast Instructions
To get vast url you should first include Bebi script on top of your page:
<script type="text/javascript" data-cfasync="false" src="//st.bebi.com/bebi_v3.js"></script>
then to get a vast url you should call:
BB.getVASTUrl(209831);
wherever you need it.
More information and examples can be found at:
https://bebimedia.freshdesk.com/solution/articles/14000075614-how-to-use-bebi-video-ads

我试过了,不知道下一步

<script type="text/javascript" data-cfasync="false" src="//st.bebi.com/bebi_v3.js"></script>
<script src="https://cdn.jwplayer.com/libraries/SNAMyqnD.js"></script>
<div id="player"></div>
<script>
var videoPlayer = jwplayer("player");
videoPlayer.setup({
sources: [{file: "https://www.w3schools.com/tags/mov_bbb.mp4"}],
width:"100%",
height:"100%",
});
</script>

首先,您需要满足以下两个要求:

  • 开发人员或企业许可证(包含广告的许可证(
  • 您的贝比展示位置 ID

其次,此代码应该在 JW 播放器中的前贴片广告中断中加载您的 Bebi 广告。如果您有额外的广告插播时间(插播广告、后贴片广告(,请查看 JW Player 的广告文档。

<html>
<head>
<script type="text/javascript" data-cfasync="false" src="https://st.bebi.com/bebi_v3.js"></script>
<script src="https://cdn.jwplayer.com/libraries/SNAMyqnD.js"></script>
</head>
<body>
<div id="player"></div>
<script>
var videoPlayer = jwplayer("player");
var vasturl = BB.getVASTUrl(your_placement_id); 
videoPlayer.setup({
"playlist": [{
"file": "https://www.w3schools.com/tags/mov_bbb.mp4"
}],
"height": 360,
"width": 640,
"advertising": {
"client": "googima",
"schedule": [{
"offset": "pre",
"tag": vasturl                  
}]
}
});
</script>
</body>
</html>

最新更新