如何使用 videojs huge-vpaid 插件跟踪广告印象?广告开始时总是会触发广告展示?有没有办法跟踪广告持续时间事件?(第一四分位、第二等)VPAID 广告的跟踪事件会有所不同吗?
这是我的代码示例:
</head>
<body>
<video id="example_video_1" class="video-js vjs-default-skin"
controls="" preload="none" width="300" height="300"
poster="http://vjs.zencdn.net/v/oceans.png">
</video>
<script>
var player;
$(document).ready(function() {
player = videojs('example_video_1', {
techOrder: ['html5','flash'],
//autoplay: true,
sources: [{
type: "video/mp4",
src: "http://vjs.zencdn.net/v/oceans.mp4"
}],
plugins: {
vastClient: {
adTagUrl: "http://ssp.lkqd.net/ad?pid=2000&sid=20497&env=3&format=1&width=[WIDTH]&height=[HEIGHT]&dnt=[DO_NOT_TRACK]&output=vast&rnd=[CACHEBUSTER]&pageurl=[URL_ENCODED_PAGEURL]",
adsCancelTimeout: 3000,
adsEnabled: true
}
}
});
player.on('vast.adStart', function () {
});
player.on('vast.contentEnd', function () {
});
});
</script>
</body>
</html>