Answer the question
In order to leave comments, you need to log in
[[+content_image]]
MPMoviePlayerController + multicast rtp stream?
This is the code that gives the error
- (void)viewDidLoad
{
[super viewDidLoad];
NSURL *streamUrl = [NSURL URLWithString:@"rtp://@238.xx.xx.xx:1234"];
playerController = [[MPMoviePlayerController alloc] initWithContentURL:streamUrl];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
[playerController setControlStyle:MPMovieControlStyleFullscreen];
[playerController setMovieSourceType:MPMovieSourceTypeStreaming];
[playerController setFullscreen:YES];
[self.view addSubview:playerController.view];
[playerController.view setFrame: self.view.bounds];
[playerController prepareToPlay];
[playerController play];
}
- (void) moviePlayBackDidFinish:(NSNotification*)notification {
NSError *error = [[notification userInfo] objectForKey:@"error"];
if (error) {
NSLog(@"Did finish with error: %@", error);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question