mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 17:59:55 +02:00
Some updates regarding autoplay and loop
https://github.com/WWBN/AVideo/issues/3699
This commit is contained in:
parent
c1a3266604
commit
515fb52c75
4 changed files with 21 additions and 18 deletions
BIN
plugin/AD_Server/view/adswarning.mp4
Normal file
BIN
plugin/AD_Server/view/adswarning.mp4
Normal file
Binary file not shown.
|
@ -110,6 +110,8 @@ class PlayerSkins extends PluginAbstract {
|
|||
if (!empty($_GET['videoName']) || !empty($_GET['u']) || !empty($_GET['evideo']) || !empty($_GET['playlists_id'])) {
|
||||
if ($obj->showLoopButton && !isLive()) {
|
||||
$js .= "<script src=\"{$global['webSiteRootURL']}plugin/PlayerSkins/loopbutton.js\"></script>";
|
||||
}else if(empty($obj->showLoopButton) && empty ($playerSkinsObj->contextMenuLoop)){
|
||||
$js .= "<script>setPlayerLoop(false);</script>";
|
||||
}
|
||||
if ($obj->showLogoOnEmbed && isEmbed() || $obj->showLogo) {
|
||||
$title = $config->getWebSiteTitle();
|
||||
|
|
|
@ -1,21 +1,3 @@
|
|||
|
||||
function setImageLoop() {
|
||||
if (isPlayerLoop()) {
|
||||
$('.loopButton').removeClass('opacityBtn');
|
||||
$('.loopButton').addClass('fa-spin');
|
||||
} else {
|
||||
$('.loopButton').addClass('opacityBtn');
|
||||
$('.loopButton').removeClass('fa-spin');
|
||||
}
|
||||
}
|
||||
|
||||
function toogleImageLoop(t) {
|
||||
tooglePlayerLoop();
|
||||
if (typeof setImageLoop === 'function') {
|
||||
setImageLoop();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
var Button = videojs.getComponent('Button');
|
||||
|
|
|
@ -650,6 +650,7 @@ function tooglePlayerLoop() {
|
|||
function setPlayerLoop(loop) {
|
||||
if (loop) {
|
||||
console.log("Loop ON");
|
||||
$.toast("Loop ON");
|
||||
player.loop(1);
|
||||
$(".loop-button").removeClass('loop-disabled-button');
|
||||
$(".loop-button, .loopButton").addClass('fa-spin');
|
||||
|
@ -657,6 +658,7 @@ function setPlayerLoop(loop) {
|
|||
$(".loop-button").addClass('loop-disabled-button');
|
||||
$(".loop-button, .loopButton").removeClass('fa-spin');
|
||||
console.log("Loop OFF");
|
||||
$.toast("Loop OFF");
|
||||
player.loop(0);
|
||||
}
|
||||
Cookies.set('playerLoop', loop, {
|
||||
|
@ -668,6 +670,23 @@ function setPlayerLoop(loop) {
|
|||
}
|
||||
}
|
||||
|
||||
function setImageLoop() {
|
||||
if (isPlayerLoop()) {
|
||||
$('.loopButton').removeClass('opacityBtn');
|
||||
$('.loopButton').addClass('fa-spin');
|
||||
} else {
|
||||
$('.loopButton').addClass('opacityBtn');
|
||||
$('.loopButton').removeClass('fa-spin');
|
||||
}
|
||||
}
|
||||
|
||||
function toogleImageLoop(t) {
|
||||
tooglePlayerLoop();
|
||||
if (typeof setImageLoop === 'function') {
|
||||
setImageLoop();
|
||||
}
|
||||
}
|
||||
|
||||
function isPlayerLoop() {
|
||||
var loop = Cookies.get('playerLoop');
|
||||
if (!loop || loop === "false") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue