I added MPMoviePlayerController in my view. And then i added my custom view which contain play/pause button, progress slider, volume slider, maximize button.
All are working correctly.
Now I want to change my volume slider value according to the device volume.
I had used the following code to get callback when device volume will change :
AVAudioSession *audioSession = [AVAudioSession sharedInstance];
[audioSession setCategory:AVAudioSessionCategoryPlayback error:nil];
I got two call back : UpBlock (when increase the device volume), DownBlock (when decrease the device volume)
It was work correctly for AVAudioPlayer. But when i used same for MPMoviePlayerController, it give me irrespective response when i change device volume (As following cases).
1) When I increase device volume sometime UpBlock called and sometime DownBlock called (same case occurred when I decrease device volume). 2) When I increase volume first UpBlock called and suddenly after that (automatically) DownBlock also called.
Can anybody help me?
Thanks In Advance...
After searching i found the answer of my own question.. MPMoviePlayerController has its own (base) audio session, and we can not change it.. And it will work as it is provided my apple native player i.e.MPMoviePlayerController