Some browser like edge you directly play ts
without video.js
. Refer to this answer
<video width="352" height="198" controls>
<source src="index.m3u8" type="application/x-mpegURL">
</video>
For other browser like firefox and chrome, use video.js
like this,
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>videojs-contrib-hls embed</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>
<h1>Video.js Example Embed</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="640" height="268"
data-setup='{}'>
<source src="index.m3u8" type="application/x-mpegURL">
</video>
<script>
</script>
</body>
</html>