blob the m3u8 file and put it in the video tag. The video cannot be played. If you directly use video.src = ". / mfs.avc.ne.m3u8"; it can be played. How can I solve this problem?
the blob object of my m3u8 has been viewed.
<body>
<video id="player" controls autoplay style="width:400px;height:300px;">
</video>
<script>
fetch("./mfs.avc.ne.m3u8")
.then(function (response) {
return response.blob();
})
.then(function (m3u8blob) {
console.log(m3u8blob);
// var bb = new Blob([m3u8blob],{type:"application/x-mpegURL"});
// console.log(bb);
var video = document.getElementById("player");
video.src = URL.createObjectURL(m3u8blob);
// console.log(bb.getBlob(type));
// video.src = "./mfs.avc.ne.m3u8";
video.type = "application/x-mpegURL";
})
</script>