You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/10/25 17:17:41 UTC

[GitHub] [cordova-plugin-media] george19gt commented on issue #281: Stalled Playback on iOS in sleep mode after a few seconds of streaming large audio file

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org