mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 02:39:46 +02:00
Update
This commit is contained in:
parent
1754788d9e
commit
9b78e0014b
2 changed files with 9 additions and 4 deletions
|
@ -1380,6 +1380,9 @@ function getSources($fileName, $returnArray = false, $try = 0)
|
||||||
if ($returnArray) {
|
if ($returnArray) {
|
||||||
$return = array_merge($videoSources, $audioTracks, $subtitleTracks, $captionsTracks);
|
$return = array_merge($videoSources, $audioTracks, $subtitleTracks, $captionsTracks);
|
||||||
} else {
|
} else {
|
||||||
|
// remove index.mp4
|
||||||
|
$videoSources = preg_replace('/<source src=".*index.mp4.*" type="video\/mp4" label="Low" res="360">/', '<!-- index.mp4 removed -->', $videoSources);
|
||||||
|
//var_dump($videoSources);exit;
|
||||||
$return = $videoSources . $audioTracks . PHP_EOL . $subtitleTracks . PHP_EOL . $captionsTracks;
|
$return = $videoSources . $audioTracks . PHP_EOL . $subtitleTracks . PHP_EOL . $captionsTracks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,11 +149,13 @@ class PlayerSkins extends PluginAbstract
|
||||||
if ($video['type'] == Video::$videoTypeVideo) {
|
if ($video['type'] == Video::$videoTypeVideo) {
|
||||||
$sources = getSources($video['filename']);
|
$sources = getSources($video['filename']);
|
||||||
//var_dump($video['filename'], $sources);exit;
|
//var_dump($video['filename'], $sources);exit;
|
||||||
$htmlMediaTag .= "<!-- Video title={$video['title']} {$video['filename']} -->" . $sources; //var_dump($sources);exit;
|
$htmlMediaTag .= PHP_EOL . "<!-- Video title={$video['title']} {$video['filename']} -->";
|
||||||
|
$htmlMediaTag .= PHP_EOL . $sources; //var_dump($sources);exit;
|
||||||
} else { // video link
|
} else { // video link
|
||||||
$url = AVideoPlugin::modifyURL($video['videoLink'], $video['id']);
|
$url = AVideoPlugin::modifyURL($video['videoLink'], $video['id']);
|
||||||
//var_dump($video['videoLink'], $url);exit;
|
//var_dump($video['videoLink'], $url);exit;
|
||||||
$htmlMediaTag .= "<!-- Video Link {$video['title']} {$video['filename']} --><source src='{$url}' type='" . mime_content_type_per_filename($video['videoLink']) . "' >";
|
$htmlMediaTag .= PHP_EOL . "<!-- Video Link {$video['title']} {$video['filename']} -->";
|
||||||
|
$htmlMediaTag .= PHP_EOL . "<source src='{$url}' type='" . mime_content_type_per_filename($video['videoLink']) . "' >";
|
||||||
$html .= "<script>$(document).ready(function () {\$('time.duration').hide();});</script>";
|
$html .= "<script>$(document).ready(function () {\$('time.duration').hide();});</script>";
|
||||||
}
|
}
|
||||||
$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>';
|
$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>';
|
||||||
|
@ -397,7 +399,7 @@ class PlayerSkins extends PluginAbstract
|
||||||
|
|
||||||
if ($addStartPlayerJS) {
|
if ($addStartPlayerJS) {
|
||||||
//var_dump($onPlayerReady, $getDataSetup . ", plugins: " . json_encode($plugins));exit;
|
//var_dump($onPlayerReady, $getDataSetup . ", plugins: " . json_encode($plugins));exit;
|
||||||
echo '<script>'.PlayerSkins::getStartPlayerJS($onPlayerReady, $getDataSetup . ", plugins: " . json_encode($plugins)).'</script>';
|
echo '<script>' . PlayerSkins::getStartPlayerJS($onPlayerReady, $getDataSetup . ", plugins: " . json_encode($plugins)) . '</script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $js . $css . $oembed;
|
return $js . $css . $oembed;
|
||||||
|
@ -535,7 +537,7 @@ class PlayerSkins extends PluginAbstract
|
||||||
if (self::$hasMarks) {
|
if (self::$hasMarks) {
|
||||||
$js .= '<link href="' . getURL('plugin/AD_Server/videojs-markers/videojs.markers.css') . '" rel="stylesheet" type="text/css"/>';
|
$js .= '<link href="' . getURL('plugin/AD_Server/videojs-markers/videojs.markers.css') . '" rel="stylesheet" type="text/css"/>';
|
||||||
$js .= '<script src="' . getURL('plugin/AD_Server/videojs-markers/videojs-markers.js') . '"></script>';
|
$js .= '<script src="' . getURL('plugin/AD_Server/videojs-markers/videojs-markers.js') . '"></script>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $js;
|
return $js;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue