try this
This commit is contained in:
parent
e255d5f59a
commit
1d2858aa22
@ -175,11 +175,13 @@ function toggleStream () {
|
|||||||
if (!vidReady) return
|
if (!vidReady) return
|
||||||
if (vid.paused) {
|
if (vid.paused) {
|
||||||
if (ws) ws.send('watch ' + STREAM_NAME)
|
if (ws) ws.send('watch ' + STREAM_NAME)
|
||||||
|
hls.startLoad(-1)
|
||||||
vid.play()
|
vid.play()
|
||||||
btn.innerHTML = '<i class="fa fa-pause fa-fw"></i>'
|
btn.innerHTML = '<i class="fa fa-pause fa-fw"></i>'
|
||||||
showBigBtn(false)
|
showBigBtn(false)
|
||||||
} else {
|
} else {
|
||||||
if (ws) ws.send('stop ' + STREAM_NAME)
|
if (ws) ws.send('stop ' + STREAM_NAME)
|
||||||
|
hls.stopLoad()
|
||||||
vid.pause()
|
vid.pause()
|
||||||
btn.innerHTML = '<i class="fa fa-play fa-fw"></i>'
|
btn.innerHTML = '<i class="fa fa-play fa-fw"></i>'
|
||||||
showBigBtn(true)
|
showBigBtn(true)
|
||||||
@ -293,6 +295,7 @@ if (Hls.isSupported()) {
|
|||||||
loadSource()
|
loadSource()
|
||||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||||
vidReady = true
|
vidReady = true
|
||||||
|
hls.stopLoad()
|
||||||
clearTimeout(retryTimeout)
|
clearTimeout(retryTimeout)
|
||||||
})
|
})
|
||||||
hls.on(Hls.Events.ERROR, (e,d) => {
|
hls.on(Hls.Events.ERROR, (e,d) => {
|
||||||
|
Reference in New Issue
Block a user