How to stream a m3u8 video in html in chrome

2.3k Views Asked by At

Im starting a streaming site and i want to add a m3u8 playlist into it. I have tried the following code but it says HLS playlist request error at URL

this is the code i used

<html>
<head>
<meta charset=utf-8 />
<title>Your title</title>
  

  <link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
  <script src="https://unpkg.com/video.js/dist/video.js"></script>
  <script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
   
</head>
<body>
  <video id="my_video_1" class="video-js vjs-fluid vjs-default-skin" controls preload="auto"
  data-setup='{}'>
    <source src="http://iptvtree.net:8080/outputofflinechecker09/AiPh5engoo2AinahKeeZoh7je0bem3.eepon/270" type="application/x-mpegURL">
  </video>
  
<script>
var player = videojs('my_video_1');
player.play();
</script>
  
</body>
</html>

Can anyone help me solve this problem? Thanks in advance

0

There are 0 best solutions below