Basically I have 8 thumbnails which are buttons. When each button is tapped, it launches the video which is located on my server. However at the moment, when a thumbnail is tapped, the video launches in safari and exits the app. I want it so the video launches in the app instead of exiting it, so once the user has finished watching the video, they are then returned to the app.
Here is the code I’ve used.
-(IBAction)goAbv1:(id)sender; {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://mywebsite.com/video.mp4"]];
}
Try this if you are on iOS 3.2+
presentMoviePlayerViewControllerAnimatedwill handle the modalviewcontroller and put it on top of the stack automatically so the video can be played. This should work easily.