mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 02:39:46 +02:00
Update
This commit is contained in:
parent
26d71e513a
commit
cda6a27ca9
9 changed files with 147 additions and 163 deletions
|
@ -39,6 +39,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
'useFFMPEGToGenerateThumbs',
|
||||
'makeVideosInactiveAfterEncode',
|
||||
'makeVideosUnlistedAfterEncode',
|
||||
'embedBackgroundColor',
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -70,7 +71,6 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
'doNotShowEncoderButton',
|
||||
'encoderButtonLabel',
|
||||
'doNotShowEmbedButton',
|
||||
'embedBackgroundColor',
|
||||
'embedButtonLabel',
|
||||
'embedCodeTemplate',
|
||||
'embedCodeTemplateObject',
|
||||
|
|
|
@ -89,11 +89,6 @@ $objectToReturnToParentIframe->posterURL = $poster;
|
|||
margin: 0 !important;
|
||||
overflow:hidden;
|
||||
}
|
||||
<?php
|
||||
if (!empty($customizedAdvanced->embedBackgroundColor)) {
|
||||
echo "body {background-color: $customizedAdvanced->embedBackgroundColor;}";
|
||||
}
|
||||
?>
|
||||
</style>
|
||||
<script>
|
||||
var webSiteRootURL = '<?php echo $global['webSiteRootURL']; ?>';
|
||||
|
|
|
@ -68,11 +68,6 @@ $poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id'],
|
|||
margin: 0 !important;
|
||||
overflow:hidden;
|
||||
}
|
||||
<?php
|
||||
if (!empty($customizedAdvanced->embedBackgroundColor)) {
|
||||
echo "body {background-color: $customizedAdvanced->embedBackgroundColor;}";
|
||||
}
|
||||
?>
|
||||
</style>
|
||||
<script>
|
||||
var webSiteRootURL = '<?php echo $global['webSiteRootURL']; ?>';
|
||||
|
|
|
@ -73,12 +73,6 @@ $poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id'],
|
|||
body {
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
<?php
|
||||
if (!empty($customizedAdvanced->embedBackgroundColor)) {
|
||||
echo "background-color: $customizedAdvanced->embedBackgroundColor;";
|
||||
}
|
||||
?>
|
||||
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
|
|
@ -5,7 +5,8 @@ if(!empty($_REQUEST['Chat']) || preg_match('/plugin.Chat2/', $uri)){
|
|||
}
|
||||
_session_start();
|
||||
if (!function_exists('getColorValue')) {
|
||||
function getColorValue($requestKey) {
|
||||
function getColorValue($requestKey)
|
||||
{
|
||||
if (!empty($_REQUEST[$requestKey])) {
|
||||
$_SESSION[$requestKey] = $_REQUEST[$requestKey];
|
||||
return substr($_REQUEST[$requestKey], 10, 6);
|
||||
|
@ -33,85 +34,104 @@ $textColorDark = getColorValue('textColorDark');
|
|||
$textColorHigh = getColorValue('textColorHigh');
|
||||
?>
|
||||
<style>
|
||||
#CloseButtonInVideo, .offline-button, .loop-button,.autoplay-button {
|
||||
<?php if (isAVideoMobileApp()) : ?>
|
||||
#CloseButtonInVideo,
|
||||
.offline-button,
|
||||
.loop-button,
|
||||
.autoplay-button {
|
||||
display: none !important;
|
||||
}
|
||||
/* Overwrite Bootstrap styles <?php echo $uri; ?> */
|
||||
<?php if ($bgColor): ?>
|
||||
body,
|
||||
.table>thead>tr>td,
|
||||
.table>thead>tr>th,
|
||||
.btn-default,
|
||||
.alert, .row,
|
||||
.bootgrid-table td.loading,
|
||||
.bootgrid-table td.no-results,
|
||||
.modal-content, .list-group-item, .dropdown-menu, .well, .panel-default {
|
||||
background-color: #<?php echo $bgColor; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($bgColor1): ?>
|
||||
.panel, .panel-default>.panel-heading,
|
||||
/* Overwrite Bootstrap styles <?php echo $uri; ?> */
|
||||
<?php if ($bgColor) : ?>body,
|
||||
.table>thead>tr>td,
|
||||
.table>thead>tr>th,
|
||||
.btn-default,
|
||||
.alert,
|
||||
.row,
|
||||
.bootgrid-table td.loading,
|
||||
.bootgrid-table td.no-results,
|
||||
.modal-content,
|
||||
.list-group-item,
|
||||
.dropdown-menu,
|
||||
.well,
|
||||
.panel-default {
|
||||
background-color: #<?php echo $bgColor; ?> !important;
|
||||
}
|
||||
|
||||
<?php endif; ?><?php if ($bgColor1) : ?>.panel,
|
||||
.panel-default>.panel-heading,
|
||||
.table,
|
||||
.btn-primary,
|
||||
.alert-info,
|
||||
.table-striped>tbody>tr:hover {
|
||||
background-color: #<?php echo $bgColor1; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($bgColor2): ?>
|
||||
.panel-footer,
|
||||
<?php endif; ?><?php if ($bgColor2) : ?>.panel-footer,
|
||||
.table>tfoot>tr>th,
|
||||
.btn-success,
|
||||
.alert-success,
|
||||
.table-striped>tbody>tr:nth-of-type(odd) {
|
||||
background-color: #<?php echo $bgColor2; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($bgColorAppBar): ?>
|
||||
.panel-danger,
|
||||
<?php endif; ?><?php if ($bgColorAppBar) : ?>.panel-danger,
|
||||
.btn-danger,
|
||||
.alert-danger, .nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
|
||||
.alert-danger,
|
||||
.nav-tabs>li.active>a,
|
||||
.nav-tabs>li.active>a:focus,
|
||||
.nav-tabs>li.active>a:hover {
|
||||
background-color: #<?php echo $bgColorAppBar; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($bgColorAppBarDarker): ?>
|
||||
.panel-warning,
|
||||
<?php endif; ?><?php if ($bgColorAppBarDarker) : ?>.panel-warning,
|
||||
.btn-warning,
|
||||
.alert-warning,.img-thumbnail, .navbar-default, .dropdown-menu>li>a:focus,
|
||||
.dropdown-menu>li>a:hover, .nav-tabs>li>a:hover, .panel-heading, .swal-modal, .popover-title {
|
||||
.alert-warning,
|
||||
.img-thumbnail,
|
||||
.navbar-default,
|
||||
.dropdown-menu>li>a:focus,
|
||||
.dropdown-menu>li>a:hover,
|
||||
.nav-tabs>li>a:hover,
|
||||
.panel-heading,
|
||||
.swal-modal,
|
||||
.popover-title {
|
||||
background-color: #<?php echo $bgColorAppBarDarker; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($textColor): ?>
|
||||
.panel-default>.panel-heading,
|
||||
<?php endif; ?><?php if ($textColor) : ?>.panel-default>.panel-heading,
|
||||
.table>thead>tr>th,
|
||||
.btn-default,
|
||||
.alert, .list-group-item, .dropdown-menu, .dropdown-menu>li>a {
|
||||
.alert,
|
||||
.list-group-item,
|
||||
.dropdown-menu,
|
||||
.dropdown-menu>li>a {
|
||||
color: #<?php echo $textColor; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($textColorDark): ?>
|
||||
.panel,
|
||||
<?php endif; ?><?php if ($textColorDark) : ?>.panel,
|
||||
.table,
|
||||
.btn-primary,
|
||||
.alert-info, .nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover,
|
||||
.nav-tabs>li>a:hover, .swal-title, .swal-text, .swal-footer {
|
||||
.alert-info,
|
||||
.nav-tabs>li.active>a,
|
||||
.nav-tabs>li.active>a:focus,
|
||||
.nav-tabs>li.active>a:hover,
|
||||
.nav-tabs>li>a:hover,
|
||||
.swal-title,
|
||||
.swal-text,
|
||||
.swal-footer {
|
||||
color: #<?php echo $textColorDark; ?> !important;
|
||||
}
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($textColorHigh): ?>
|
||||
.panel-footer,
|
||||
<?php endif; ?><?php if ($textColorHigh) : ?>.panel-footer,
|
||||
.table>tfoot>tr>th,
|
||||
.btn-success,
|
||||
.alert-success, .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover {
|
||||
.alert-success,
|
||||
.dropdown-menu>li>a:focus,
|
||||
.dropdown-menu>li>a:hover {
|
||||
color: #<?php echo $textColorHigh; ?> !important;
|
||||
}
|
||||
|
||||
<?php endif; ?>
|
||||
</style>
|
|
@ -171,12 +171,6 @@ PlayerSkins::getStartPlayerJS($str);
|
|||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
overflow: hidden;
|
||||
<?php
|
||||
if (!empty($customizedAdvanced->embedBackgroundColor)) {
|
||||
echo "background-color: $customizedAdvanced->embedBackgroundColor !important;";
|
||||
}
|
||||
?>
|
||||
|
||||
}
|
||||
.vjs-control-bar{
|
||||
z-index: 1;
|
||||
|
|
|
@ -114,6 +114,8 @@ if (!isVideo()) {
|
|||
$metaDescription .= getSEOComplement(["addAutoPrefix" => false]);
|
||||
$metaDescription = getSEODescription($metaDescription);
|
||||
echo '<meta name="description" content="' . $metaDescription . '">';
|
||||
}else if(isEmbed()){
|
||||
echo '<style>body{background-color: #000;}</style>';
|
||||
}
|
||||
//var_dump($metaDescription);var_dump(debug_backtrace());exit;
|
||||
if (empty($advancedCustom->disableAnimations)) {
|
||||
|
|
|
@ -889,7 +889,7 @@ function playNext(url) {
|
|||
webSocketVideos_id = mediaId;
|
||||
$('video, #mainVideo').attr('poster', response.poster);
|
||||
player.poster(response.poster);
|
||||
history.pushState(null, null, url);
|
||||
avideoPushState(url);
|
||||
$('.topInfoTitle, title').text(response.title);
|
||||
$('#topInfo img').attr('src', response.userPhoto);
|
||||
$('#topInfo a').attr('href', response.url);
|
||||
|
@ -1319,12 +1319,25 @@ function avideoAlertHTMLText(title, msg, type) {
|
|||
}
|
||||
|
||||
function avideoModalIframeClose() {
|
||||
//console.log('avideoModalIframeClose');
|
||||
if (fullscreenIframe) {
|
||||
fullscreenIframe.remove();
|
||||
fullscreenIframe = null;
|
||||
$('body').removeClass('fullscreen');
|
||||
|
||||
// Revert the browser's address bar to the original URL
|
||||
if (originalURL) {
|
||||
history.pushState({}, null, originalURL);
|
||||
}
|
||||
} else {
|
||||
if (typeof swal === 'function') {
|
||||
$('.swal-overlay iframe').attr('src', 'about:blank');
|
||||
try {
|
||||
swal.close();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (inIframe()) {
|
||||
window.parent.swal.close();
|
||||
|
@ -1334,6 +1347,14 @@ function avideoModalIframeClose() {
|
|||
}
|
||||
}
|
||||
|
||||
function avideoModalIframeFullScreenClose() {
|
||||
avideoModalIframeClose();
|
||||
}
|
||||
|
||||
function closeFullscreenVideo() {
|
||||
avideoModalIframeClose();
|
||||
}
|
||||
|
||||
function avideoModalIframeCloseToastSuccess(msg) {
|
||||
avideoModalIframeClose();
|
||||
avideoToastSuccess(msg);
|
||||
|
@ -1399,33 +1420,6 @@ function avideoModalIframeFullScreenMaximize() {
|
|||
$('.swal-modal-iframe-full-with-minimize').closest('.swal-overlay').removeClass('swal-offline-video-compress');
|
||||
}
|
||||
|
||||
function avideoModalIframeFullScreenClose() {
|
||||
if (typeof swal === 'function') {
|
||||
$('.swal-overlay iframe').attr('src', 'about:blank');
|
||||
try {
|
||||
/*
|
||||
$('.swal-overlay').slideUp();
|
||||
setTimeout(function(){
|
||||
swal.close();
|
||||
},500);
|
||||
*/
|
||||
swal.close();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// this is to make sure when the use click on the back page button it will close the iframe
|
||||
window.onload = function () {
|
||||
if (typeof history.pushState === "function") {
|
||||
////console.log('history.pushState loaded');
|
||||
window.onpopstate = function (e) {
|
||||
////console.log('onpopstate', e.state, history.state);
|
||||
avideoModalIframeFullScreenClose();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function avideoModalIframeFull(url) {
|
||||
avideoModalIframeFullScreen(url);
|
||||
}
|
||||
|
@ -1574,11 +1568,18 @@ function avideoModalIframeWithClassName(url, className, updateURL) {
|
|||
}
|
||||
|
||||
function avideoPushState(url) {
|
||||
window.history.pushState("", "", url);
|
||||
if (!validURL(url)) {
|
||||
return false;
|
||||
}
|
||||
window.history.pushState(null, null, url);
|
||||
if (typeof parent.updatePageSRC == 'funciton') {
|
||||
console.log('avideoPushState', url);
|
||||
parent.updatePageSRC(url);
|
||||
}
|
||||
// Then we set up the popstate event listener
|
||||
window.onpopstate = function(event) {
|
||||
avideoModalIframeClose();
|
||||
};
|
||||
}
|
||||
|
||||
function checkIframeLoaded(id) {
|
||||
|
@ -3054,7 +3055,7 @@ async function _alertFromGet(type) {
|
|||
break;
|
||||
}
|
||||
var url = removeGetParam(window.location.href, type);
|
||||
window.history.pushState({}, document.title, url);
|
||||
avideoPushState(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3885,8 +3886,13 @@ let fullscreenIframe;
|
|||
let originalURL; // to store the original URL
|
||||
|
||||
function openFullscreenVideosId(videos_id) {
|
||||
var url = webSiteRootURL + 'video/' + videos_id + '/-';
|
||||
openFullscreenVideo(url, url);
|
||||
}
|
||||
|
||||
function openFullscreenEmbedVideosId(videos_id) {
|
||||
var url = webSiteRootURL + 'videoEmbed/' + videos_id + '/-';
|
||||
var urlBar = webSiteRootURL + 'v/' + videos_id + '/-';
|
||||
var urlBar = webSiteRootURL + 'video/' + videos_id + '/-';
|
||||
openFullscreenVideo(url, urlBar);
|
||||
}
|
||||
|
||||
|
@ -3921,28 +3927,11 @@ function openFullscreenVideo(url, urlBar) {
|
|||
'background-color': 'black'
|
||||
});
|
||||
|
||||
if (validURL(url)) {
|
||||
window.history.pushState(null, null, urlBar);
|
||||
}
|
||||
avideoPushState(urlBar);
|
||||
// Append the iframe to the body
|
||||
fullscreenIframe.appendTo('body');
|
||||
}
|
||||
|
||||
function closeFullscreenVideo() {
|
||||
if (fullscreenIframe) {
|
||||
fullscreenIframe.remove();
|
||||
fullscreenIframe = null;
|
||||
$('body').removeClass('fullscreen');
|
||||
|
||||
// Revert the browser's address bar to the original URL
|
||||
if (originalURL) {
|
||||
history.pushState({}, null, originalURL);
|
||||
}
|
||||
} else {
|
||||
swal.close();
|
||||
}
|
||||
}
|
||||
|
||||
function addCloseButtonInVideo() {
|
||||
try {
|
||||
// If either function exists, add a close button inside videojs
|
||||
|
|
|
@ -209,11 +209,6 @@ if (User::hasBlockedUser($video['users_id'])) {
|
|||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
overflow: hidden;
|
||||
<?php
|
||||
if (!empty($customizedAdvanced->embedBackgroundColor)) {
|
||||
echo "background-color: $customizedAdvanced->embedBackgroundColor !important;";
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
||||
.video-js {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue