cordova-plugin-background-audio icon indicating copy to clipboard operation
cordova-plugin-background-audio copied to clipboard

Adds an option to pass no options to the background audio

Open cthos opened this issue 7 years ago • 3 comments

...so that it will work with cordova-plugin-media-controls along with CordovaAudio.

Problem

I want to be able to use https://github.com/homerours/cordova-music-controls-plugin to be able to control playing audio, however - the withOptions:AVAudioSessionCategoryOptionMixWithOthers setting is incompatible with the MPNowPlayingInfoCenter.

This adds a param you can set which will allow you to disable the MixWithOthers setting if you're wanting to control media via the MPNowPlayingInfoCenter.

References: https://stackoverflow.com/a/35987525/570006 https://github.com/Telerik-Verified-Plugins/WKWebView/issues/203#issuecomment-196291084

cthos avatar Apr 24 '18 20:04 cthos

Can you fix the merge problems? I merged the latest master from the original plugin into this fork.

danielsogl avatar Apr 27 '18 10:04 danielsogl

@danielsogl - So, upstream removed the line of code which prevents using media controls. I'd actually be fine with this not being an option since I don't know of an instance where I'd want withOptions:AVAudioSessionCategoryOptionMixWithOthers.

What do you think? Keep the option or just go with upstream did?

cthos avatar Apr 27 '18 15:04 cthos

(I've fixed the merge conflict, though if we're going with what upstream's done we can just totally close this PR).

cthos avatar Apr 27 '18 15:04 cthos