1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Do not pause if is playing ads on mobile

look like the mobile does not know if is playing ads
This commit is contained in:
DanielnetoDotCom 2021-03-28 12:15:43 -03:00
parent 51d8b22464
commit d6f202c94b

View file

@ -1064,8 +1064,8 @@ function playerHasAds() {
return ($("#mainVideo_ima-ad-container").length > 0);
}
function pauseIfIsPlayinAds() {
if (!player.paused() && playerHasAds() && playerIsPlayingAds()) {
function pauseIfIsPlayinAds() { // look like the mobile does not know if is playing ads
if (!isMobile() && !player.paused() && playerHasAds() && playerIsPlayingAds()) {
player.pause();
}
}