1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
Daniel Neto 2024-10-29 17:09:56 -03:00
parent 244032235d
commit 7320361b6b
3 changed files with 8 additions and 8 deletions

View file

@ -4031,15 +4031,15 @@ function openFullscreenVideo(url, urlBar) {
fullscreenIframe.appendTo('body');
}
function addCloseButtonInVideo() {
function addCloseButtonInVideo(forceButton = false) {
try {
// If either function exists, add a close button inside videojs
if (window.self !== window.top) {
if (window.self !== window.top || forceButton) {
if (typeof player !== 'object') {
setTimeout(function () { addCloseButtonInVideo(); }, 2000);
setTimeout(function () { addCloseButtonInVideo(forceButton); }, 2000);
return false;
}
addCloseButton($(player.el()));
addCloseButton($(player.el()), forceButton);
}
} catch (error) {
@ -4066,9 +4066,9 @@ function closeFullScreenOrHistoryBack(){
}
}
function addCloseButton(elementToAppend) {
function addCloseButton(elementToAppend, forceButton = false) {
// If either function exists, add a close button inside videojs
if (window.self !== window.top) {
if (window.self !== window.top || forceButton) {
var closeButton = $('<button>', {
'id': 'CloseButtonInVideo',
});