From fb9eaefc845a668b47b17f6200642faa4ae21fd4 Mon Sep 17 00:00:00 2001 From: sxlxc Date: Sat, 19 Jul 2025 18:12:38 +0800 Subject: [PATCH] z --- html/index.html | 57 ++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/html/index.html b/html/index.html index d2f13f1..f03fcf3 100644 --- a/html/index.html +++ b/html/index.html @@ -1,31 +1,44 @@ + - HLS Player Test - + + + + HLS Player Test + + + -

Live Stream

+

Live Stream

+
+
+ + if (Hls.isSupported()) { + var hls = new Hls(); + hls.loadSource(videoSrc); + hls.attachMedia(video); + hls.on(Hls.Events.MANIFEST_PARSED, function () { + video.play(); + }); + } else if (video.canPlayType('application/vnd.apple.mpegurl')) { + video.src = videoSrc; + video.addEventListener('loadedmetadata', function () { + video.play(); + }); + } + \ No newline at end of file