Playing audio in the background

Hi,

I’m building a music app, although currently the song that is playing fades out when the app is running in the background/lock screen. I have been trying to research on how to over come this issue but I haven’t had much luck. Has anyone else solved this issue?

ngCordova media http://ngcordova.com/docs/plugins/media/
Will this plugin solve the issue or is this just media controls. The is a note at the top about background audio that reads. http://ngcordova.com/docs/plugins/media/

A note on iOS capabilities

An app that plays or records audio continuously (even while the app is running in the background) can register to perform those tasks in the background. You enable audio support from the Background modes section of the Capabilities tab in your Xcode project. (You can also enable this support by including the UIBackgroundModes key with the audio value in your app’s Info.plist file.) Apps that play audio content in the background must play audible content and not silence.

Currently I am using the browser and ionic view for testing and haven’t used xcode.

Any help would be grateful…

Richard

@richardhowse … Any update on this. Actually I am facing the same issue. I have tested it on device. Songs are playing properly but if I close the app then songs are not playing in background. What I can do?

Sorry haven’t been on here in awhile. I was never able to solve the issue.

I’m facing the same issue, my guess is that Ionic View app was compiled without

    <key>UIBackgroundModes</key>
    <array>
      <string>audio</string>
    </array>

on the plist