CB-12146: (android) Adds support for "playAudioWhenScreenIsLocked" already used in iOS#121
Closed
romedius wants to merge 3 commits into
Closed
CB-12146: (android) Adds support for "playAudioWhenScreenIsLocked" already used in iOS#121romedius wants to merge 3 commits into
romedius wants to merge 3 commits into
Conversation
…and if the phone rings. In this patch we handle the playAudioWhenScreenIsLocked option and we must handle three cases independently * on Pause and onResume - pause depening if playAudioWhenScreenIsLocked is set for this audio player * AudioFocus (refactored) * phone ringing (refactored) We have three general states: * No paused sounds * All sounds paused * Sounds only paused if the playAudioWhenScreenIsLocked flag is set to false
Contributor
Contributor
Author
|
Yes, I just wanted to wait with closing the other one until there is some activity on this one :) |
Contributor
Author
|
I would like to change the documentation. |
Contributor
|
Hey @romedius, A docs pr would be great! I would suggest adding it as a normal option and maybe adding a quirks section for windows saying that it doesn't support the option. A first pass of the code looks good to me. I'll test it a bit more, but expect this to get merged and part of the next media plugin release! Thanks! |
Contributor
Author
|
@stevengill Hi! I will merge the functionality this week. |
Contributor
|
Hey @romedius Can you rebase this? I'll merge it in |
Contributor
Author
|
New PR: |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Platforms affected
Android
What does this PR do?
Handle sound pausing and resuming on events like onPause, AudioFocus and if the phone rings.
In this patch we handle the playAudioWhenScreenIsLocked option and we must handle three cases independently
We have three general states:
What testing has been done on this change?
Manual testing on Nexus 5
Checklist