mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Fix ads on playlists
This commit is contained in:
parent
313376dd7a
commit
5996156d13
1 changed files with 3 additions and 6 deletions
|
@ -247,15 +247,12 @@ function reloadAds() {
|
|||
} else {
|
||||
console.log('reloadAds 2 change to ', _adTagUrl);
|
||||
player.ima.changeAdTag(_adTagUrl);
|
||||
player.ima.pauseAd();
|
||||
_reloadAdsTimeout = setTimeout(function () {
|
||||
player.ima.pauseAd();
|
||||
}, 1000);
|
||||
}
|
||||
console.log('reloadAds ready state ', player.readyState());
|
||||
player.ima.requestAds();
|
||||
player.on('adsready', function () {
|
||||
console.log('reloadAds adisready ');
|
||||
player.ima.resumeAd();
|
||||
player.pause();
|
||||
});
|
||||
}, 1000);
|
||||
} catch (e) {
|
||||
console.log('reloadAds ERROR', e.message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue