1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
DanielnetoDotCom 2021-03-16 15:20:02 -03:00
parent cdbee49407
commit 40b934c12d
16 changed files with 231 additions and 501 deletions

View file

@ -6075,6 +6075,18 @@ function getLiveUsersLabel($viewsClass = "label label-default", $counterClass =
return ""; 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) { function getHTMLTitle($titleArray) {
global $config, $global; global $config, $global;

View file

@ -80,7 +80,6 @@ class CustomizeAdvanced extends PluginAbstract {
$obj->useVideoIDOnSEOLinks = true; $obj->useVideoIDOnSEOLinks = true;
$obj->disableAnimatedGif = false; $obj->disableAnimatedGif = false;
$obj->removeBrowserChannelLinkFromMenu = false; $obj->removeBrowserChannelLinkFromMenu = false;
$obj->EnableWavesurfer = false;
$obj->EnableMinifyJS = false; $obj->EnableMinifyJS = false;
$obj->disableShareAndPlaylist = false; $obj->disableShareAndPlaylist = false;
$obj->disableShareOnly = false; $obj->disableShareOnly = false;
@ -208,7 +207,7 @@ class CustomizeAdvanced extends PluginAbstract {
public function getHelp() { public function getHelp() {
if (User::isAdmin()) { 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 ""; return "";
} }

View file

@ -1,50 +1,25 @@
<?php <?php
$_REQUEST['live_servers_id'] = Live::getLiveServersIdRequest(); $_REQUEST['live_servers_id'] = Live::getLiveServersIdRequest();
$poster = Live::getPosterImage($livet['users_id'], $_REQUEST['live_servers_id']); $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"/> <link href="<?php echo $global['webSiteRootURL']; ?>plugin/Live/view/live.css" rel="stylesheet" type="text/css"/>
<div class="row main-video" id="mvideo"> <?php
<div class="firstC col-sm-2 col-md-2"></div> $playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
<div class="secC col-sm-8 col-md-8"> $isLive = 1;
<div id="videoContainer"> ?>
<div id="floatButtons" style="display: none;"> <!-- Live -->
<p class="btn btn-outline btn-xs move"> <?php
<i class="fas fa-expand-arrows-alt"></i> $htmlMediaTag = '<video poster="' . $posterURL . '" controls playsinline webkit-playsinline="webkit-playsinline"
</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"
class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered liveVideo vjs-16-9" class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered liveVideo vjs-16-9"
id="mainVideo"> id="mainVideo">
<source src="<?php echo Live::getM3U8File($uuid); ?>" type='application/x-mpegURL'> <source src="' . Live::getM3U8File($uuid) . '" type="application/x-mpegURL">
</video> </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 } ?>
$htmlMediaTag .= getLiveUsersLabelHTML();
</div> echo PlayerSkins::getMediaTag(false, $htmlMediaTag);
<div style="z-index: 999; position: absolute; top:5px; left: 5px; opacity: 0.8; filter: alpha(opacity=80);"> ?>
<?php <!-- Live finish -->
$streamName = $uuid;
include $global['systemRootPath'] . 'plugin/Live/view/onlineLabel.php';
echo getLiveUsersLabel();
?>
</div>
</div>
</div>
<div class="col-sm-2 col-md-2"></div>
</div>
<script> <script>
<?php <?php
echo PlayerSkins::getStartPlayerJS(); echo PlayerSkins::getStartPlayerJS();

View file

@ -95,7 +95,7 @@ if (empty($sideAd) && !AVideoPlugin::loadPluginIfEnabled("Chat2")) {
<?php <?php
include $global['systemRootPath'] . 'view/include/navbar.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 <?php
if (!$isCompressed) { if (!$isCompressed) {
?> ?>

View file

@ -1,5 +1,11 @@
<?php <?php
$live_servers_id = Live::getCurrentLiveServersId(); 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}"); $liveViewStatusID = str_replace('-', '_', "liveViewStatusID_{$streamName}_{$live_servers_id}");
$liveViewStatusClass = "liveViewStatusClass liveViewStatusClass_{$streamName} liveViewStatusClass_{$streamName}_{$live_servers_id}"; $liveViewStatusClass = "liveViewStatusClass liveViewStatusClass_{$streamName} liveViewStatusClass_{$streamName}_{$live_servers_id}";

View file

@ -85,7 +85,7 @@ if (empty($sideAd) && !AVideoPlugin::loadPluginIfEnabled("Chat2")) {
<?php <?php
include $global['systemRootPath'] . 'view/include/navbar.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 <?php
if (!$isCompressed) { if (!$isCompressed) {
?> ?>

View file

@ -8,41 +8,22 @@ if (filter_var($t['link'], FILTER_VALIDATE_URL)) {
$liveLink = "{$global['webSiteRootURL']}plugin/LiveLinks/proxy.php?livelink=" . urlencode($t['link']); $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"/> <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> <!-- Live Link -->
<div class="secC col-sm-8 col-md-8"> <?php
<div id="videoContainer"> $htmlMediaTag = '<video poster="' . $posterURL . '" controls playsinline webkit-playsinline="webkit-playsinline"
<div id="floatButtons" style="display: none;"> class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered liveVideo vjs-16-9"
<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"> id="mainVideo">
<source src="<?php echo $liveLink; ?>" type='application/x-mpegURL'> <source src="' . $liveLink . '" type="application/x-mpegURL">
</video> </video>';
</div>
<?php $htmlMediaTag .= getLiveUsersLabelHTML();
if (AVideoPlugin::isEnabled("0e225f8e-15e2-43d4-8ff7-0cb07c2a2b3b")) { echo PlayerSkins::getMediaTag(false, $htmlMediaTag);
require_once $global['systemRootPath'] . 'plugin/VideoLogoOverlay/VideoLogoOverlay.php'; ?>
$style = VideoLogoOverlay::getStyle(); <!-- Live link finish -->
$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" 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>
<script> <script>
<?php <?php
echo PlayerSkins::getStartPlayerJS(); echo PlayerSkins::getStartPlayerJS();

View file

@ -136,50 +136,14 @@ $playlist_index = intval(@$_REQUEST['playlist_index']);
} }
?> ?>
<!-- playlist player --> <!-- playlist player -->
<div class="row main-video" id="mvideo"> <?php
<div class="col-sm-2 col-md-2 firstC"></div> $htmlMediaTag = '<video playsinline preload="auto"
<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"
controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo" controls class="embed-responsive-item video-js vjs-default-skin vjs-big-play-centered" id="mainVideo"
data-setup='{"techOrder": ["youtube","html5"]}'> data-setup=\'{"techOrder": ["youtube","html5"]}\'>
</video> </video>';
echo PlayerSkins::getMediaTag($video['filename'], $htmlMediaTag);
</div> ?>
<?php <!-- playlist player END -->
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-sm-2 col-md-2"></div>
</div>
<div class="row" id="modeYoutubeBottom"> <div class="row" id="modeYoutubeBottom">
<div class="col-sm-1 col-md-1"></div> <div class="col-sm-1 col-md-1"></div>

View file

@ -58,9 +58,135 @@ class PlayerSkins extends PluginAbstract {
$obj->contextMenuCopyVideoURLCurrentTime = true; $obj->contextMenuCopyVideoURLCurrentTime = true;
$obj->contextMenuCopyEmbedCode = true; $obj->contextMenuCopyEmbedCode = true;
$obj->contextMenuShare = true; $obj->contextMenuShare = true;
$obj->playerFullHeight = false;
return $obj; 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() { public function getHeadCode() {
global $global, $config, $video; global $global, $config, $video;
$obj = $this->getDataObject(); $obj = $this->getDataObject();
@ -424,7 +550,7 @@ class PlayerSkins extends PluginAbstract {
$obj->label = 'Plugin'; $obj->label = 'Plugin';
$obj->type = "danger"; $obj->type = "danger";
$obj->text = $resolution['resolution_text']; $obj->text = $resolution['resolution_text'];
$obj->tooltip = $resolution['resolution'].'p'; $obj->tooltip = $resolution['resolution'] . 'p';
} }
$tags = $obj; $tags = $obj;
ObjectYPT::setCache($name, $tags); ObjectYPT::setCache($name, $tags);

View file

@ -30,3 +30,10 @@
#modeYoutubeBottomContent .main-video .secC{ #modeYoutubeBottomContent .main-video .secC{
width: 100% !important; width: 100% !important;
} }
#modeYoutubeBottomContent .embed-responsive-16by9,#modeYoutubeBottomContent #mainVideo{
padding-bottom: 56.25% !important;
height: 100% !important;
}
#modeYoutubeBottomContent .playerFullHeight {
height: 100% !important;
}

View file

@ -1034,3 +1034,14 @@ li.dropdown-submenu > ul > li > a{
color: #FFF; color: #FFF;
font-weight: bold; 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;
}
}

View file

@ -1,132 +1,12 @@
<?php <?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"); $playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
$isAudio = 1;
$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);
}
?> ?>
<!-- audio --> <!-- 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">
<?php
if ($waveSurferEnabled == false) {
echo getSources($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 <?php
echo $timerDuration; echo PlayerSkins::getMediaTag($video['filename']);
$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);
?> ?>
<!-- Audio finish -->
</script>
<!-- audio finish-->
<?php <?php
include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php'; include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
?> ?>

View file

@ -1,107 +1,12 @@
<!-- embed --> <?php
<div class="row main-video" id="mvideo"> $playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
<div class="col-md-2 firstC"></div> $isEmbed = 1;
<div class="col-md-8 secC"> ?>
<div id="videoContainer"> <!-- Embed -->
<div id="floatButtons" style="display: none;"> <?php
<p class="btn btn-outline btn-xs move"> echo PlayerSkins::getMediaTag($video['filename']);
<i class="fas fa-expand-arrows-alt"></i> ?>
</p> <!-- Embed finish -->
<button type="button" class="btn btn-outline btn-xs" onclick="closeFloatVideo(); floatClosed = 1;"> <?php
<i class="fas fa-times"></i> include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
</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";
?>
<!-- embed iframe -->
<video playsinline webkit-playsinline="webkit-playsinline" id="mainVideo" style="display: none; height: 0;width: 0;" >
<?php
if (function_exists('getVTTTracks')) {
echo getVTTTracks($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>
<?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']);
?>
<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-->

View file

@ -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/bootstrap-list-filter/bootstrap-list-filter.min.js";
$jsFiles[] = "view/js/js-cookie/js.cookie.js"; $jsFiles[] = "view/js/js-cookie/js.cookie.js";
$jsFiles[] = "view/js/jquery-toast/jquery.toast.min.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()); $jsFiles = array_merge($jsFiles, AVideoPlugin::getJSFiles());
$jsURL = combineFiles($jsFiles, "js"); $jsURL = combineFiles($jsFiles, "js");
?> ?>

View file

@ -1,45 +1,13 @@
<?php <?php
global $isSerie; global $isSerie;
$isSerie = 1; $isSerie = 1;
$playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
$link = "{$global['webSiteRootURL']}plugin/PlayLists/embed.php"; ?>
$link = addQueryStringParameter($link, 'playlists_id', $video['serie_playlists_id']); <!-- Serie -->
$link = addQueryStringParameter($link, 'autoplay', $config->getAutoplay()); <?php
$link = addQueryStringParameter($link, 'playlist_index', @$_REQUEST['playlist_index']); echo PlayerSkins::getMediaTag($video['filename']);
?>
<!-- Serie finish -->
<?php
include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
?> ?>
<!-- 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>
<?php
showCloseButton();
?>
</div>
</div>
<div class="col-sm-2 col-md-2"></div>
</div>
<!--/row-->

View file

@ -1,102 +1,11 @@
<?php <?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"); $playerSkinsObj = AVideoPlugin::getObjectData("PlayerSkins");
?> ?>
<!-- video --> <!-- video -->
<div class="row main-video" id="mvideo"> <?php
<div class="col-md-2 firstC"></div> echo PlayerSkins::getMediaTag($video['filename']);
<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 {
?>
<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 --> <!-- 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 <?php
include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php'; include $global['systemRootPath'] . 'plugin/PlayerSkins/contextMenu.php';
?> ?>