retry on HLS error instead of live status offline
This commit is contained in:
parent
fa2d87ef18
commit
5d1db70545
|
@ -137,11 +137,6 @@ function liveStatus (status) {
|
|||
viewers.style.display = 'none'
|
||||
|
||||
handleWebSocket(false)
|
||||
|
||||
retryTimeout = setTimeout(() => {
|
||||
if (vidReady) return
|
||||
loadSource()
|
||||
}, 10000)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,10 +290,16 @@ if (Hls.isSupported()) {
|
|||
loadSource()
|
||||
hls.on(Hls.Events.MANIFEST_PARSED, () => {
|
||||
vidReady = true
|
||||
clearTimeout(retryTimeout)
|
||||
})
|
||||
hls.on(Hls.Events.ERROR, (e) => {
|
||||
vidReady = false
|
||||
|
||||
retryTimeout = setTimeout(() => {
|
||||
if (vidReady) return
|
||||
loadSource()
|
||||
}, 10000)
|
||||
|
||||
if (!vid.paused) {
|
||||
toggleStream()
|
||||
resetHide()
|
||||
|
|
Loading…
Reference in New Issue