mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +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) {
|
if (playerIsReady() && player.ima) {
|
||||||
try {
|
try {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
console.log('reloadAdsIfIsReady change to ', _adTagUrl);
|
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.changeAdTag(_adTagUrl);
|
||||||
player.ima.requestAds();
|
player.ima.requestAds();
|
||||||
|
}
|
||||||
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log('reloadAdsIfIsReady ERROR', e.message);
|
console.log('reloadAdsIfIsReady ERROR', e.message);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue