1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Only pause player if it is not ios

This commit is contained in:
Daniel Neto 2025-02-25 13:19:48 -03:00
parent 33c10b415a
commit b483a9cbc9
2 changed files with 8 additions and 2 deletions

View file

@ -47,7 +47,9 @@ player.on('adsready', function () {
console.log('ADS: IMA SDK: vmap_ad_scheduler: Ad started.');
logAdEvent('AdStarted');
clearTimeout(adsResumePlayerTimeout);
if(!isIOS()){
player.pause();
}
});
adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE, function () {

View file

@ -4544,3 +4544,7 @@ function getVideosId() {
}
return 0;
}
function isIOS() {
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
}