|
|
|
|
@ -48,6 +48,10 @@ const index = `<!DOCTYPE html>
@@ -48,6 +48,10 @@ const index = `<!DOCTYPE html>
|
|
|
|
|
const create = () => { |
|
|
|
|
const video = document.getElementById('video'); |
|
|
|
|
|
|
|
|
|
if (video.canPlayType('application/vnd.apple.mpegurl')) { |
|
|
|
|
video.src = 'stream.m3u8'; |
|
|
|
|
video.play(); |
|
|
|
|
} else { |
|
|
|
|
const hls = new Hls({ |
|
|
|
|
progressive: false, |
|
|
|
|
}); |
|
|
|
|
@ -67,6 +71,7 @@ const create = () => {
@@ -67,6 +71,7 @@ const create = () => {
|
|
|
|
|
|
|
|
|
|
video.play(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
create(); |
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
|
|