Non-DVR application providing DVR playback #1208
Replies: 3 comments 10 replies
-
I use a client-side workaround for a different issue that might be useful here. Set up a "visibilitychange" listener in JavaScript to detect when the user tabs away or backgrounds the window - when they change back, reload the live source in the player or use seek API if you are using OvenPlayer to skip forward to now. This solved a headache where playback in Safari goes out of sync if you tab away then back. |
Beta Was this translation helpful? Give feedback.
-
When hls.js is playing HLS, even if the user clicks pause, the player continues to download new segments and buffers them. (OvenMediaEngine does not give the player the old segment. It has already been deleted from memory.) I think this is natural. I think many users expect to continue watching the live broadcast when they pause and then resume. So I think that hls.js is doing this by default. If you want the user to always see the most up-to-date stream, it would be better to receive an event and seek to the latest point, as bcah suggested. Alternatively, it would be nice to see if there is such a thing among the options of hls.js. Let's take a look at the options of hls.js. @SangwonOh |
Beta Was this translation helpful? Give feedback.
-
I'll close the discussion, I think I was incorrect and it was just buffering that was happening. When unfocused we just unpause the stream now, and that works though is inefficient. We'll keep working to see if we can improve that. |
Beta Was this translation helpful? Give feedback.
-
As discussed elsewhere, when in the background and muted, chrome will pause a stream. This is bad for viewers, as they fall behind.
One of our attempted fixes/workarounds was to create a separate application in OME that doesn't provide DVR, so in theory shouldn't be able to fall behind.
Here's our Server.xml
To reproduce the thing I'm talking about, start OME and forward the same stream to both applications. Play the stream from the nodvr application via llhls, and then put the stream in a background tab while muted. Come back in a few minutes and see that the stream is playing content from when you tabbed out, making requests to the server like everything is normal, and the server giving ten minute old content with no trouble.
I'm unsure if this is intended behavior or a bug, can you please assist @getroot? (Apologies, I do not know if you all get notifications for new discussions)
Beta Was this translation helpful? Give feedback.
All reactions