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

[audioplayers] Fix play() didn't work after setSource() #762

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

JSUYA
Copy link
Member

@JSUYA JSUYA commented Nov 1, 2024

When setSource() is called, or setSource() is called when play() is called,
it waits for the event of AudioEventType.prepared. If the url has not been set
or a different url is set than before, it calls the prepared event, but if the url is the same,
it does not call the event and waits for preparedCompeter. Therefore, regardless of whether the url is set,
it always resets the player and calls preparePlayer().

When setSource() is called, or setSource() is called when play() is called,
it waits for the event of AudioEventType.prepared. If the url has not been set
or a different url is set than before, it calls the prepared event, but if the url is the same,
it does not call the event and waits for preparedCompeter.
Therefore, regardless of whether the url is set, it always resets the player and calls preparePlayer().
@JSUYA JSUYA merged commit d5f304e into flutter-tizen:master Nov 4, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants