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

Issue in Linear restart playback #4633

Open
kumarashu123 opened this issue Nov 27, 2024 · 8 comments
Open

Issue in Linear restart playback #4633

kumarashu123 opened this issue Nov 27, 2024 · 8 comments
Labels

Comments

@kumarashu123
Copy link

Environment
  • Link to playable MPD file:
  • Dash.js version:
  • 4.7.2
  • Browser name/version:
  • OS name/version:
  • LGTV and Samsung V
Steps to reproduce
  1. Please provide clear steps to reproduce your problem
    *Restart linear/CDRV content
    *playback should start from beginning
  • Some times restart playback is working but playback start from 10 -12 sec.

Issue is not seen in dashjs version 3.1.0.

I am passing streamUrl and startPosition to restart playback from beginning.

this.dashPlayer.attachSource(
streamUrl,
0, //startPosition
);

  1. If the bug is intermittent, give a rough frequency if possible
    8/10 times
Observed behavior

Describe what the player is doing that is unexpected or undesired behaviour.
Player is not downloading segments only mpd keeps on downloading

Console output
Paste the contents of the browser console here.
You may need to enable debug logging in dash.js by calling player.updateSettings({ 'debug': { 'logLevel': dashjs.Debug.LOG_LEVEL_DEBUG }}) if you are using your own page.
Expected behavior

Describe what the player is expected to do

On restart playback playback should resume from beginning.

@kumarashu123
Copy link
Author

@dsilhavy Could you please let me know how to do linear restart?
Is there any known issue linear restart happens from 8 - 10 sec not 0?

@dsilhavy
Copy link
Collaborator

Simply calling player.attachSource(mpd) loads the MPD and starts the content from the beginning. If you are already playing the same content and would like to start from the beginning again, you can also use player.seek(0). Also make sure to use the latest released version of dash.js which is 4.7.4.

@kumarashu123
Copy link
Author

kumarashu123 commented Nov 28, 2024

@dsilhavy
Content is Linear calling player.attachSource(mpd) loads the MPD and starts video from live position.

Since i am doing linear restart calling player.attachSource(mpd, 0)
passing 0 i.e, playposition does not start playback from 0 in dash js 4.72, 4.7.4 and nightly build.
sometime playback getting stuck if i pass 0 to attachSource.

another approach i tried
this.dashPlayer.on(
DashJS.MediaPlayer.events.PLAYBACK_METADATA_LOADED, (event) => {
if (PlaybackType !== LINEAR) {
this.seek(0);
}
});
if i call seek in PLAYBACK_METADATA_LOADED playback is starting but starting from 8 -10 sec (8-10 sec content getting missed).

when i use dash.js 3.1.0 calling player.attachSource(mpd, 0) starts playback from 0.

@dsilhavy
Copy link
Collaborator

There is some documentation on how seek works in v5 (nightly build) here: https://dashif.org/dash.js/pages/advanced/timing-apis.html

I assume by "linear" content you mean live/dynamic content? In this case seeking to position 0 means seeking to the beginning of the DVR window. What might happen is that there are no segments signaled in the MPD anymore for that specific target time.

Did you also check if the behavior is similar on Desktop browsers?

@kumarashu123
Copy link
Author

Yes, linear i mean is live/dynamic content. Same content I checked with 3.1.0 version where seeking to position 0 plays from 0 sec. but in 4.7.2, 4.7.4 it does not play from beginning i.e, 0 sec.

I checked Desktop browsers behaviour is same.

@kumarashu123
Copy link
Author

@dsilhavy Issue is not seen in 3.1.0 version on seek(0) it plays from beginning. so I assume content does not have issue.
Is there any setting i need to include to work seek in 4.7.2, 4.7.4 for dynamic content?

@dsilhavy
Copy link
Collaborator

There is no specific setting. Please provide the URL to your stream to reproduce

@kumarashu123
Copy link
Author

@dsilhavy Thanks! I do not have clear content now, i have requested for clear content. Once i get i will share.

I was tracking back this issue, i found issue started from version 3.2.0. Less than 3.2.0 seek works from 0 position.

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

2 participants