Advertisement
diegodcpbr

Untitled

Aug 29th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.78 KB | None | 0 0
  1. <html>
  2.   <body>
  3.     <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
  4.     MEU
  5.     <video id="video" controls></video>
  6.    
  7.     <script>
  8.     if(Hls.isSupported())
  9.     {
  10.         var video = document.getElementById('video');
  11.         var hls = new Hls();
  12.         hls.loadSource('http://54.39.137.181/46/mpegts?token=PYAc5ny--0?');
  13.         hls.attachMedia(video);
  14.         hls.on(Hls.Events.MANIFEST_PARSED,function()
  15.         {
  16.             video.play();
  17.         });
  18.     }
  19.     else if (video.canPlayType('application/vnd.apple.mpegurl'))
  20.     {
  21.         video.src = 'http://54.39.137.181/46/mpegts?token=PYAc5ny--0?';
  22.         video.addEventListener('canplay',function()
  23.         {
  24.             video.play();
  25.         });
  26.     }
  27.     </script>
  28.    
  29.    
  30.   </body>
  31. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement