1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
This commit is contained in:
Daniel Neto 2023-08-24 09:18:10 -03:00
parent ab656f4e43
commit d329a1d0ec

View file

@ -3923,20 +3923,28 @@ function closeFullscreenVideo() {
} }
function addCloseButtonInVideo() { function addCloseButtonInVideo() {
// If either function exists, add a close button inside videojs try {
if (typeof window.parent.closeFullscreenVideo === "function") { // If either function exists, add a close button inside videojs
if(typeof player !== 'object'){ if (typeof window.parent.closeFullscreenVideo === "function") {
setTimeout(function(){addCloseButtonInVideo();}, 2000); if(typeof player !== 'object'){
return false; setTimeout(function(){addCloseButtonInVideo();}, 2000);
return false;
}
addCloseButton($(player.el()));
} }
addCloseButton($(player.el())); } catch (error) {
} }
} }
function addCloseButtonInPage() { function addCloseButtonInPage() {
// If either function exists, add a close button inside videojs try {
if (typeof window.parent.closeFullscreenVideo === "function") { // If either function exists, add a close button inside videojs
addCloseButton($('body')); if (typeof window.parent.closeFullscreenVideo === "function") {
addCloseButton($('body'));
}
} catch (error) {
} }
} }