I'm developing an audio app using phonegap 6, cordova media plugin 2.1.0 and xcode 7 and testing in one ipad with ios 8.3 and another one ios 9.0.
Everything works fine when the app is in background without the screen locked but when I lock the screen after 20 seconds the audio stops. I could log the error event of media plugin in js and the output is MediaError.MEDIA_ERR_DECODE = 3. I'm using .play({ playAudioWhenScreenIsLocked : true })
I searched a lot to find any problem in my js but it looks ok and then stated searching for problems of cordova media plugin, xcode and ios versions and a found some problems with AVPlayer and audio background using xcode 7.
I tried some solutions like Alvinash651 with no result it actually made my audio stop in background.
I don't know what it could be or what to search anymore.
Does anyone has the same problem ?