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

Play Playlist autoplay fix

This commit is contained in:
DanieL 2022-03-22 14:39:26 -03:00
parent 43e4d3d07e
commit f5e1ec8be1

View file

@ -1319,15 +1319,21 @@ function avideoModalIframeFullScreen(url) {
} }
function avideoModalIframeFullScreenClose() { function avideoModalIframeFullScreenClose() {
$('.swal-overlay iframe').attr('src', 'about:blank'); if(typeof swal === 'function'){
swal.close(); $('.swal-overlay iframe').attr('src', 'about:blank');
try {
swal.close();
} catch (e) {
}
}
} }
// this is to make sure when the use click on the back page button it will close the iframe // this is to make sure when the use click on the back page button it will close the iframe
window.onload = function () { window.onload = function () {
if (typeof history.pushState === "function") { if (typeof history.pushState === "function") {
console.log('history.pushState loaded'); console.log('history.pushState loaded');
window.onpopstate = function () { window.onpopstate = function (e) {
console.log('onpopstate'); console.log('onpopstate', e.state, history.state);
avideoModalIframeFullScreenClose(); avideoModalIframeFullScreenClose();
}; };
} }
@ -1353,6 +1359,7 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
} }
url = addGetParam(url, 'avideoIframe', 1); url = addGetParam(url, 'avideoIframe', 1);
console.log('avideoModalIframeWithClassName',url, className, updateURL);
var html = ''; var html = '';
html = '<div id="avideoModalIframeDiv" class="clearfix popover-title">'; html = '<div id="avideoModalIframeDiv" class="clearfix popover-title">';
html += '<button class="btn btn-default pull-left" onclick="avideoModalIframeFullScreenClose();">'; html += '<button class="btn btn-default pull-left" onclick="avideoModalIframeFullScreenClose();">';
@ -2018,7 +2025,7 @@ function readFileCroppie(input, crop) {
function getCroppie(uploadCropObject, callback, width, height) { function getCroppie(uploadCropObject, callback, width, height) {
console.log('getCroppie 1', uploadCropObject); console.log('getCroppie 1', uploadCropObject);
var ret = uploadCropObject.croppie('result', {type: 'base64', size: {width: width, height: height}, format: 'png'}).then(function (resp) { var ret = uploadCropObject.croppie('result', {type: 'base64', size: {width: width, height: height}, format: 'png'}).then(function (resp) {
console.log('getCroppie 2 ' + callback, resp); //console.log('getCroppie 2 ' + callback, resp);
eval(callback + "(resp);"); eval(callback + "(resp);");
}).catch(function (err) { }).catch(function (err) {
console.log('cropieError getCroppie => ' + callback, err); console.log('cropieError getCroppie => ' + callback, err);