mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 02:09:22 +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 (!empty($_GET['videoName']) || !empty($_GET['u']) || !empty($_GET['evideo']) || !empty($_GET['playlists_id'])) {
|
||||||
if ($obj->showLoopButton && !isLive()) {
|
if ($obj->showLoopButton && !isLive()) {
|
||||||
$js .= "<script src=\"{$global['webSiteRootURL']}plugin/PlayerSkins/loopbutton.js\"></script>";
|
$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) {
|
if ($obj->showLogoOnEmbed && isEmbed() || $obj->showLogo) {
|
||||||
$title = $config->getWebSiteTitle();
|
$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 () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
var Button = videojs.getComponent('Button');
|
var Button = videojs.getComponent('Button');
|
||||||
|
|
|
@ -650,6 +650,7 @@ function tooglePlayerLoop() {
|
||||||
function setPlayerLoop(loop) {
|
function setPlayerLoop(loop) {
|
||||||
if (loop) {
|
if (loop) {
|
||||||
console.log("Loop ON");
|
console.log("Loop ON");
|
||||||
|
$.toast("Loop ON");
|
||||||
player.loop(1);
|
player.loop(1);
|
||||||
$(".loop-button").removeClass('loop-disabled-button');
|
$(".loop-button").removeClass('loop-disabled-button');
|
||||||
$(".loop-button, .loopButton").addClass('fa-spin');
|
$(".loop-button, .loopButton").addClass('fa-spin');
|
||||||
|
@ -657,6 +658,7 @@ function setPlayerLoop(loop) {
|
||||||
$(".loop-button").addClass('loop-disabled-button');
|
$(".loop-button").addClass('loop-disabled-button');
|
||||||
$(".loop-button, .loopButton").removeClass('fa-spin');
|
$(".loop-button, .loopButton").removeClass('fa-spin');
|
||||||
console.log("Loop OFF");
|
console.log("Loop OFF");
|
||||||
|
$.toast("Loop OFF");
|
||||||
player.loop(0);
|
player.loop(0);
|
||||||
}
|
}
|
||||||
Cookies.set('playerLoop', loop, {
|
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() {
|
function isPlayerLoop() {
|
||||||
var loop = Cookies.get('playerLoop');
|
var loop = Cookies.get('playerLoop');
|
||||||
if (!loop || loop === "false") {
|
if (!loop || loop === "false") {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue