I'm trying to figure out a way so I can STOP my audio session
if a view is changed using the tab bar controller.
To make things clear, I'm using a Tab Bar Controller to switch views.
One view is a page where you can play audio (AVAudioPlayer),
and another view plays movie (MPMoviePlayer).
The problem is, when the audio is playing on one view,
and if I try to play the movie on the other view (while the audio is playing),
somehow the audio session function dies after the movie finishes playing.
It won't let me play the audio anymore even if I go back to the view that plays Audio.
So if I can somehow force the audio to stop before the Movie starts playing
I will be able to save the Audio session from being destroyed.
Any idea how I should solve this problem??
I've tried many different approach but couldn't fix this bug...
if a view is changed using the tab bar controller.
To make things clear, I'm using a Tab Bar Controller to switch views.
One view is a page where you can play audio (AVAudioPlayer),
and another view plays movie (MPMoviePlayer).
The problem is, when the audio is playing on one view,
and if I try to play the movie on the other view (while the audio is playing),
somehow the audio session function dies after the movie finishes playing.
It won't let me play the audio anymore even if I go back to the view that plays Audio.
So if I can somehow force the audio to stop before the Movie starts playing
I will be able to save the Audio session from being destroyed.
Any idea how I should solve this problem??
I've tried many different approach but couldn't fix this bug...