1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
This commit is contained in:
Daniel Neto 2024-12-12 15:21:46 -03:00
parent 1754788d9e
commit 9b78e0014b
2 changed files with 9 additions and 4 deletions

View file

@ -1380,6 +1380,9 @@ function getSources($fileName, $returnArray = false, $try = 0)
if ($returnArray) {
$return = array_merge($videoSources, $audioTracks, $subtitleTracks, $captionsTracks);
} 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;
}

View file

@ -149,11 +149,13 @@ class PlayerSkins extends PluginAbstract
if ($video['type'] == Video::$videoTypeVideo) {
$sources = getSources($video['filename']);
//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
$url = AVideoPlugin::modifyURL($video['videoLink'], $video['id']);
//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>";
}
$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>';