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
b405e10485
commit
d3a467e15f
1 changed files with 4 additions and 2 deletions
|
@ -240,8 +240,6 @@ function reloadAds() {
|
|||
clearTimeout(_reloadAdsTimeout);
|
||||
console.log('reloadAds');
|
||||
if (player && player.ima) {
|
||||
console.log('reloadAdsIfIsReady change to ', _adTagUrl);
|
||||
player.ima.changeAdTag(_adTagUrl);
|
||||
reloadAdsIfIsReady();
|
||||
} else {
|
||||
_reloadAdsTimeout = setTimeout(function () {
|
||||
|
@ -255,6 +253,10 @@ function reloadAdsIfIsReady() {
|
|||
console.log('reloadAdsIfIsReady player.readyState() = ' + player.readyState());
|
||||
if (!player.paused()) {
|
||||
try {
|
||||
setTimeout(function () {
|
||||
console.log('reloadAdsIfIsReady change to ', _adTagUrl);
|
||||
player.ima.changeAdTag(_adTagUrl);
|
||||
}, 500);
|
||||
setTimeout(function () {
|
||||
//player.ima.initializeAdDisplayContainer();
|
||||
player.ima.requestAds();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue