1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Play playlist inside image thumbs

This commit is contained in:
DanieL 2022-04-21 15:14:40 -03:00
parent 3b046e9999
commit 1607cd6af3
3 changed files with 34 additions and 14 deletions

View file

@ -2,8 +2,6 @@
if (!isset($global['systemRootPath'])) {
require_once '../../videos/configuration.php';
}
$isSerie = 1;
$isPlayList = true;
require_once $global['systemRootPath'] . 'objects/playlist.php';
require_once $global['systemRootPath'] . 'plugin/PlayLists/PlayListElement.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
@ -42,23 +40,22 @@ if (!empty($video['id'])) {
if (empty($playList)) {
videoNotFound('');
}
$videos = array();
foreach ($playList as $key => $value) {
$videos[$key] = $value;
$videos[$key]['id'] = $value['videos_id'];
}
?>
<!DOCTYPE html>
<html lang="<?php echo $_SESSION['language']; ?>">
<head>
<title><?php echo $playListObj->getName() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?></title>
<link href="<?php echo getURL('node_modules/video.js/dist/video-js.min.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php echo getURL('view/css/social.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php echo getURL('plugin/Gallery/style.css'); ?>" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('plugin/Gallery/script.js'); ?>" type="text/javascript"></script>
<?php include $global['systemRootPath'] . 'view/include/head.php'; ?>
<?php
if (!empty($video['id'])) {
getLdJson($video['id']);
getItemprop($video['id']);
}
?>
<style>
.clearfix {
margin-bottom: 10px;
@ -74,9 +71,9 @@ if (empty($playList)) {
if (!empty($playList)) {
//createGallerySection($videos, $crc = "", $get = array(), $ignoreAds = false, $screenColsLarge = 0, $screenColsMedium = 0, $screenColsSmall = 0, $screenColsXSmall = 0, $galeryDetails = true)
if(isMobile()){
createGallerySection($playList, uniqid(), array(), true,6, 4, 2, 1, false);
createGallerySection($videos, uniqid(), array(), true,6, 4, 2, 1, false);
}else{
createGallerySection($playList, uniqid(), array(), true,6, 6, 4, 2, false);
createGallerySection($videos, uniqid(), array(), true,6, 6, 4, 2, false);
}
} ?>
</div>
@ -88,7 +85,10 @@ if (empty($playList)) {
$(document).ready(function () {
$('.galleryLink').click(function(event){
event.preventDefault();
avideoModalIframeFull($(this).attr('alternativeLink'));
//avideoModalIframeFull($(this).attr('alternativeLink'));
var url = $(this).attr('embed');
url = addGetParam(url, 'controls', -1);
avideoAddIframeIntoElement(this, url, '.aspectRatio16_9');
});
});
</script>

View file

@ -1233,4 +1233,11 @@ a:hover{
.infoDetails{
display: flex;
margin: 4px 0;
}
.avideoIframeIntoElement{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

View file

@ -1351,6 +1351,21 @@ function avideoModalIframeFull(url) {
avideoModalIframeFullScreen(url);
}
function avideoAddIframeIntoElement(element, url, insideSelector) {
url = addGetParam(url, 'avideoIframe', 1);
console.log('avideoAddIframeIntoElement', url, element);
var html = '';
html += '<iframe frameBorder="0" class="avideoIframeIntoElement" src="' + url + '" allow="camera *;microphone *" ></iframe>';
var insideElement = $(element);
if(insideSelector){
insideElement = $(element).find(insideSelector);
}
insideElement.append(html);
}
var avideoModalIframeFullScreenOriginalURL = false;
var avideoModalIframeWithClassNameTimeout;
function avideoModalIframeWithClassName(url, className, updateURL) {
@ -2353,8 +2368,6 @@ function addAtMention(selector) {
});
}
$(document).ready(function () {
//animateChilds('#sideBarContainer > ul', 'animate__bounceInLeft', 0.05);
//animateChilds('#uploadMenu', 'animate__bounceIn', 0.05);