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