dash.js icon indicating copy to clipboard operation
dash.js copied to clipboard

Add an option to display time units as absolute for dynamic MPD with limited DVR window

Open padninja opened this issue 6 years ago • 3 comments

Hello,

This is a feature request to add an option to display current time and duration in absolute time units instead of relative time units when playing a dynamic MPD with a limited DVR window. So, for example, if a live stream has been running for 5 minutes with a 3 minute DVR window and I am currently watching minute 3:30, I would like the current time to read 3:30 and the duration to read 5:00. Currently, in this scenario, the time would read 1:30 and the duration would be 3:00.

padninja avatar May 30 '18 18:05 padninja

@padninja, that sounds a bit confusing to me. In the scenario that you describe, showing current time as 3:30 sounds like a reasonably requirement (current time relative to stream start time) but don't see the reason behind showing 5:00 as the duration. That's not the duration of the stream but for how long the stream was running. In this case I would still understand the duration as 3:00.

By the way, controlBar component supports showing times in absolute times as UTC times. That can be activated when creating the controlBar component (second parameter of the constructor set to true): controlBar = new ControlBar(player, true);

epiclabsDASH avatar May 31 '18 21:05 epiclabsDASH

I also have found the timings confusing in this case. An analogy would be my PVR, which allows me to record something and play it back simultaneously, and during playback pause, rewind etc. During recording the end time keeps increasing, by 1 second per second, until the recording is complete, when the end time remains static (being the duration of the recording). This approach could make sense for a live stream too, but to make it really make sense the begin time would also have to be correct. That way the current playback time for the same bit of video would be the same for all viewers, even if they were paused on a frame that has fallen outside the DVR window.

One issue with this approach is that the values could get unwieldy for humans. For example a live stream that uses UNIX epoch times would have a begin time of zero and an end time of something over 400,000 hours and the seek bar would be all the way to the right hand side all the time, with no meaningful controllability.

It's hard to see a way around this - it probably needs some UX design work :-)

nigelmegitt avatar Jun 01 '18 09:06 nigelmegitt

Sorry for the confusion. I guess duration wasn't the right term. For a DVR window I basically want the control bar to show the start and end times of the DVR window as the stream progresses. The start and end time would be relative to the stream start time. Also, the current playback position within that DVR window would be relative to the start as well. Maybe duration of the window could be displayed as well.

One use case for this is when wanting to seek to a specific event in the stream and the user knows at what time (relative to stream start) the event occurred. It also shows the user how long the stream has been running.

padninja avatar Jun 01 '18 13:06 padninja