Reputation: 2375
In my application I want to play video in background continuously. So I don't want to play and stop video and transparent line in video.
I tried below code :
self.videoController = [[MPMoviePlayerController alloc]initWithContentURL:[NSURL fileURLWithPath:@"/Volumes/Data/Monika/Projects/Salon/Salon/Salon/Images/video/salon.mp4"]];
[self.videoController setControlStyle:MPMovieControlStyleDefault];
self.videoController.view.frame=CGRectMake(0,0, 320, 202);
[self.videoplayview addSubview:self.videoController.view];
[self.videoController play];
Upvotes: 1
Views: 415
Reputation: 282
Just set the control style to MPMovieControlStyleNone like this:
[self.videoController setControlStyle:MPMovieControlStyleNone];
Here is the Apple documentation for control style: https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMoviePlayerController_Class/#//apple_ref/c/tdef/MPMovieControlStyle
Upvotes: 4