Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

durationAsUTC() and timeAsUTC() seem incorrect if paused in past #4409

Open
JPDelprat opened this issue Mar 8, 2024 · 0 comments
Open

durationAsUTC() and timeAsUTC() seem incorrect if paused in past #4409

JPDelprat opened this issue Mar 8, 2024 · 0 comments

Comments

@JPDelprat
Copy link

JPDelprat commented Mar 8, 2024

Hello,

For a live stream, there is a moving dvrWindow.

If I stay in pause longer than dvrWindow size, and than I call timeAsUTC() :

  • I don't get a constant time,
  • timeAsUTC() doesn't correspond any more to playback time (as transmitted by the PLAYBACK_TIME_UPDATE event), but corresponds more or less to 'now - dvrWindow length'.

Similar problems with durationAsUTC().

Possible explanations (just assumptions, I don't know much about dash.js implementation)

  • dvrWindow remains in past, but offset applied to convert time() and duration() to timeAsUTC() and durationAsUTC() is wrong
  • dvrWindow remains in present, but as time() is clamped between 0 and duration(), timeAsUTC() doesn't provide playback time => time() should be negative in my case

In particular, timeAsUTC() doesn't return the playback time.
=> Is there some way to get the real playbackTime from player (as provided by PLAYBACK_TIME_UPDATE event).

Thanks a lot,
Regards

Notes:

  • If I look at ControlBar.js, liveDelay is computed as 'var liveDelay = self.player.duration() - value;'.
    This is wrong in my case.
  • Documentation says that timeAsUTC() and durationAsUTC() can only be used for live streams, but does not say that we have to be 'live'.
@JPDelprat JPDelprat added the Bug label Mar 8, 2024
@dsilhavy dsilhavy added this to the 5.0.0 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants