iphone - Can a UIActivityIndicator be displayed over a MPMoviePlayerController in full screen mode? -


In an iPhone app, I am making an MPMoviePlayerController and instructed me to play the video in full screen mode Do not think there is no substitute for the F / S mode on the iPad like you on the iPad.)

Once full screen player comes in, the whole screen is black and no control is visible ( MPMovieControlStyleDefault is set to) sometimes for several seconds.

After each other or three, the controls appear and the first frame of the video, then the video buffer and starts automatically.

  1. How do I get a UIActivity Indicator on top of the full screen player? I'm displaying the shared apps network activity indicator, but I want to display a full size indicator with a "Loading ..." label. I have tried to add a subview of the movie player scene, the background scene of the movie player as a subview of the movieplayer view (I was not expecting to do this work. For the course). I think the key here is that the F / S movie player is not similar to the view of the visual movieplayer when not in F / S mode. Yes? Is there a way to access full screen view?

    2. Should a player see the control (with the button shown) to start in full screen mode? There is nothing but full screen movie player when there is a long screen delay with black screen, so if they become impatient then the user can tap the tone of the language (hence only one option will exit from the other option app. ) - Would prefer to provide an option if they want to cancel the playback.

    Thanks in advance!

Not already doing so, MPMoviePlayerLoadStateDidChange Notification Notification (http://developer.apple. Com / library / ios / documentation / mediaplayer / reference / MPMoviePlayerController_Class / MPMoviePlayerController / MPMoviePlayerController.html # // apple_ref / c / data / MPMoviePlayerLoadStateDidChange for information) and before placing the movie player, convert the MPMoviePlayerController's LoadStat into MPMovieLoadStatePlayable Wait for

In this way, until the movie is ready to play, you will be able to take action on your personal view. Chuck introduced can. The way to cancel the way for the user, the aning for the movie.)

In principle, you should be able to add an activity indicator in the MPMovewPlayerController's view, but I have never tried that approach And it seems that this is not working for you.

Another option is to add the view of MPMoviePlayer under an existing activity indicator. I tried to do it successfully.

  [Movie Player Set Content URL: Trailer.Download Link]; Movieplayer.fullscreen = Yes; Movie player control style = MPMV control style fullscreen; [For movieplayer preparation]; [Self.navigationController.view addSubview: self.activityIndicator]; Self.activityIndicator.center = self.navigationController.view.center; [Self. Activation pointer beginning]; Movieplayer.view.frame = self.navigationController.view.bounds; [Self. Navigation Controller. Insert viewviewviewview: Movie Player. See belowSubweave: Self. Activation indicator];  

These are my notification handlers.

  #pragma mark MPMoviePlayerController Notifications - (zero) Movie Playerloadstate switch: (NSNotification *) Notify {NSLog (@ "LoadStat:% D", Movie Player.LoadState); If (Movie Player. LoadState and MPV LoadStat Stalled) {[Self. Activation indicator start-up]; [Pause movie player]; } And if (Movie Player. LoadState and MPMVO LoadState Playthrough OK) {[Self. Activation indicator stop animation]; [Play Movie Player]; }} - (zero) movie playerplayback last: (nsnification *) notif [ [Self. Activation indicator stop animation]; }  

Comments