1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00

Merge origin/master

Conflicts:
	view/js/script.js
This commit is contained in:
daniel 2020-01-13 21:27:16 -03:00
commit ee5a685cc4
9281 changed files with 7 additions and 214 deletions

View file

@ -473,10 +473,12 @@ function inIframe() {
return true;
}
}
var promisePlayTimeoutTime = 0;
var promisePlayTimeout;
var promisePlay;
var promisePlay;
function playerPlay(currentTime) {
if (typeof player !== 'undefined') {
promisePlayTimeoutTime+=1000;
if (currentTime) {
player.currentTime(currentTime);
}
@ -487,7 +489,7 @@ function playerPlay(currentTime) {
promisePlayTimeout = setTimeout(function () {
console.log("playerPlay: Promise is Pending, try again");
playerPlay(currentTime);
}, 1000);
}, promisePlayTimeoutTime);
console.log("playerPlay: promise found");
console.log(promisePlay);
promisePlay.then(function () {
@ -505,13 +507,13 @@ function playerPlay(currentTime) {
console.log("playerPlay: promise Undefined");
playerPlay(currentTime);
}
}, 1000);
}, promisePlayTimeoutTime);
}
} catch (e) {
console.log("playerPlay: We could not autoplay, trying again in 1 second");
setTimeout(function () {
playerPlay(currentTime);
}, 1000);
}, promisePlayTimeoutTime);
}
} else {
console.log("playerPlay: Player is Undefined");