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:
parent
33c10b415a
commit
b483a9cbc9
2 changed files with 8 additions and 2 deletions
|
@ -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 () {
|
||||
|
|
|
@ -4544,3 +4544,7 @@ function getVideosId() {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function isIOS() {
|
||||
return /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue