You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same playback setup as described here: #3764 (Live TV Playback with Time-Shift buffer)
In that situation, let's assume that a user has paused playback.
Now it can eventually happen, that the pause-position gets out of the time-range that is covered by the segments in the live playlist.
Assuming I would want to do something in that case like displaying a message or auto-resuming playback, what would be the best way to monitor for that situation?
(in terms of which event to monitor and which values to check)
The LEVEL_UPDATED event fires when hls.levels[hls.loadLevel].details.fragments is updated.
hls.levels[hls.loadLevel].details.fragments[0].start is the start time of your live sliding window. You'll need to compare this to currentTime on this event.
If you know how many segments are in your sliding window, you can set hls.config.liveMaxLatencyDurationCount to this value (before setup or after LEVEL_UPDATED with details.fragments.length). This will update hls.maxLatency which when reached (hls.latency) will make hls.js seek forward to the live sync position (there is no hls.js event when this happens, just video 'seeking' and 'seeked'). liveMaxLatencyDurationCount defaults to Infinity so this behavior is off when not configured (side note, hls.js will still seek forward if outside the window and completely unbuffered, as it must be within the window to stream content).
Same playback setup as described here: #3764 (Live TV Playback with Time-Shift buffer)
In that situation, let's assume that a user has paused playback.
Now it can eventually happen, that the pause-position gets out of the time-range that is covered by the segments in the live playlist.
Assuming I would want to do something in that case like displaying a message or auto-resuming playback, what would be the best way to monitor for that situation?
(in terms of which event to monitor and which values to check)
Originally posted by @softworkz in #3764 (comment)
The text was updated successfully, but these errors were encountered: