mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
Fix ads on playlists
This commit is contained in:
parent
79463cd729
commit
f105ce0481
1 changed files with 9 additions and 3 deletions
|
@ -242,9 +242,15 @@ function reloadAds() {
|
|||
if (playerIsReady() && player.ima) {
|
||||
try {
|
||||
setTimeout(function () {
|
||||
console.log('reloadAdsIfIsReady change to ', _adTagUrl);
|
||||
player.ima.changeAdTag(_adTagUrl);
|
||||
player.ima.requestAds();
|
||||
if (!player.ima.getAdsManager()) {
|
||||
console.log('reloadAdsIfIsReady 1 change to ', _adTagUrl);
|
||||
player.ima.requestAds();
|
||||
}else{
|
||||
console.log('reloadAdsIfIsReady 1 change to ', _adTagUrl);
|
||||
player.ima.changeAdTag(_adTagUrl);
|
||||
player.ima.requestAds();
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
} catch (e) {
|
||||
console.log('reloadAdsIfIsReady ERROR', e.message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue