How to hide the src,m3u8 format of video through blob?

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.
clipboard.png

is supported for browsers of this type vnd.apple.mpegurl.
<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>
Jun.05,2021

m3u8 is just an index file. If the relative directory is the server, look for the ts file from the server to play it.
and if you become a local attachment, the relative path is local, how to find ts to play locally?


Boss, what do you mean by changing the slice to a full address? Ask for reference

Menu