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

Current Time and Duration not correct after live ended on v4.7.3 #4467

Open
5 tasks done
KunXi-Fox opened this issue Apr 25, 2024 · 0 comments
Open
5 tasks done

Current Time and Duration not correct after live ended on v4.7.3 #4467

KunXi-Fox opened this issue Apr 25, 2024 · 0 comments
Labels

Comments

@KunXi-Fox
Copy link

Environment
  • Dash.js version: 4.7.3
  • Browser name/version: Chrome v123.0.6312.122
  • OS name/version: Mac
Steps to reproduce

watch a live event and wait for it's end

Observed behavior

the current time is much larger than duration

Console output

image

  • currentTime comes from dashInstance.time()
  • duration comes from dashInstance.duration()
  • _duration comes from dashInstance.duration() for last dynamic manifest
More information

The issue introduced by this PR

As far as we know

  1. currently we're not process the up coming flow when manifest changes from dynamic to static.
  2. time and duration calculations totally based on isDynamic
  3. based on 1, it's ok to still calculate time and duration with dynamic

After above pr merged

  1. when we call the time method, isDynamic will return false to us, so we'll not reduce the dvr.start, which leads to a wrong current time.
// we'll not run into this code segment
t = (metric === null || t === 0) ? 0 : Math.max(0, (t - metric.range.start));
return t;
  1. when we call the duration method, we'll return videoElement.duration which is still Infinity.
let d = getVideoElement().duration;

if (playbackController.getIsDynamic()) { // we'll not run into this code segment anymore.
    const type = streamController && streamController.hasVideoTrack() ? Constants.VIDEO : Constants.AUDIO;
    let metric = dashMetrics.getCurrentDVRInfo(type);
    d = metric ? (metric.range.end - metric.range.start) : 0;
}
return d;
@KunXi-Fox KunXi-Fox added the Bug label Apr 25, 2024
@KunXi-Fox KunXi-Fox changed the title Current Time and Duration not correct on v4.7.3 Current Time and Duration not correct after live ended on v4.7.3 Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant