Tag: mpmovieplayercontroller

How do I play simultaneous videos on iPhone

Is it possible to play 2 different videos on the same time on the I phone? using MPMoviePlayerViewController, for example? I didn’t find any solutions.

How to Open Youtube video in MPMoviePlayerController and Play it

i use this method before 1 time. but Now i can not get video from this URL that direct-play YouTube video in MPMoviePlayerController. URL = http://www.youtube.com/watch?v=JPUWNcGDyvM&feature=player_embedded – (void)viewDidLoad { player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:[NSString stringWithFormat:@”http://www.youtube.com/watch?v=JPUWNcGDyvM&feature=player_embedded”]]]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:player]; //—play movie— [player prepareToPlay]; [player pause]; player.view.frame = CGRectMake(0, 0, 320, 367); [self.view […]

How to play .m3u8 or .ts file in iOS?

I have create one iOS application in xCode 4.5.1. The main purpose of this applciation is the playing .m3u8 video file. I have add one .m3u8 file with all segment(.ts) in our local resource bundle. So, how to play this file in iPhone locally using MPMoviePlayerController or UIWebView? And, Can we modify or not this […]

MPMoviePlayerViewController play movie from Documents directory – objective-c

I have subfolder called “Video” in Documents folder. And there is somevideo.mp4 file. I have full path to this file but MPMoviePlayerViewController doesn’t want to play video from local. Here is code: NSString *path = [[self getVideoFolderPath] stringByAppendingPathComponent:@”somevideo.mp4″]; NSURL *fURL = [NSURL fileURLWithPath:path]; MPMoviePlayerViewController *videoPlayerView = [[MPMoviePlayerViewController alloc] initWithContentURL:fURL]; [self presentMoviePlayerViewControllerAnimated:videoPlayerView]; [videoPlayerView.moviePlayer play]; It doesn’t […]

Playing MPMoviePlayerController Synchronously with AVAudioPlayer

I’m trying to add a movie to the intro of a game. The movie has no sound/music. I do, however, have music looping in the background. The music is somewhat specific in that the intro of the music is as long as the movie and then the tempo kicks in a bit faster. The problem […]

UIImagePickerController choosing video prevents MPMoviePlayerViewController instance from working

I have a viewcontroller where I present an UIImagePickerController in a popOver. If the user selects a video, then dismisses the popover and moves on to the next “page (viewcontroller)” and attempts to play any movies using MPMoviePlayerViewController on that page they are unable to do so. I believe that what is happening is that […]

MPMoviePlayerController stops working in full screen mode // portrait orientation // iOS 7

In my project I use embeded view, which has MPMoviePlayerController inside. This movie player stops working after tapping full screen toggle – it plays 1 more second in full screen mode and then stops and turns back to the inline mode. It happens only in portrait mode and only for iOS 7 – if I […]

How to play video using MPMoviePlayerController?

I am using the following code to play the video using the MPMoviePlayerController , but the video is not played. Can anyone tell me why ? NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@”/one.mp4″]; NSString *mediaPath = [[[NSBundle mainBundle]resourcePath] stringByAppendingPathComponent:filePath]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:mediaPath]]; […]

Best way to implement MPMoviePlayer timeout

I have MPMoviePlayer that load movie from stream. I implemented timeout on 15 seconds with timers. But is there maybe some other better way to implement timeout without timer?

Get notifications when a Dailymotion video is played into a UIWebView

I’m currently showing a dailymotion url directly into a UIWebview. When tapping on the thumbnail image, the video starts playing in fullscreen mode. The problem is: when the video stops playing or the user tapps the “done” button, the original thumbnail has disapeared from the UIWebview, making it impossible to launch the video again. I […]