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

Ensure new track plays from start after replacement #95

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

puckey
Copy link
Contributor

@puckey puckey commented Oct 19, 2023

Added a seek operation to reset the playback position when replacing a track in ExoPlayer. Previously, after replacing a track while in Player.STATE_ENDED, the player would maintain its position at the end of the old track. By seeking to the start of the newly added track, we ensure that playback begins from the beginning of the new media item.

This fixes an issue in rntp where:

  • First adding a single track and playing it.
  • Waiting for the track to end.
  • Then calling Trackplayer.load(otherTrack) and Trackplayer.play()
  • The new track would not start playing.

Added a seek operation to reset the playback position when replacing a track in ExoPlayer. Previously, after replacing a track while in Player.STATE_ENDED, the player would maintain its position at the end of the old track. By seeking to the start of the newly added track, we ensure that playback begins from the beginning of the new media item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants