mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
This commit is contained in:
parent
cdbee49407
commit
40b934c12d
16 changed files with 231 additions and 501 deletions
|
@ -6075,6 +6075,18 @@ function getLiveUsersLabel($viewsClass = "label label-default", $counterClass =
|
|||
return "";
|
||||
}
|
||||
|
||||
function getLiveUsersLabelHTML($viewsClass = "label label-default", $counterClass = "label label-primary") {
|
||||
global $global;
|
||||
ob_start();
|
||||
include $global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php';
|
||||
$htmlMediaTag = '<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);">';
|
||||
$htmlMediaTag .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
$htmlMediaTag .= getLiveUsersLabel($viewsClass, $counterClass);
|
||||
$htmlMediaTag .= '</div>';
|
||||
return $htmlMediaTag;
|
||||
}
|
||||
|
||||
function getHTMLTitle($titleArray) {
|
||||
global $config, $global;
|
||||
|
||||
|
|
|
@ -80,7 +80,6 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
$obj->useVideoIDOnSEOLinks = true;
|
||||
$obj->disableAnimatedGif = false;
|
||||
$obj->removeBrowserChannelLinkFromMenu = false;
|
||||
$obj->EnableWavesurfer = false;
|
||||
$obj->EnableMinifyJS = false;
|
||||
$obj->disableShareAndPlaylist = false;
|
||||
$obj->disableShareOnly = false;
|
||||
|
@ -208,7 +207,7 @@ class CustomizeAdvanced extends PluginAbstract {
|
|||
|
||||
public function getHelp() {
|
||||
if (User::isAdmin()) {
|
||||
return "<h2 id='CustomizeAdvanced help'>CustomizeAdvanced (admin)</h2><p>" . $this->getDescription() . "</p><table class='table'><tbody><tr><td>EnableWavesurfer</td><td>Enables the visualisation for audio. This will always download full audio first, so with big audio-files, you might better disable it.</td></tr><tr><td>commentsMaxLength</td><td>Maximum lenght for comments in videos</td></tr><tr><td>disableYoutubePlayerIntegration</td> <td>Disables the integrating of youtube-videos and just embed them.</td></tr><tr><td>EnableMinifyJS</td><td>Minify your JS. Clear videos/cache after changing this option.</td></tr></tbody></table>";
|
||||
return "<h2 id='CustomizeAdvanced help'>CustomizeAdvanced (admin)</h2><p>" . $this->getDescription() . "</p>";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -1,50 +1,25 @@
|
|||
<?php
|
||||
$_REQUEST['live_servers_id'] = Live::getLiveServersIdRequest();
|
||||
$poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id']);
|
||||
$posterURL = $global['webSiteRootURL'] . $poster . '?' . filectime($global['systemRootPath'] . $poster);
|
||||
?>
|
||||
<link href="<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/live.css" rel="stylesheet" type="text/css"/>
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="firstC col-sm-2 col-md-2"></div>
|
||||
<div class="secC col-sm-8 col-md-8">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs" onclick="closeFloatVideo();floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">
|
||||
<video poster="<?php echo $global['webSiteRootURL']; ?><?php echo $poster; ?>?<?php echo filectime($global['systemRootPath'] . $poster); ?>" controls playsinline webkit-playsinline="webkit-playsinline"
|
||||
<?php
|
||||
$playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
|
||||
$isLive = 1;
|
||||
?>
|
||||
<!-- Live -->
|
||||
<?php
|
||||
$htmlMediaTag = '<video poster="' . $posterURL . '" controls playsinline webkit-playsinline="webkit-playsinline"
|
||||
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered liveVideo vjs-16-9"
|
||||
id="mainVideo">
|
||||
<source src="<?php echo Live::getM3U8File($uuid); ?>" type='application/x-mpegURL'>
|
||||
</video>
|
||||
<?php
|
||||
if (AVideoPlugin::isEnabled("0e225f8e-15e2-43d4-8ff7-0cb07c2a2b3b")) {
|
||||
require_once $global['systemRootPath'] . 'plugin/VideoLogoOverlay/VideoLogoOverlay.php';
|
||||
$style = VideoLogoOverlay::getStyle();
|
||||
$url = VideoLogoOverlay::getLink();
|
||||
?>
|
||||
<div style="<?php echo $style; ?>">
|
||||
<a href="<?php echo $url; ?>" target="_blank"> <img src="<?php echo $global['webSiteRootURL']; ?>videos/logoOverlay.png" alt="Logo" class="img-responsive col-lg-12 col-md-8 col-sm-7 col-xs-6"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<source src="' . Live::getM3U8File($uuid) . '" type="application/x-mpegURL">
|
||||
</video>';
|
||||
|
||||
|
||||
</div>
|
||||
<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);">
|
||||
<?php
|
||||
$streamName = $uuid;
|
||||
include $global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php';
|
||||
echo getLiveUsersLabel();
|
||||
$htmlMediaTag .= getLiveUsersLabelHTML();
|
||||
echo PlayerSkins::getMediaTag(false, $htmlMediaTag);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
</div>
|
||||
<!-- Live finish -->
|
||||
<script>
|
||||
<?php
|
||||
echo PlayerSkins::getStartPlayerJS();
|
||||
|
|
|
@ -95,7 +95,7 @@ if (empty($sideAd) && !AVideoPlugin::loadPluginIfEnabled("Chat2")) {
|
|||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||
?>
|
||||
<div class="container-fluid principalContainer" id="modeYoutubePrincipal">
|
||||
<div class="container-fluid principalContainer" style="padding: 0;" id="modeYoutubePrincipal">
|
||||
<?php
|
||||
if (!$isCompressed) {
|
||||
?>
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
<?php
|
||||
if(empty($streamName)){
|
||||
$live = isLive();
|
||||
$streamName = $live['key'];
|
||||
$live_servers_id = $live['live_servers_id'];
|
||||
}else{
|
||||
$live_servers_id = Live::getCurrentLiveServersId();
|
||||
}
|
||||
$liveViewStatusID = str_replace('-', '_', "liveViewStatusID_{$streamName}_{$live_servers_id}");
|
||||
$liveViewStatusClass = "liveViewStatusClass liveViewStatusClass_{$streamName} liveViewStatusClass_{$streamName}_{$live_servers_id}";
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ if (empty($sideAd) && !AVideoPlugin::loadPluginIfEnabled("Chat2")) {
|
|||
<?php
|
||||
include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||
?>
|
||||
<div class="container-fluid principalContainer" id="modeYoutubePrincipal">
|
||||
<div class="container-fluid principalContainer" style="padding: 0;" id="modeYoutubePrincipal">
|
||||
<?php
|
||||
if (!$isCompressed) {
|
||||
?>
|
||||
|
|
|
@ -8,41 +8,22 @@ if (filter_var($t['link'], FILTER_VALIDATE_URL)) {
|
|||
$liveLink = "{$global['webSiteRootURL']}plugin/LiveLinks/proxy.php?livelink=" . urlencode($t['link']);
|
||||
}
|
||||
}
|
||||
$posterURL = "{$global['webSiteRootURL']}plugin/Live/view/OnAir.jpg";
|
||||
?>
|
||||
<link href="<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/live.css" rel="stylesheet" type="text/css"/>
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="firstC col-sm-2 col-md-2"></div>
|
||||
<div class="secC col-sm-8 col-md-8">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs" onclick="closeFloatVideo();floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">
|
||||
<video poster="<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/OnAir.jpg" controls
|
||||
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered"
|
||||
id="mainVideo">
|
||||
<source src="<?php echo $liveLink; ?>" type='application/x-mpegURL'>
|
||||
</video>
|
||||
</div>
|
||||
|
||||
<!-- Live Link -->
|
||||
<?php
|
||||
if (AVideoPlugin::isEnabled("0e225f8e-15e2-43d4-8ff7-0cb07c2a2b3b")) {
|
||||
require_once $global['systemRootPath'] . 'plugin/VideoLogoOverlay/VideoLogoOverlay.php';
|
||||
$style = VideoLogoOverlay::getStyle();
|
||||
$url = VideoLogoOverlay::getLink();
|
||||
$htmlMediaTag = '<video poster="' . $posterURL . '" controls playsinline webkit-playsinline="webkit-playsinline"
|
||||
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered liveVideo vjs-16-9"
|
||||
id="mainVideo">
|
||||
<source src="' . $liveLink . '" type="application/x-mpegURL">
|
||||
</video>';
|
||||
|
||||
$htmlMediaTag .= getLiveUsersLabelHTML();
|
||||
echo PlayerSkins::getMediaTag(false, $htmlMediaTag);
|
||||
?>
|
||||
<div style="<?php echo $style; ?>" class="VideoLogoOverlay">
|
||||
<a href="<?php echo $url; ?>" target="_blank"> <img src="<?php echo $global['webSiteRootURL']; ?>videos/logoOverlay.png" class="img-responsive col-lg-12 col-md-8 col-sm-7 col-xs-6"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
</div>
|
||||
<!-- Live link finish -->
|
||||
<script>
|
||||
<?php
|
||||
echo PlayerSkins::getStartPlayerJS();
|
||||
|
|
|
@ -136,50 +136,14 @@ $playlist_index = intval(@$_REQUEST['playlist_index']);
|
|||
}
|
||||
?>
|
||||
<!-- playlist player -->
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="col-sm-2 col-md-2 firstC"></div>
|
||||
<div class="col-sm-8 col-md-8 secC">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs"
|
||||
onclick="closeFloatVideo(); floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">
|
||||
|
||||
<video playsinline
|
||||
<?php if ($config->getAutoplay() && false) { // disable it for now ?>
|
||||
autoplay="true"
|
||||
muted="muted"
|
||||
<?php } ?>
|
||||
preload="auto"
|
||||
<?php
|
||||
$htmlMediaTag = '<video playsinline preload="auto"
|
||||
controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo"
|
||||
data-setup='{"techOrder": ["youtube","html5"]}'>
|
||||
</video>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if (AVideoPlugin::isEnabled("0e225f8e-15e2-43d4-8ff7-0cb07c2a2b3b")) {
|
||||
require_once $global['systemRootPath'] . 'plugin/VideoLogoOverlay/VideoLogoOverlay.php';
|
||||
$style = VideoLogoOverlay::getStyle();
|
||||
$url = VideoLogoOverlay::getLink();
|
||||
data-setup=\'{"techOrder": ["youtube","html5"]}\'>
|
||||
</video>';
|
||||
echo PlayerSkins::getMediaTag($video['filename'], $htmlMediaTag);
|
||||
?>
|
||||
<div style="<?php echo $style; ?>" class="VideoLogoOverlay">
|
||||
<a href="<?php echo $url; ?>" target="_blank"> <img src="<?php echo $global['webSiteRootURL']; ?>videos/logoOverlay.png" alt="Logo" class="img-responsive col-lg-12 col-md-8 col-sm-7 col-xs-6"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
showCloseButton();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
</div>
|
||||
<!-- playlist player END -->
|
||||
|
||||
<div class="row" id="modeYoutubeBottom">
|
||||
<div class="col-sm-1 col-md-1"></div>
|
||||
|
|
|
@ -58,9 +58,135 @@ class PlayerSkins extends PluginAbstract {
|
|||
$obj->contextMenuCopyVideoURLCurrentTime = true;
|
||||
$obj->contextMenuCopyEmbedCode = true;
|
||||
$obj->contextMenuShare = true;
|
||||
$obj->playerFullHeight = false;
|
||||
return $obj;
|
||||
}
|
||||
|
||||
function getMediaTag($filename, $htmlMediaTag = false) {
|
||||
global $autoPlayURL, $global, $config;
|
||||
$obj = AVideoPlugin::getObjectData('PlayerSkins');
|
||||
$html = '';
|
||||
if (empty($htmlMediaTag)) {
|
||||
$video = Video::getVideoFromFileName($filename, true);
|
||||
$vType = Video::getIncludeType($video);
|
||||
$_GET['isMediaPlaySite'] = $video['id'];
|
||||
if (!empty($video['externalOptions']->videoStartSeconds)) {
|
||||
$video['externalOptions']->videoStartSeconds = parseDurationToSeconds($video['externalOptions']->videoStartSeconds);
|
||||
} else {
|
||||
$video['externalOptions']->videoStartSeconds = 0;
|
||||
}
|
||||
$images = Video::getImageFromFilename($filename);
|
||||
if ($vType == 'video') {
|
||||
$htmlMediaTag = '<video playsinline webkit-playsinline="webkit-playsinline" '
|
||||
. 'preload="auto" poster="' . $images->poster . '" controls
|
||||
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered vjs-16-9" id="mainVideo">';
|
||||
if ($video['type'] == "video") {
|
||||
$htmlMediaTag .= "<!-- Video {$video['title']} {$video['filename']} -->" . getSources($video['filename']);
|
||||
} else { // video link
|
||||
$htmlMediaTag .= "<!-- Video Link {$video['title']} {$video['filename']} --><source src='{$video['videoLink']}' type='" . ((strpos($video['videoLink'], 'm3u8') !== false) ? "application/x-mpegURL" : "video/mp4") . "' >";
|
||||
$html .= "<script>$(document).ready(function () {\$('time.duration').hide();});</script>";
|
||||
}
|
||||
if (function_exists('getVTTTracks')) {
|
||||
$htmlMediaTag .= "<!-- getVTTTracks 1 -->";
|
||||
$htmlMediaTag .= getVTTTracks($video['filename']);
|
||||
}
|
||||
$htmlMediaTag .= '<p>' . __("If you can't view this video, your browser does not support HTML5 videos") . '</p><p class="vjs-no-js">' . __("To view this video please enable JavaScript, and consider upgrading to a web browser that") . '<a href="http://videojs.com/html5-video-support/" target="_blank" rel="noopener noreferrer">supports HTML5 video</a></p></video>';
|
||||
} else if ($vType == 'audio') {
|
||||
$htmlMediaTag = '<audio playsinline webkit-playsinline="webkit-playsinline"
|
||||
preload="auto"
|
||||
poster="' . $images->poster . '" controls class="embed-responsive-item video-js vjs-default-skin vjs-16-9 vjs-big-play-centered" id="mainVideo">';
|
||||
if ($video['type'] == "audio") {
|
||||
$htmlMediaTag .= "<!-- Audio {$video['title']} {$video['filename']} -->" . getSources($video['filename']);
|
||||
} else { // audio link
|
||||
if (file_exists($global['systemRootPath'] . "videos/" . $video['filename'] . ".ogg")) {
|
||||
$type = "audio/ogg";
|
||||
} else {
|
||||
$type = "audio/mpeg";
|
||||
}
|
||||
$htmlMediaTag .= "<!-- Audio Link {$video['title']} {$video['filename']} --><source src='{$video['audioLink']}' type='" . $type . "' >";
|
||||
$html .= "<script>$(document).ready(function () {\$('time.duration').hide();});</script>";
|
||||
}
|
||||
$htmlMediaTag .= '</audio>';
|
||||
} else if ($vType == 'embed') {
|
||||
$disableYoutubeIntegration = false;
|
||||
if (!empty($advancedCustom->disableYoutubePlayerIntegration)) {
|
||||
$disableYoutubeIntegration = true;
|
||||
}
|
||||
$_GET['isEmbedded'] = "";
|
||||
if (((strpos($video['videoLink'], "youtu.be") == false) && (strpos($video['videoLink'], "youtube.com") == false) && (strpos($video['videoLink'], "vimeo.com") == false)) || ($disableYoutubeIntegration)) {
|
||||
$_GET['isEmbedded'] = "e";
|
||||
$url = parseVideos($video['videoLink']);
|
||||
if ($config->getAutoplay()) {
|
||||
$url = addQueryStringParameter($url, 'autoplay', 1);
|
||||
}
|
||||
$htmlMediaTag = "<!-- Embed Link {$video['title']} {$video['filename']} -->";
|
||||
$htmlMediaTag .= '<video playsinline webkit-playsinline="webkit-playsinline" id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
|
||||
$htmlMediaTag .= '<div id="main-video" class="embed-responsive embed-responsive-16by9">';
|
||||
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" allowfullscreen="true" src="' . $url . '"></iframe>';
|
||||
$htmlMediaTag .= '<script>$(document).ready(function () {addView(' . $video['id'] . ', 0);});</script>';
|
||||
$htmlMediaTag .= '</div>';
|
||||
} else {
|
||||
// youtube!
|
||||
if ((stripos($video['videoLink'], "youtube.com") != false) || (stripos($video['videoLink'], "youtu.be") != false)) {
|
||||
$_GET['isEmbedded'] = "y";
|
||||
} else if ((stripos($video['videoLink'], "vimeo.com") != false)) {
|
||||
$_GET['isEmbedded'] = "v";
|
||||
}
|
||||
$_GET['isMediaPlaySite'] = $video['id'];
|
||||
PlayerSkins::playerJSCodeOnLoad($video['id'], @$video['url']);
|
||||
$htmlMediaTag = "<!-- Embed Link YoutubeIntegration {$video['title']} {$video['filename']} -->";
|
||||
$htmlMediaTag .= '<video playsinline webkit-playsinline="webkit-playsinline" id="mainVideo" class="embed-responsive-item video-js vjs-default-skin vjs-16-9 vjs-big-play-centered" controls></video>';
|
||||
$htmlMediaTag .= '<script>var player;var mediaId = ' . $video['id'] . ';$(document).ready(function () {$(".vjs-control-bar").css("opacity: 1; visibility: visible;");});</script>';
|
||||
}
|
||||
} else if ($vType == 'serie') {
|
||||
$link = "{$global['webSiteRootURL']}plugin/PlayLists/embed.php";
|
||||
$link = addQueryStringParameter($link, 'playlists_id', $video['serie_playlists_id']);
|
||||
$link = addQueryStringParameter($link, 'autoplay', $config->getAutoplay());
|
||||
$link = addQueryStringParameter($link, 'playlist_index', @$_REQUEST['playlist_index']);
|
||||
|
||||
$htmlMediaTag = "<!-- Serie {$video['title']} {$video['filename']} -->";
|
||||
$htmlMediaTag .= '<video playsinline webkit-playsinline="webkit-playsinline" id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
|
||||
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" allowfullscreen="true" src="' . $link . '"></iframe>';
|
||||
$htmlMediaTag .= '<script>$(document).ready(function () {addView(' . $video['id'] . ', 0);});</script>';
|
||||
}
|
||||
|
||||
$html .= "<script>var mediaId = '{$video['id']}';var player;" . self::playerJSCodeOnLoad($video['id'], @$autoPlayURL) . '</script>';
|
||||
}
|
||||
|
||||
$col1Classes = 'col-md-2 firstC';
|
||||
$col2Classes = 'col-md-8 secC';
|
||||
$col3Classes = 'col-md-2 thirdC';
|
||||
if($obj->playerFullHeight){
|
||||
$col2Classes .= ' text-center playerFullHeight';
|
||||
}
|
||||
|
||||
$html .= '
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="'.$col1Classes.'"></div>
|
||||
<div class="'.$col2Classes.'">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs"
|
||||
onclick="closeFloatVideo(); floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">' . $htmlMediaTag . '</div>';
|
||||
|
||||
if (AVideoPlugin::isEnabledByName('VideoLogoOverlay')) {
|
||||
$style = VideoLogoOverlay::getStyle();
|
||||
$url = VideoLogoOverlay::getLink();
|
||||
$html .= '<div style="' . $style . '" class="VideoLogoOverlay"><a href="' . $url . '" target="_blank"> <img src="' . $global['webSiteRootURL'] . 'videos/logoOverlay.png" alt="Logo" class="img-responsive col-lg-12 col-md-8 col-sm-7 col-xs-6"></a></div>';
|
||||
}
|
||||
|
||||
$html .= showCloseButton() . '</div></div><div class="'.$col3Classes.'"></div></div>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
public function getHeadCode() {
|
||||
global $global, $config, $video;
|
||||
$obj = $this->getDataObject();
|
||||
|
|
|
@ -30,3 +30,10 @@
|
|||
#modeYoutubeBottomContent .main-video .secC{
|
||||
width: 100% !important;
|
||||
}
|
||||
#modeYoutubeBottomContent .embed-responsive-16by9,#modeYoutubeBottomContent #mainVideo{
|
||||
padding-bottom: 56.25% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
#modeYoutubeBottomContent .playerFullHeight {
|
||||
height: 100% !important;
|
||||
}
|
|
@ -1034,3 +1034,14 @@ li.dropdown-submenu > ul > li > a{
|
|||
color: #FFF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.playerFullHeight, .playerFullHeight video, .playerFullHeight audio, .playerFullHeight iframe, .playerFullHeight #mainVideo, .playerFullHeight #main-video{
|
||||
height: calc(100vh - 60px);
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
.playerFullHeight .floatVideo video, .playerFullHeight .floatVideo audio, .playerFullHeight .floatVideo iframe, .playerFullHeight .floatVideo #mainVideo, .playerFullHeight .floatVideo #main-video{
|
||||
height: 300px;
|
||||
}
|
||||
}
|
|
@ -1,132 +1,12 @@
|
|||
<?php
|
||||
$_GET['isMediaPlaySite'] = $video['id'];
|
||||
$isAudio = 1;
|
||||
$timerDuration = "";
|
||||
if ($video['type'] == "linkAudio") {
|
||||
$timerDuration = '$("time.duration").hide();';
|
||||
}
|
||||
if ($video['rotation'] === "90" || $video['rotation'] === "270") {
|
||||
$aspectRatio = "9:16";
|
||||
$vjsClass = "vjs-9-16";
|
||||
$embedResponsiveClass = "embed-responsive-9by16";
|
||||
} else {
|
||||
$aspectRatio = "16:9";
|
||||
$vjsClass = "vjs-16-9";
|
||||
$embedResponsiveClass = "embed-responsive-16by9";
|
||||
}
|
||||
|
||||
if (!empty($video['externalOptions']->videoStartSeconds)) {
|
||||
$video['externalOptions']->videoStartSeconds = parseDurationToSeconds($video['externalOptions']->videoStartSeconds);
|
||||
} else {
|
||||
$video['externalOptions']->videoStartSeconds = 0;
|
||||
}
|
||||
|
||||
$playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
|
||||
|
||||
$ext = "";
|
||||
if ($video['type'] == "audio") {
|
||||
if (file_exists($global['systemRootPath'] . "videos/" . $video['filename'] . ".ogg")) {
|
||||
$ext = ".ogg";
|
||||
} else {
|
||||
$ext = ".mp3";
|
||||
}
|
||||
}
|
||||
|
||||
$sources = getVideosURL($video['filename']);
|
||||
$sourceLink = $sources['mp3']['url'];
|
||||
if ($video['type'] !== "audio") {
|
||||
$sourceLink = $video['videoLink'];
|
||||
}
|
||||
|
||||
if ($video['type'] != "audio") {
|
||||
$waveSurferEnabled = false;
|
||||
} else {
|
||||
$waveSurferEnabled = !empty($advancedCustom->EnableWavesurfer);
|
||||
}
|
||||
$isAudio = 1;
|
||||
?>
|
||||
<!-- audio -->
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="col-md-2 firstC"></div>
|
||||
<div class="col-md-8 secC">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs"
|
||||
onclick="closeFloatVideo(); floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive <?php echo $embedResponsiveClass; ?>">
|
||||
<!-- <?php echo $video['filename']; ?> [<?php echo $video['type']; ?>] -->
|
||||
<audio playsinline webkit-playsinline="webkit-playsinline"
|
||||
preload="auto"
|
||||
poster="<?php echo $poster; ?>" controls class="embed-responsive-item video-js vjs-default-skin <?php echo $vjsClass; ?> vjs-big-play-centered" id="mainVideo">
|
||||
<!-- Audio -->
|
||||
<?php
|
||||
if ($waveSurferEnabled == false) {
|
||||
echo getSources($video['filename']);
|
||||
}
|
||||
echo PlayerSkins::getMediaTag($video['filename']);
|
||||
?>
|
||||
</audio>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if (AVideoPlugin::isEnabled("0e225f8e-15e2-43d4-8ff7-0cb07c2a2b3b")) {
|
||||
require_once $global['systemRootPath'] . 'plugin/VideoLogoOverlay/VideoLogoOverlay.php';
|
||||
$style = VideoLogoOverlay::getStyle();
|
||||
$url = VideoLogoOverlay::getLink();
|
||||
?>
|
||||
<div style="<?php echo $style; ?>" class="VideoLogoOverlay">
|
||||
<a href="<?php echo $url; ?>" target="_blank"> <img src="<?php echo $global['webSiteRootURL']; ?>videos/logoOverlay.png" alt="Logo" class="img-responsive col-lg-12 col-md-8 col-sm-7 col-xs-6"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
showCloseButton();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
<script>
|
||||
var mediaId = <?php echo $video['id']; ?>;
|
||||
<?php
|
||||
echo $timerDuration;
|
||||
$getDataSetup = "";
|
||||
if ($waveSurferEnabled) {
|
||||
|
||||
$getDataSetup = "{
|
||||
controls: true,
|
||||
autoplay: true,
|
||||
fluid: false,
|
||||
loop: false,
|
||||
width: 600,
|
||||
height: 300,
|
||||
plugins: {
|
||||
wavesurfer: {
|
||||
src: '{$sourceLink}',
|
||||
msDisplayMax: 10,
|
||||
debug: false,
|
||||
waveColor: 'green',
|
||||
progressColor: 'white',
|
||||
cursorColor: 'blue',
|
||||
hideScrollbar: true
|
||||
}
|
||||
}
|
||||
}, function () {
|
||||
// print version information at startup
|
||||
videojs.log('Using video.js', videojs.VERSION, 'with videojs-wavesurfer', videojs.getPluginVersion('wavesurfer'));
|
||||
}";
|
||||
}
|
||||
|
||||
|
||||
echo PlayerSkins::getStartPlayerJS("", $getDataSetup);
|
||||
PlayerSkins::playerJSCodeOnLoad($video['id'], @$autoPlayURL);
|
||||
?>
|
||||
|
||||
</script>
|
||||
<!-- audio finish-->
|
||||
<!-- Audio finish -->
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
|
||||
?>
|
||||
|
|
|
@ -1,107 +1,12 @@
|
|||
<!-- embed -->
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="col-md-2 firstC"></div>
|
||||
<div class="col-md-8 secC">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs" onclick="closeFloatVideo(); floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$vjsClass = "";
|
||||
$playNowVideo = $video;
|
||||
$disableYoutubeIntegration = false;
|
||||
if (!empty($advancedCustom->disableYoutubePlayerIntegration)) {
|
||||
$disableYoutubeIntegration = true;
|
||||
}
|
||||
$_GET['isEmbedded'] = "";
|
||||
if (((strpos($video['videoLink'], "youtu.be") == false) && (strpos($video['videoLink'], "youtube.com") == false) && (strpos($video['videoLink'], "vimeo.com") == false)) || ($disableYoutubeIntegration)) {
|
||||
$_GET['isEmbedded'] = "e";
|
||||
$playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
|
||||
$isEmbed = 1;
|
||||
?>
|
||||
<!-- embed iframe -->
|
||||
<video playsinline webkit-playsinline="webkit-playsinline" id="mainVideo" style="display: none; height: 0;width: 0;" >
|
||||
<!-- Embed -->
|
||||
<?php
|
||||
if (function_exists('getVTTTracks')) {
|
||||
echo getVTTTracks($video['filename']);
|
||||
}
|
||||
echo PlayerSkins::getMediaTag($video['filename']);
|
||||
?>
|
||||
</video>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">
|
||||
<iframe class="embed-responsive-item" scrolling="no" allowfullscreen="true" src="<?php
|
||||
$url = parseVideos($video['videoLink']);
|
||||
if ($config->getAutoplay()) {
|
||||
$url = addQueryStringParameter($url, 'autoplay',1);
|
||||
}
|
||||
echo $url;
|
||||
?>"></iframe>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
addView(<?php echo $video['id']; ?>, 0);
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<!-- Embed finish -->
|
||||
<?php
|
||||
} else {
|
||||
// youtube!
|
||||
if ((stripos($video['videoLink'], "youtube.com") != false) || (stripos($video['videoLink'], "youtu.be") != false)) {
|
||||
$_GET['isEmbedded'] = "y";
|
||||
} else if ((stripos($video['videoLink'], "vimeo.com") != false)) {
|
||||
$_GET['isEmbedded'] = "v";
|
||||
}
|
||||
$_GET['isMediaPlaySite'] = $video['id'];
|
||||
PlayerSkins::playerJSCodeOnLoad($video['id'], @$autoPlayVideo['url']);
|
||||
include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
|
||||
?>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">
|
||||
<!-- embed iframe advancedCustom-> YoutubePlayerIntegration isEmbedded = <?php echo $_GET['isEmbedded']; ?> -->
|
||||
<video playsinline webkit-playsinline="webkit-playsinline" id="mainVideo" class="embed-responsive-item video-js vjs-default-skin <?php echo $vjsClass; ?> vjs-big-play-centered" controls <?php
|
||||
if ($config->getAutoplay()) {
|
||||
echo " autoplay ";
|
||||
}
|
||||
?> ></video>
|
||||
<script>
|
||||
var player;
|
||||
var mediaId = <?php echo $video['id']; ?>;
|
||||
// Prevent HTML5 video from being downloaded (right-click saved)?
|
||||
$('#mainVideo').bind('contextmenu', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".vjs-control-bar").css("opacity: 1; visibility: visible;");
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<?php
|
||||
} // youtube! end
|
||||
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
|
||||
// the live users plugin
|
||||
if (AVideoPlugin::isEnabled("0e225f8e-15e2-43d4-8ff7-0cb07c2a2b3b")) {
|
||||
|
||||
require_once $global['systemRootPath'] . 'plugin/VideoLogoOverlay/VideoLogoOverlay.php';
|
||||
$style = VideoLogoOverlay::getStyle();
|
||||
$url = VideoLogoOverlay::getLink();
|
||||
?>
|
||||
<div style="<?php echo $style; ?>">
|
||||
<a href="<?php echo $url; ?>" target="_blank">
|
||||
<img src="<?php echo $global['webSiteRootURL']; ?>videos/logoOverlay.png" alt="Logo" class="img-responsive col-lg-12 col-md-8 col-sm-7 col-xs-6">
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
showCloseButton();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
</div>
|
||||
<!--/row-->
|
||||
|
|
|
@ -68,19 +68,6 @@ $jsFiles[] = "view/js/webui-popover/jquery.webui-popover.min.js";
|
|||
$jsFiles[] = "view/js/bootstrap-list-filter/bootstrap-list-filter.min.js";
|
||||
$jsFiles[] = "view/js/js-cookie/js.cookie.js";
|
||||
$jsFiles[] = "view/js/jquery-toast/jquery.toast.min.js";
|
||||
if (!empty($video['type'])) {
|
||||
|
||||
$waveSurferEnabled = AVideoPlugin::getObjectDataIfEnabled("CustomizeAdvanced");
|
||||
if ($waveSurferEnabled == false) {
|
||||
$waveSurferEnabled = true;
|
||||
} else {
|
||||
$waveSurferEnabled = $waveSurferEnabled->EnableWavesurfer;
|
||||
}
|
||||
if ((($video['type'] == "audio") || ($video['type'] == "linkAudio")) && ($waveSurferEnabled)) {
|
||||
$jsFiles[] = "view/js/videojs-wavesurfer/wavesurfer.min.js";
|
||||
$jsFiles[] = "view/js/videojs-wavesurfer/dist/videojs.wavesurfer.min.js";
|
||||
}
|
||||
}
|
||||
$jsFiles = array_merge($jsFiles, AVideoPlugin::getJSFiles());
|
||||
$jsURL = combineFiles($jsFiles, "js");
|
||||
?>
|
||||
|
|
|
@ -1,45 +1,13 @@
|
|||
<?php
|
||||
global $isSerie;
|
||||
$isSerie = 1;
|
||||
|
||||
$link = "{$global['webSiteRootURL']}plugin/PlayLists/embed.php";
|
||||
$link = addQueryStringParameter($link, 'playlists_id', $video['serie_playlists_id']);
|
||||
$link = addQueryStringParameter($link, 'autoplay', $config->getAutoplay());
|
||||
$link = addQueryStringParameter($link, 'playlist_index', @$_REQUEST['playlist_index']);
|
||||
|
||||
$playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
|
||||
?>
|
||||
<!-- serie -->
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="col-md-2 firstC"></div>
|
||||
<div class="col-md-8 secC">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs" onclick="closeFloatVideo();floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<video playsinline webkit-playsinline="webkit-playsinline" id="mainVideo" style="display: none; height: 0;width: 0;" ></video>
|
||||
<div id="main-video" class="embed-responsive embed-responsive-16by9">
|
||||
<iframe class="embed-responsive-item" scrolling="no" allowfullscreen="true" src="<?php echo $link; ?>"></iframe>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
addView(<?php echo $video['id']; ?>, 0);
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Serie -->
|
||||
<?php
|
||||
showCloseButton();
|
||||
echo PlayerSkins::getMediaTag($video['filename']);
|
||||
?>
|
||||
<!-- Serie finish -->
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 col-md-2"></div>
|
||||
</div>
|
||||
<!--/row-->
|
||||
|
|
|
@ -1,102 +1,11 @@
|
|||
<?php
|
||||
$playNowVideo = $video;
|
||||
if ($video['rotation'] === "90" || $video['rotation'] === "270") {
|
||||
$aspectRatio = "9:16";
|
||||
$vjsClass = "vjs-9-16";
|
||||
$embedResponsiveClass = "embed-responsive-9by16";
|
||||
} else {
|
||||
$aspectRatio = "16:9";
|
||||
$vjsClass = "vjs-16-9";
|
||||
$embedResponsiveClass = "embed-responsive-16by9";
|
||||
}
|
||||
if (!empty($video['externalOptions']->videoStartSeconds)) {
|
||||
$video['externalOptions']->videoStartSeconds = parseDurationToSeconds($video['externalOptions']->videoStartSeconds);
|
||||
} else {
|
||||
$video['externalOptions']->videoStartSeconds = 0;
|
||||
}
|
||||
|
||||
$playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
|
||||
?>
|
||||
<!-- video -->
|
||||
<div class="row main-video" id="mvideo">
|
||||
<div class="col-md-2 firstC"></div>
|
||||
<div class="col-md-8 secC">
|
||||
<div id="videoContainer">
|
||||
<div id="floatButtons" style="display: none;">
|
||||
<p class="btn btn-outline btn-xs move">
|
||||
<i class="fas fa-expand-arrows-alt"></i>
|
||||
</p>
|
||||
<button type="button" class="btn btn-outline btn-xs"
|
||||
onclick="closeFloatVideo(); floatClosed = 1;">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="main-video" class="embed-responsive <?php echo $embedResponsiveClass; ?>">
|
||||
<video playsinline webkit-playsinline="webkit-playsinline"
|
||||
<?php if ($config->getAutoplay() && false) { // disable it for now ?>
|
||||
autoplay="true"
|
||||
muted="muted"
|
||||
<?php } ?>
|
||||
preload="auto"
|
||||
poster="<?php echo $poster; ?>" controls class="embed-responsive-item video-js vjs-default-skin <?php echo $vjsClass; ?> vjs-big-play-centered" id="mainVideo">
|
||||
<?php if ($playNowVideo['type'] == "video") { ?>
|
||||
<!-- <?php echo $playNowVideo['title'], " ", $playNowVideo['filename']; ?> -->
|
||||
<?php
|
||||
echo getSources($playNowVideo['filename']);
|
||||
} else {
|
||||
echo PlayerSkins::getMediaTag($video['filename']);
|
||||
?>
|
||||
<source src="<?php echo $playNowVideo['videoLink']; ?>" type="<?php echo (strpos($playNowVideo['videoLink'], 'm3u8') !== false) ? "application/x-mpegURL" : "video/mp4" ?>" >
|
||||
<?php
|
||||
if (function_exists('getVTTTracks')) {
|
||||
echo "<!-- getVTTTracks 1 -->";
|
||||
echo getVTTTracks($playNowVideo['filename']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<p><?php echo __("If you can't view this video, your browser does not support HTML5 videos"); ?></p>
|
||||
<p class="vjs-no-js"><?php echo __("To view this video please enable JavaScript, and consider upgrading to a web browser that"); ?>
|
||||
<a href="http://videojs.com/html5-video-support/" target="_blank" rel="noopener noreferrer">supports HTML5 video</a>
|
||||
</p>
|
||||
</video>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if (AVideoPlugin::isEnabled("0e225f8e-15e2-43d4-8ff7-0cb07c2a2b3b")) {
|
||||
require_once $global['systemRootPath'] . 'plugin/VideoLogoOverlay/VideoLogoOverlay.php';
|
||||
$style = VideoLogoOverlay::getStyle();
|
||||
$url = VideoLogoOverlay::getLink();
|
||||
?>
|
||||
<div style="<?php echo $style; ?>" class="VideoLogoOverlay">
|
||||
<a href="<?php echo $url; ?>" target="_blank"> <img src="<?php echo $global['webSiteRootURL']; ?>videos/logoOverlay.png" alt="Logo" class="img-responsive col-lg-12 col-md-8 col-sm-7 col-xs-6"></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
showCloseButton();
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
<!-- video finish -->
|
||||
<script>
|
||||
var mediaId = '<?php echo $playNowVideo['id']; ?>';
|
||||
var player;
|
||||
|
||||
<?php
|
||||
PlayerSkins::playerJSCodeOnLoad($playNowVideo['id'], @$autoPlayURL);
|
||||
?>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
<?php
|
||||
$_GET['isMediaPlaySite'] = $playNowVideo['id'];
|
||||
if ($playNowVideo['type'] == "linkVideo") {
|
||||
echo '$("time.duration").hide();';
|
||||
}
|
||||
?>
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
|
||||
?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue