可以用video.js来播放m3u8直播流
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>video.js播放m3u8直播流</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播放m3u8直播流</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="100%" height="auto"
data-setup='{}'>
<source src="https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8" type="application/x-mpegURL">
</video>
</body>
</html>
<html>
<head>
<meta charset=utf-8 />
<title>video.js播放m3u8直播流</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播放m3u8直播流</h1>
<video id="my_video_1" class="video-js vjs-default-skin" controls preload="auto" width="100%" height="auto"
data-setup='{}'>
<source src="https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8" type="application/x-mpegURL">
</video>
</body>
</html>