Add View on YouTube button

This commit is contained in:
Mike Nolan 2025-03-12 12:57:08 +00:00
parent e8d9197b96
commit bd4fbe60c8
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@
<?php
if($exists)
{
echo "<video src=\"./content/".$path."\" controls width=\"640\" height=\"480\"></video><br><a href=\"./content/".$path."\" class=\"btn btn-primary\" download=\"".htmlspecialchars($title)."-".$id.$ext."\">Download</a><!--<button click=\"copytimetoclipboard()\">Copy Link At Time</button>-->";
echo "<video src=\"./content/".$path."\" controls width=\"640\" height=\"480\"></video><br><a href=\"./content/".$path."\" class=\"btn btn-primary\" download=\"".htmlspecialchars($title)."-".$id.$ext."\">Download</a><a href=\"https://www.youtube.com/watch?v=".$id."\" type=\"button\" class=\"btn btn-danger\">View on YouTube</a><!--<button click=\"copytimetoclipboard()\">Copy Link At Time</button>-->";
echo "<script>var vid = document.querySelector('video'); vid.currentTime = ".$curTime.";function copytimetoclipboard(){navigator.clipboard.writeText(`".$url_root."watch.php?v=".$id."&res=".$res."&t=\${vid.currentTime}`)}</script>";
}
else