MPMoviePlayerController _itemFailedToPlayToEnd error while playing iOS 7 RTMP video

I am trying to play a video, for example:

- (void) playMovie {
    NSURL *url = [NSURL URLWithString:
                  @"rtmp://122.129.75.174:61935/live/peghamtvX007"];
    MPMoviePlayerController *controller = [[MPMoviePlayerController alloc]
                                           initWithContentURL:url];

    self.videoController = controller; //Super important
    controller.view.frame = self.view.bounds; //Set the size

    [self.view addSubview:controller.view]; //Show the view
    [controller play]; //Start playing
}

But he did not play. Here is the error:

_itemFailedToPlayToEnd: {
    kind = 1;
    new = 2;
    old = 0;
}

Is it possible to play rtmp link in WebViewusing MPMoviePlayerController? and also help me with this error.

+4
source share

Source: https://habr.com/ru/post/1542442/


All Articles