mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +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());
|
||||
}
|
||||
|
||||
var setPlayerLoopSetTimeout;
|
||||
function setPlayerLoop(loop) {
|
||||
clearTimeout(setPlayerLoopSetTimeout);
|
||||
if(typeof player === 'undefined'){
|
||||
setPlayerLoopSetTimeout = setTimeout(function(){setPlayerLoop(loop)},1000);
|
||||
return false;
|
||||
}
|
||||
if (loop) {
|
||||
console.log("Loop ON");
|
||||
$.toast("Loop ON");
|
||||
|
@ -690,7 +696,7 @@ function toogleImageLoop(t) {
|
|||
function isPlayerLoop() {
|
||||
var loop = Cookies.get('playerLoop');
|
||||
if (!loop || loop === "false") {
|
||||
return false;
|
||||
return player.loop();
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue