F
F
flamingmadness2012-10-05 18:03:15
Objective-C
flamingmadness, 2012-10-05 18:03:15

MPMoviePlayerController and background playback?

Hello.
I play video online with the help MPMoviePlayerViewControllerof UIBackgroundModesstands in audio. When the application goes into the background, playback automatically pauses, and when it returns to the active state, it continues.
But in some applications, playback is implemented in such a way that the sound from the video continues to play in the background.
Question: how, what is the magic? No matter how much I looked for a solution, not a single working one came across.
If anyone has done this, please share your solution.
Thank you very much.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
trimm, 2012-10-05
@trimm

UIBackgroundModes is irrelevant.
cocoawithlove.com/2011/04/background-audio-through-ios-movie.html
In general, there are two options to solve the problem:
1. Simple. Write your own blackjack player that can work in the background. For example, through AV Foundation.
2. Complicated and hemorrhagic. Continue to use your current class, however, when moving to the background, perform a feint with your ears and switch from playing video to playing audio (you will first need to rip it out of the video).
And in both cases, you will have to fight with AudioSession and its blend modes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question