Question

I'm playing the video stream with MPMoviePlayerViewController. In my app's info.plist I have set UIBackgroundModes to audio. When I press home button while playing video playback is paused, after going back to application playback continues again. It works out of the box without having to change something. But in some applications (e.g. Jasmine) when I press Home button video's sound playing is continued in background. So I have 2 questions: 1) What's the magic? How to play video's sound in background without showing video stream itself? I can't find any working solutions. 2) If it is hard to implement, can I leave everything as it is? I have set UIBackgroundModes to audio without actually playing audio in background, so I assume my app has chances to be rejected on review stage. Am I right? Or for video streaming applications setting UIBackgroundModes is allowed even if nothing is playing in background? Thanks in advance.

Was it helpful?

Solution

  1. you must detach audio stream for background mode
  2. your app will be rejected, for sure. I seach the technical solution too ;)

OTHER TIPS

You need to set your audio session category. Have a read through the documentation here:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top