mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Update
This commit is contained in:
parent
244032235d
commit
7320361b6b
3 changed files with 8 additions and 8 deletions
|
@ -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',
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue