This commit is contained in:
Evert Prants 2019-10-23 17:46:49 +03:00
parent e255d5f59a
commit 1d2858aa22
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
1 changed files with 3 additions and 0 deletions

View File

@ -175,11 +175,13 @@ function toggleStream () {
if (!vidReady) return
if (vid.paused) {
if (ws) ws.send('watch ' + STREAM_NAME)
hls.startLoad(-1)
vid.play()
btn.innerHTML = '<i class="fa fa-pause fa-fw"></i>'
showBigBtn(false)
} else {
if (ws) ws.send('stop ' + STREAM_NAME)
hls.stopLoad()
vid.pause()
btn.innerHTML = '<i class="fa fa-play fa-fw"></i>'
showBigBtn(true)
@ -293,6 +295,7 @@ if (Hls.isSupported()) {
loadSource()
hls.on(Hls.Events.MANIFEST_PARSED, () => {
vidReady = true
hls.stopLoad()
clearTimeout(retryTimeout)
})
hls.on(Hls.Events.ERROR, (e,d) => {