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

Closed
JPDelprat opened this issue Mar 8, 2024 · 1 comment
Closed

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

JPDelprat opened this issue Mar 8, 2024 · 1 comment

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'.
@dsilhavy
Copy link
Collaborator

This has been addressed in #4485. I changed the logic of the API endpoints and added a dedicated documentation page here: https://dashif.org/dash.js/pages/advanced/timing-apis.html . It highlights all the changes and describes the behavior.

I will present the changes at the face to face as well.

Closing this issue for now. If something is unclear or missing, please still feel free to comment here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants