mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Enhance BigVideoLive handling with additional user feedback messages and improve Shorts player iframe interaction
This commit is contained in:
parent
a236991b34
commit
b9288420e2
3 changed files with 24 additions and 17 deletions
|
@ -1,21 +1,25 @@
|
|||
<?php
|
||||
if ($obj->BigVideoLiveForLoggedUsersOnly) {
|
||||
if (!User::isLogged()) {
|
||||
echo '<!-- BigVideoLive is disabled for non-logged users -->';
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
if ($obj->BigVideoLive->value == Gallery::BigVideoLiveDisabled) {
|
||||
echo '<!-- BigVideoLive is disabled -->';
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($obj->BigVideoLiveOnFirstPageOnly && (!isFirstPage() || !empty($_GET['catName']) || !empty($_GET['showOnly']) || !empty($_GET['tags_id']))) {
|
||||
echo '<!-- BigVideoLive is disabled on this page -->';
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($obj->BigVideoLive->value == Gallery::BigVideoLiveShowLiveOnly) {
|
||||
$liveVideo = Live::getLatest(true);
|
||||
if (empty($liveVideo)) {
|
||||
echo '<!-- BigVideoLive is disabled because there is no live video -->';
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ saveRequestVars();
|
|||
if (empty($_GET['search']) && !isInfiniteScroll()) {
|
||||
$include = AVideoPlugin::getBigVideoIncludeFile();
|
||||
if (!empty($include)) {
|
||||
echo '<!-- BigVideoIncludeFile: ' . $include . ' -->';
|
||||
include $include;
|
||||
} else {
|
||||
if ($obj->showLivesAboveBigVideo) {
|
||||
|
@ -46,6 +47,8 @@ saveRequestVars();
|
|||
}
|
||||
include $global['systemRootPath'] . 'plugin/Gallery/view/BigVideoLive.php';
|
||||
}
|
||||
}else{
|
||||
echo '<!-- BigVideoLive is not included because search is enabled -->';
|
||||
}
|
||||
//var_dump(!empty($video), debug_backtrace());exit;
|
||||
if (!empty($video)) {
|
||||
|
|
|
@ -200,8 +200,8 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
|||
<script>
|
||||
function shareCarouselShorts() {
|
||||
$('.ShortsPlayerOverlay').hide();
|
||||
if (iframe && iframe[0] && iframe[0].contentWindow) {
|
||||
iframe[0].contentWindow.postMessage('togglePlayerSocial', '*');
|
||||
if ($('.ShortsPlayerIframe').length) {
|
||||
$('.ShortsPlayerIframe')[0].contentWindow.postMessage('togglePlayerSocial', '*');
|
||||
} else {
|
||||
if (typeof togglePlayerSocial === 'function') {
|
||||
togglePlayerSocial();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue