You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Player interface provides a getMaxSeekToPreviousPosition() method, which returns a delay after which the player seeks to the previous item, instead of restarting the current item, when calling Player.seekToPrevious(). That delay is currently hardcoded to C.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS (3 seconds).
There is also a Player.Listener.onMaxSeekToPreviousPositionChanged(long) method, which is called when the delay changes. However, as far as we could see, there is currently no Player.setMaxSeekToPreviousPosition(long) method, allowing us to customise that delay.
Proposed solution
Provide a Player.setMaxSeekToPreviousPosition(long) method se the delay can be freely customised by developers.
If this request seems reasonable to you, I'm open to work on a PR to help integrate it in Media3.
Alternatives considered
Keep working with the current default delay.
The text was updated successfully, but these errors were encountered:
There is no particular not to have such a setter. Do you want to send a PR to add it to ExoPlayer.Builder (assuming you only want to set it once)? You can copy the pattern from setSeekBackIncrementMs.
Use case description
Currently, the
Player
interface provides agetMaxSeekToPreviousPosition()
method, which returns a delay after which the player seeks to the previous item, instead of restarting the current item, when callingPlayer.seekToPrevious()
. That delay is currently hardcoded toC.DEFAULT_MAX_SEEK_TO_PREVIOUS_POSITION_MS
(3 seconds).There is also a
Player.Listener.onMaxSeekToPreviousPositionChanged(long)
method, which is called when the delay changes. However, as far as we could see, there is currently noPlayer.setMaxSeekToPreviousPosition(long)
method, allowing us to customise that delay.Proposed solution
Provide a
Player.setMaxSeekToPreviousPosition(long)
method se the delay can be freely customised by developers.If this request seems reasonable to you, I'm open to work on a PR to help integrate it in Media3.
Alternatives considered
Keep working with the current default delay.
The text was updated successfully, but these errors were encountered: