AVPlayer stops loading tracks in lock screen - ios

I was developing an app in which I'm receiving audio files from airdrop in inbox folder of the app and playing them with AVPlayer. I have turned on the background mode for audio playback. But when I lock the iPhone and current music file ends, next file doesn't load from inbox folder. But I also have audio in main Document folder, there everything is working fine.
Any help in this?

Related

iOS Cordova Media Plugin in background: MEDIA_ERR_NONE_SUPPORTED = 4

When running my app in background, I would get MediaError.MEDIA_ERR_NONE_SUPPORTED (4) when trying to create and play an audio file.
While most suggestions for this error relates to file format, file existence or audio recording, my audio files were playing perfectly when the app was in foreground.
Note: I am already using the Cordova Background Mode plugin.
It turns out that the Cordova Music Controls is causing this interference.
Without manipulating the music controls, audio plays perfectly even when the app enters background.
The problem came from destroying the music controls, which makes iOS prevent your app from playing audio until the user resumes the app to foreground.
Turns out you don't have to destroy music controls before creating them again, to update the track label.
TLDR; Don't kill music controls while playing audio in the background.

Audio Recording Stop when play video file in other Apps

We have functionality for background recording in app. It is working fine when app in background mode but it is stop when we open other app and play video file in other app then audio recording stop to recording sound in it.How can we continue recording even without stop recording when other app play video file.
Thanks

Blocking default player to play audio files ios

My App has functionality to record and play audio using AVAudioRecorder/AVAudioPlayer respectively. Whenever I download an audio file from the server, the file is opened automatically using the default player with a black screen as shown:
However, I actually have my own user interface to play audio files. How can I block this option programmatically?

How can I play music successively in the background with UIWebView or WKWebView

The website implemented inside my app would play a series of mp3 files,it works well when the app is active,but when I press HOME button or lock the phone,it cannont play more than ONE song in the background,after that,app suspended.
I've already tried to set different kind of AVAudioSession Category,but of no use.
I assume you don't have audio background mode enabled. This is what Apple documentation says:
When the UIBackgroundModes key contains the audio value, the system’s media frameworks automatically prevent the corresponding app from being suspended when it moves to the background. As long as it is playing audio or video content or recording audio content, the app continues to run in the background. However, if recording or playback stops, the system suspends the app.
So it seems like you just need to enable audio background mode. Here is Ray Wenderlich's tutorial on background modes

PhoneGap/Cordova html5 audio (jPlayer) album art on Lock Screen

I have a HTML5 Application for audio playing. It uses jPlayer for playing the audio on html5. When I bundle it within phonegap, iOS is itself fetches the audio stream and shows its navigation icons on the lock screen. Now I want to push a image to that lock screen notification. I have followed this link
How to set informations of current song to iPhone lock screen with JS
https://github.com/ChoiZ/NowPlaying/tree/phonegap2
Is there any plugin available for this.
I dont want to create a new media object with audio src but just want to pass image to the current lockscreen song.

Resources