Advertisement
ghiwar

responsive video-js

Jul 3rd, 2021
1,037
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <?php
  2. $video = (isset($_GET['vid'])) ? $_GET['vid'] : null;
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7.   <meta charset=utf-8 />
  8.   <title>Diamond Rate</title>
  9. <link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
  10. <script src="https://unpkg.com/video.js/dist/video.js"></script>
  11. <script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
  12. <style id="compiled-css" type="text/css">
  13. *{
  14.   margin:0px;
  15.   padding:0px;
  16. }
  17. /* EOS */
  18. </style>
  19. </head>
  20. <body>
  21.     <video id="my_video_1" class="video-js vjs-default-skin vjs-16-9" autoplay controls preload="auto" muted data-setup='{}' width="640" height="264" poster="my_video_poster.png">
  22.     </video>
  23.   <script>
  24.     const player = videojs('my_video_1');
  25.     player.src({
  26.       src: '<?php echo $video;?>',
  27.       type: 'application/x-mpegURL'
  28.     });
  29.   </script>
  30.  
  31. </body>
  32. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement