try this
This commit is contained in:
parent
e255d5f59a
commit
1d2858aa22
@ -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) => {
|
||||
|
Reference in New Issue
Block a user