Webpage playback m3u8

Why can"t you play m3u8 directly using the video tag, but you can play m3u8 with an h5-wrapped player?

Jul.27,2021

ideo-dev/hls.js" rel=" nofollow noreferrer "> https://github.com/video-dev/.

import * as Hls from "hls.js";

const video = document.querySelector("-sharpyour-video-id");
const url = "";

if(video.canPlayType("application/vnd.apple.mpegurl")){
    // 
    video.src = url;
    video.addEventListener("loadedmetadata", function() {
        try {
            video.play();
        } catch (error) {
            console.log(error);
        }
    });
}else if (Hls.isSupported()){
    const hls = new Hls({
        //  AAC LC 
        defaultAudioCodec: "mp4a.40.2",
    });
    hls.loadSource(url);
    hls.attachMedia(video);
    hls.on(Hls.Events.MANIFEST_PARSED, function() {
        try {
            video.play();
        } catch (error) {
            console.log(error);
        }
    });
}else{
    // 
    console.log("");
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4d6d0-65549.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4d6d0-65549.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?