Support t= URL parameter to specify start position
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()
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: https://github.com/google/ExoPlayer/issues/9946). The right implementation may depend on https://github.com/google/ExoPlayer/issues/6373 to be able to specify a start position that does not override the default position.
Hello,
Thank you ! I didn't know calling seek before prepare would work, I'll try it out and tell you about it
I've managed to load only once be seeking before preparing the media, thank you