javascript - 如何在JW Player中添加大量广告
首先,您需要满足以下两个要求:
- 一个开发者或企业许可证(包括广告牌)
- 您的Bebi展示位置ID
其次,此代码应在JW Player的片头广告时段内加载您的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>