george19gt commented on issue #281: URL: https://github.com/apache/cordova-plugin-media/issues/281#issuecomment-716180877
Hi @21pg It's works for me: Install the plugin: `ionic cordova plugin add cordova-plugin-background-mode` `npm install @ionic-native/background-mode` on your file.ts `this.platform.ready().then(() => { this.backgroundMode.enable(); this.backgroundMode.setDefaults({ hidden: true, silent: true }); this.backgroundMode.on('activate').subscribe(() => { // play or pause function }); });` On xCode check **Signing & Capabilities** -> **Background Modes** you have to enable the option **Audio, AirPlay, and Picture in Picture** ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org