How can I know users click fast forward and fast rewind buttons on the playback controls in iPhone

I got the answer by myself. That is using UIApplication’s beginReceivingRemoteControlEvents. In an appropriate place (like viewWillAppear:) put the following code [[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; [self becomeFirstResponder]; And the view controller should implement the following method returning YES – (BOOL)canBecomeFirstResponder { return YES; } And then you can receive remote controller event in the following method. … Read more

MPMoviePlayer done button issue

You can do that by adding a notification handler on MPMoviePlayerDidExitFullscreenNotification as that notification gets sent once the user taps on the DONE Button. Somewhere in your initializer [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMoviePlayerDidExitFullscreen:) name:MPMoviePlayerDidExitFullscreenNotification object:nil]; Now implement that handler: – (void)MPMoviePlayerDidExitFullscreen:(NSNotification *)notification { [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerDidExitFullscreenNotification object:nil]; [moviePlayerController stop]; [moviePlayerController.view removeFromSuperview]; }

How to play video stream with MPMoviePlayerController in iOS

Instead of creating a MPMoviePlayerController and adding that to your view, it is probably simpler to create a MPMoviePlayerViewController and present that view controller modally (since you are trying to show your video full screen anyway). Then the MPMoviePlayerViewController can manage the presentation of your video for you. MPMoviePlayerViewController *mpvc = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; [[NSNotificationCenter … Read more

Play YouTube videos in iPhone app without using UIWebView?

Just use XCDYouTubeVideoPlayerViewController. It seamlessly adds youtube video to your app without the need of UIWebView. It uses progressive download + MoviePlayer and AVFoundation frameworks. Just supply it with a youtube video ID and you are good to go. It supports both full-screen & non full-screen and WORKS ON iOS SIMULATOR!!! Example: XCDYouTubeVideoPlayerViewController *videoPlayerViewController = … Read more

Autorotate in iOS 6 has strange behaviour

From Apple’s iOS 6 SDK Release Notes: Autorotation is changing in iOS 6. In iOS 6, the shouldAutorotateToInterfaceOrientation: method of UIViewController is deprecated. In its place, you should use the supportedInterfaceOrientationsForWindow: and shouldAutorotate methods. More responsibility is moving to the app and the app delegate. Now, iOS containers (such as UINavigationController) do not consult their … Read more

How to receive NSNotifications from UIWebView embedded YouTube video playback

There are no documented notifications sent by the UIWebView embedded movie player. In fact, the closed implementation used within the UIWebView does differ from the public MPMoviePlayerController in many aspects (e.g. DRM). The most important classes used for playing video content within that UIWebView are called MPAVController and UIMoviePlayerController. The latter one makes the player … Read more