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

Support t= URL parameter to specify start position #1041

Open
yoobi opened this issue Jan 29, 2024 · 3 comments
Open

Support t= URL parameter to specify start position #1041

yoobi opened this issue Jan 29, 2024 · 3 comments
Assignees

Comments

@yoobi
Copy link
Contributor

yoobi commented Jan 29, 2024

Use case description

The use case would be to start the dash stream at a specific position.
For example, a dash stream has a duration of 60 minutes, and we want to start the stream at 10 minutes instead of 0 minute.
This avoids having to load the first chunk just to do a player.seekTo() and loading chunks again at the desired position.

Proposed solution

After reading from dash.js repository, they use a #t=600 at the end of the url to notify it should start at 10 minutes.

Alternatives considered

Using player.seekTo()

@tonihei
Copy link
Collaborator

tonihei commented Jan 29, 2024

This avoids having to load the first chunk just to do a player.seekTo() and loading chunks again at the desired position.

If you seek before calling prepare, the media is immediately loaded from the requested position. Have you tried to call methods in this order?

If you want to support t= URL parameters, you can also easily convert parameter to a seek operation when setting the media item.

I can mark this issue as an enhancement to support this automatically (as it has also been asked for HLS before: google/ExoPlayer#9946). The right implementation may depend on google/ExoPlayer#6373 to be able to specify a start position that does not override the default position.

@tonihei tonihei changed the title Start dash stream at specific position Support t= URL parameter to specify start position Jan 29, 2024
@yoobi
Copy link
Contributor Author

yoobi commented Jan 30, 2024

Hello,

Thank you ! I didn't know calling seek before prepare would work, I'll try it out and tell you about it

@yoobi
Copy link
Contributor Author

yoobi commented Feb 6, 2024

I've managed to load only once be seeking before preparing the media, thank you

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

No branches or pull requests

2 participants