Handles the "playAudioWhenScreenIsLocked" similar to the iOS behaviour.#54
Handles the "playAudioWhenScreenIsLocked" similar to the iOS behaviour.#54romedius wants to merge 1 commit into
Conversation
If the Flag is not set the media will be played (standard behaviour up to now. If the Flag is set to false, active playing sounds are paused on the Activitys onPause event and resumed after onResume is fired. The functionality is implemented similarly to the pausedForPhone functionality.
|
Apparently playAudioWhenScreenIsLocked is deprecated on iOS (from the tickets I was reading today) anyway so this PR could probably be closed if that is correct. |
|
Hi! |
|
@ghenry22 Current sources and README do not indicate any deprecation of playAudioWhenScreenIsLocked in iOS. Which tickets did you read? https://github.com/apache/cordova-plugin-media/blob/master/README.md |
|
Hey @romedius! Thanks for sending this in! I have a few questions I was hoping you could answer to speed up the review. So right now, media will keep playing in the background by default? And your PR will allow users to pause the media when the app goes to the background. Does that sound correct? This is how it works in iOS now? @ghenry22 said it was deprecated in iOS. Is this documented somewhere? Do you have an issue number for this yet? issues.cordova.io |
|
@stevengill This is exactly the behavior. The media should pause as soon as |
|
@stevengill in the newer plugin version, 2.4.0 there is a |
|
@stevengill I've created a new pull request. See: |
|
Replaced by #121 |
If the Flag is not set the media will be played (standard behaviour up to now.
If the Flag is set to false, active playing sounds are paused on the Activitys onPause event and resumed after onResume is fired.
The functionality is implemented similarly to the pausedForPhone functionality.