Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 播放视频广告
playVideoAd () {
this.setAdInterval()
this.player.play()
}
// 暂停视频广告
pauseVideoAd () {
this.clearAdInterval()
this.player.pause()
}
}
let defaultComponent = VideoAdComponent
if (device.mobile()) {
defaultComponent = MbVideoAdComponent
}
export default defaultComponent
manyVideoAd_ele.play()
manyVideoAd_ele.addEventListener('ended', function(event) {
let flag = self.playNext(self)
//广告结束之后自动播放主视频
if(flag == '-1'){
document.getElementById('player-con').getElementsByTagName('video')[0].play()
let controlBar = document.querySelector('.prism-controlbar')
controlBar.className = controlBar.className.replace(' controlbar-element-hidden', '')
}
})
}
}
let defaultComponent = ManyVideoAdComponent
if (device.mobile()) {
defaultComponent = MbManyVideoAdComponent
}
export default defaultComponent
function isMobileBrowser() {
return device.mobile();
}