Playing mp3 from librarydirectory with AVAudioPlayer in background

140 views Asked by At

I'm playing mp3 files with the standard AVAudioPlayer.
Since iOS 8.1 playing background audio when the device is locked is no longer working:
10-20 seconds after the device is locked the playback stops.
Leaving the app via the home button is no problem.
Running on iOS 8.0 is no problem.
Playing bundled audio is no problem.

The problem only occurs when all three conditions are met: Play file from user directory when device is locked on iOS 8.1.

The problem seems to be that the file input stream stops providing data and thus the buffer runs empty: I debugged the playback using STK StreamingKit Player and observed that the streams hasBytesAvailable method returned NO shortly before the playback stopped.

Are there any new rules for file access? I can't find any information in the release notes... Anybody an idea?

0

There are 0 answers