<!DOCTYPE html>
<html>
<head>
<title>My Video Player</title>
<script src="https://cdn.jsdelivr.net/npm/hls.js"></script>
</head>
<body>
<video id="video" muted=“muted” controls="controls" autoplay = "autoplay"></video>
<script>
if (Hls.isSupported()) {
var video = document.getElementById('video');
var hls = new Hls();
hls.loadSource('http://219.151.31.38/liveplay-kk.rtxapp.com/live/program/live/hnwshd/4000000/mnf.m3u8');
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function() {
video.play();
});
}
</script>
</body>
</html>
利用hls插件播放m3u8格式视频
最新推荐文章于 2024-05-06 21:42:11 发布