Reputation: 198
I am working on an app which uses MPMoviePlayerController for playing a video.
Now in that I am using custom view for displaying player controllers.. I have used slider for showing the amount of duration passed for video.. now if I want to play back some portion of the video again for which i need to slide my slider back 5-6 second, then how to correlate play back of the video with that??
I am stuck with this issue.. Any help would be appreciated.. Thanks in advance.
Shreya
Upvotes: 0
Views: 504
Reputation: 198
I got it working by following code..
It may get helpful to others.. here is my explanation
Create a UISlider object in you .h file and in .m file add following code to make it work,
self.slider_Audio = [[MPVolumeView alloc] initWithFrame:
CGRectMake(VolumeSliderX,VolumeSliderY,VolumeSliderWidth,VolumeSliderHeight)];
[self.slider_Audio sizeToFit];
//if you want it vertical
CGAffineTransform trans = CGAffineTransformMakeRotation(M_PI * -0.5);
self.slider_Audio.transform = trans;
self.slider_Audio.hidden = YES;
[self.view addSubview:self.slider_Audio];
and then just run your code..
Upvotes: 1