mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Some updates regarding autoplay and loop
https://github.com/WWBN/AVideo/issues/3699
This commit is contained in:
parent
515fb52c75
commit
9f6394f3b0
1 changed files with 7 additions and 1 deletions
|
@ -647,7 +647,13 @@ function tooglePlayerLoop() {
|
||||||
setPlayerLoop(!isPlayerLoop());
|
setPlayerLoop(!isPlayerLoop());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var setPlayerLoopSetTimeout;
|
||||||
function setPlayerLoop(loop) {
|
function setPlayerLoop(loop) {
|
||||||
|
clearTimeout(setPlayerLoopSetTimeout);
|
||||||
|
if(typeof player === 'undefined'){
|
||||||
|
setPlayerLoopSetTimeout = setTimeout(function(){setPlayerLoop(loop)},1000);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (loop) {
|
if (loop) {
|
||||||
console.log("Loop ON");
|
console.log("Loop ON");
|
||||||
$.toast("Loop ON");
|
$.toast("Loop ON");
|
||||||
|
@ -690,7 +696,7 @@ function toogleImageLoop(t) {
|
||||||
function isPlayerLoop() {
|
function isPlayerLoop() {
|
||||||
var loop = Cookies.get('playerLoop');
|
var loop = Cookies.get('playerLoop');
|
||||||
if (!loop || loop === "false") {
|
if (!loop || loop === "false") {
|
||||||
return false;
|
return player.loop();
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue