Take the 2-minute tour ×

I'm using this code to play a video streaming from the apple site

- (IBAction)playMovie:(UIButton *)sender {
    NSLog(@"start playing");
    //NSURL *url = [NSURL URLWithString:@"http://spatie.be/test.mov"];
    NSURL *url = [NSURL URLWithString:@"http://stream.qtv.apple.com/events/mar/123pibhargjknawdconwecown/12oihbqeorvfhbpiubqnfv3_650_ref.mov"];
    moviePlayer =  [[MPMoviePlayerController alloc]

    [[NSNotificationCenter defaultCenter] addObserver:self

    moviePlayer.controlStyle = MPMovieControlStyleDefault;
    moviePlayer.shouldAutoplay = YES;
    moviePlayer.movieSourceType = MPMovieSourceTypeStreaming;
    [self.view addSubview:moviePlayer.view];
    [moviePlayer setFullscreen:YES animated:YES];    
- (void) moviePlayBackDidFinish:(NSNotification*)notification {

    NSError *error = [[notification userInfo] objectForKey:@"error"];
    if (error) {

    MPMoviePlayerController *player = [notification object];
    [[NSNotificationCenter defaultCenter] 

    if ([player
        [player.view removeFromSuperview];


When playMovie is invoked, moviePlayBackDidFinish is immediatelty called and the error message is logged:

Did finish with error: Error Domain=MediaPlayerErrorDomain Code=-11800 "The operation could not be completed" UserInfo=0x78d25d0 {NSLocalizedDescription=The operation could not be completed}

How can I solve this error?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You didn't tag this as iOS, but MPMoviePlayer is iOS only. This should work just fine with a video that will play on iOS. Unfortunately the video you are trying to play is not iOS compatible. Try this URL:

share|improve this answer

Your Answer


