diff options
Diffstat (limited to 'static/hls-player.js')
| -rw-r--r-- | static/hls-player.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/static/hls-player.js b/static/hls-player.js new file mode 100644 index 0000000..6be5a91 --- /dev/null +++ b/static/hls-player.js @@ -0,0 +1,9 @@ +if (Hls.isSupported()) { + const player = document.getElementById('hls-player'); + const hls = new Hls(); + hls.loadSource(player.dataset.hls); + hls.attachMedia(player); + hls.on(Hls.Events.MANIFEST_PARSED, (e, d) => { + player.hidden = false; + }); +} |
