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

Android: Don't request audio focus on init #188

Merged
merged 1 commit into from
Mar 23, 2021
Merged

Android: Don't request audio focus on init #188

merged 1 commit into from
Mar 23, 2021

Conversation

StevenGBrown
Copy link
Contributor

Previously audio focus was requested by the playFromFile method, which
is called during initFromFile and initFromUrl. Getting audio focus this
early means that when an AUDIOFOCUS_GAIN event is received, the track
will start playing even though the caller never requested it to play.

Now the audio focus is not requested until playing the track.

Fixes #111

Previously audio focus was requested by the playFromFile method, which
is called during initFromFile and initFromUrl. Getting audio focus this
early means that when an AUDIOFOCUS_GAIN event is received, the track
will start playing even though the caller never requested it to play.

Now the audio focus is not requested until playing the track.

Fixes #111
@StevenGBrown
Copy link
Contributor Author

OK, I think this is the last of the PRs for now. :-)

@bradmartin bradmartin merged commit a0fa059 into nstudio:master Mar 23, 2021
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.

Android: player plays last initialized sound after finishing a call
2 participants