Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. NSURL *url = [[NSURL alloc] initWithString:@"Pls File Url"];
  2. moviePlayer = [[MPMoviePlayerController alloc]initWithContentURL:url];
  3. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];
  4. moviePlayer.controlStyle = MPMovieControlStyleDefault;
  5. moviePlayer.shouldAutoplay = YES;
  6. [moviePlayer prepareToPlay];
  7. moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
  8. [moviePlayer setFullscreen:NO animated:NO];
  9. [moviePlayer play];
  10. UIApplication* app = [UIApplication sharedApplication];
  11. app.networkActivityIndicatorVisible = YES;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement