videoplayer.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. include("ytclass.php");
  3. $ytclass = new YTDownloader();
  4. $video = mysqli_fetch_assoc(mysqli_query($db,"SELECT * FROM youplay WHERE id='".mysqli_real_escape_string($db,$_GET["id"])."'"));
  5. $vdata = $ytclass->getDownloadLinks($video["watchid"]);
  6. $vlink = $vdata["dl"];
  7. ?>
  8. <br>
  9. <table width=95% align=center>
  10. <tbody>
  11. <tr>
  12. <td align=center>
  13. <video class="video-js vjs-default-skin" controls id="player" cover="<?=$vdata["info"]["Thumbnail"]?>" title="<?=$vdata["info"]["Title"]?>" style="width:90%;margin-left:5%">
  14. Your browser does not support the video tag.
  15. </video>
  16. <script>
  17. hola_player({share:false,sources:[
  18. <?php
  19. for($i=0;$i<count($vlink);$i++) {
  20. if(!strstr($vlink[$i]["type"],"(Audio Only)"))
  21. echo "{src:'".$vlink[$i]["url"]."',label:'".$vlink[$i]["type"]."'},";
  22. }
  23. ?>
  24. ]});
  25. </script>
  26. </td>
  27. </tr>
  28. <tr>
  29. <td align=center> <a href="index.php">Back to your videolist</a> </td>
  30. </tr>
  31. </tbody>
  32. </table>