hls.loadSource(videoSrc); hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function () { video.play(); });
hls.on(Hls.Events.ERROR, function (event, data) { console.error("HLS error:", data); });
} else if (video.canPlayType('application/vnd.apple.mpegurl')) { video.src = videoSrc; video.addEventListener('loadedmetadata', function () { video.play(); }); } else { alert("Your browser does not support HLS playback."); }
About The Author
Discover more from 876NewsJa
Subscribe to get the latest posts sent to your email.
