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

Fixes #13904 - ExoPlayer can't start a new audio from a seek point #13905

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Sagar0-0
Copy link
Contributor

@Sagar0-0 Sagar0-0 commented Jan 13, 2025

Closes #13904

First time contributor checklist

Contributor checklist

  • Device Realme GT Neo 3t, Android 14
  • Device Infinix Hot 20 Pro, Android 14
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

After doing some research I have found that exoplayer can not seek to a position if it does not have the required information for the file, and it can only get the information once it is ready, so we need to first call the play.prepare(), but this does not guarantee that after this line the player will be ready and got the required information, so need to add a callback that will seek to the required position for the first audio file.

Screenshot after fixing:

document_6064240865558139971.mp4

NOTE:

This solution is only applicable if we are playing one audio and won't work for consecutive audio plays, as we only have the progress/seek position information for the first audio file when consecutive call is made.

Possible solution:
We might need to pass or store the progress information of all the consecutive audio files we are about to play. This can require a larger refactoring of the Controller file, so I have not touched it yet.

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

Successfully merging this pull request may close these issues.

ExoPlayer can't start a new audio from a seek point
1 participant