views:

45

answers:

1

I'm using MPMoviePlayerController to play a video which has audio as well. Its working fine. I'm hiding the default controls. So no controls are showing on the video. I want to place a slider on the video (i successfully placed a slider as well over the video). With the slider, I want to control the volume of the video that is being played. How can I control volume of video?

A: 

See the documentation for MPVolumeView. Here is a sample code that I use in my view controller.

MPVolumeView *systemVolumeSlider =
    [[MPVolumeView alloc] initWithFrame: CGRectMake(10, 10, 200, 40)];
[self.view addSubview: systemVolumeSlider];
[systemVolumeSlider release];
RawMean