I have only one question:
And I think the answer to this question is very useful I then add a UIViewController for this purpose. First of all: YouTube Player is an MPMoviePlayerController, send the frame of youTubeView under the code to YouTube Player and show youtubeplayer on youTubeView:
[youtubeplayer.view Setframe: youTubeView.bounds]; [YouTubeViewAdviewView: youtubeplayer.view]; After switching to fullscreen, I want to add youtubePlayer.view to a new UIViewController, then it can do auto-rotation: playerFullScreen = [[UIViewController alloc] init];
[playerFullScreen.viewAdsview: youtubePlayer.view]; [App push viewcontroller: playerFullScreen animated: no]; But the screen turns white, the video is not visible, what should I do?
You do not have to use the UIViewController ; MPMoviePlayerViewController works just fine, and like YouTube (I think), there are their own tasks to present the video in a modely manner. Instead of using addSubview , try using setView : I spend a lot of time researching this and then working perfectly Planted
Movie Player = [[MP3 MPV Player Controller Alok] Init With Content URL: Video -URL]; // Call for movie playback after video ends [[NSNation Centers Default Center] addObserver: Self Selector: @selector (Movie PLAYBackDidFinish :) name: MPMoviePlayerPlaybackDidFinishNotification Object: Movie Player]; PlayerView = [[MP3 MPV Player Viewer Alloc] init]; [Movie Player Set Control Style: MPMVE Control Style Fullscreen]; [Set player view: movie player. See]; [Movie player. View setframe: self.view.bounds]; // player frame should meet with parents [self current movie player view controller: unlimited: player view]; [Play Movie Player]; NSLog (@ "playing video footage"); and while rejecting your call
- (zero) movie PlayBackDidFinish: (NSNotification *) Notification {MPMoviePlayerController * player = [notification object]; [[NSNotificationCenter defaultCenter] Deletion Observer: Own Name: MPMVplayerplaybackDefinition Object: Player]; [Self-rejectMoiplayerViewControllerApplied]; NSLog (@ "Deleted Video Views"); }
Comments
Post a Comment