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

Seeking beyond the end of the content causes the player to keep buffering and remain in a waiting state. #4573

Open
5 tasks done
testeur-990 opened this issue Sep 20, 2024 · 3 comments
Assignees
Milestone

Comments

@testeur-990
Copy link

testeur-990 commented Sep 20, 2024

Environment
Steps to reproduce
  1. Open http://reference.dashif.org/dash.js/latest/samples/dash-if-reference-player/index.html
  2. Play http://refapp.hbbtv.org/videos/tears_of_steel_1080p_25f75g6sv3/manifest.mpd
  3. Run player.seek(player.duration()) in the console.
Observed behavior

The player is still in a waiting state, and no seek has been performed

Console output

player.seek(player.duration())
Debug.js:169 [990604][PlaybackController] Requesting seek to time: 734.16
undefined
Debug.js:169 [990605][PlaybackController] Seeking to: 734.16
Debug.js:169 [990608][PlaybackController] Native video element event: waiting
Debug.js:169 [990619][AbrController] [video] switching from buffer occupancy to throughput ABR rule (buffer: 0.000).
Debug.js:169 [990621][AbrController] [audio] switching from buffer occupancy to throughput ABR rule (buffer: 0.000).
Debug.js:169 [990629][StreamProcessor][video] OnFragmentLoadingCompleted for stream id p0 and media type video - Url: http://refapp.hbbtv.org/videos/tears_of_steel_1080p_25f75g6sv3/v3_i.mp4
Debug.js:169 [990631][StreamProcessor][audio] OnFragmentLoadingCompleted for stream id p0 and media type audio - Url: http://refapp.hbbtv.org/videos/tears_of_steel_1080p_25f75g6sv3/a1_i.mp4
Debug.js:169 [990632][StreamProcessor][video] [video] lastInitializedRepresentationInfo changed to 2
Debug.js:169 [990633][StreamProcessor][audio] [audio] lastInitializedRepresentationInfo changed to 0

We have this issue with all dash streams with SegmentTimeline

##### Expected behavior
The seek must be completed, and the playback must end
@dsilhavy dsilhavy added this to the 5.0.0 milestone Sep 23, 2024
@dsilhavy dsilhavy self-assigned this Oct 1, 2024
@dsilhavy
Copy link
Collaborator

dsilhavy commented Oct 1, 2024

In the example MPD that you referenced (http://refapp.hbbtv.org/videos/tears_of_steel_1080p_25f75g6sv3/manifest.mpd) is a negative pdDelta for the Audio AdaptationSet:

Sum of segment durations: (263177 + (264192 * 121) + 144384) / 44100 = 734,1222902494 seconds
pdDelta: 734,1222902494 - 734,16 = - 0,0377097506

As a consequence, dash.js does not find a valid segment to fetch for duration() which is equal to 734.16.

However, the same behavior can be observed if the signaled duration matches the duration of the period. The last segment is not fetched for SegmentTimelinemanifests. This is related to TimelineSegmentsGetter:

  if (scaledMediaTime < (time + frag.d) && scaledMediaTime >= time)

This probably needs to be:

if (scaledMediaTime <= (time + frag.d) && scaledMediaTime >= time)

@harshasastry
Copy link

harshasastry commented Nov 6, 2024

Hi Daniel, Good day, is this issue fixed now, seems like it is in progress for a quite some time?

@dsilhavy
Copy link
Collaborator

dsilhavy commented Nov 7, 2024

@harshasastry This is not fixed yet, I am still thinking about the best way to solve such issues. As mentioned before, this is not just a player issue, but your content also seems to have a pdDelta.

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

No branches or pull requests

3 participants