http stream of baselineh264 doesnt seem to work in my MPMoviePlayerViewController
Posted
by theprojectabot
on Stack Overflow
See other posts from Stack Overflow
or by theprojectabot
Published on 2010-04-17T23:33:42Z
Indexed on
2010/04/18
0:03 UTC
Read the original article
Hit count: 737
Here is some code... I have a stream that works correctly if I view with safari on the iphone or quicktimex on the mac... but the stream doesnt view in my code for the ipad simulator
- (IBAction)clickedOpenMovie:(id)sender {
NSString *myString = [NSString stringWithFormat:@"http://myipofstreamingserver:1935/live/aStream/playlist.m3u8"];
//NSString *myString = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"720p5994-prores-hq_iPhone_320x240.m4v"];
NSURL *myURL = [NSURL fileURLWithPath:myString];
[self playMovieAtURL:myURL];
}
-(void)playMovieAtURL:(NSURL*)theURL
{
//CGRect moviePlayerFrame = CGRectMake(20, 33, 100, 100);
//UIView playerView = [[[UIView alloc] initWithFrame:moviePlayerFrame] autorelease];
MPMoviePlayerViewController* movieViewController = [[MPMoviePlayerViewController alloc]
initWithContentURL:theURL];
//theMovie.scalingMode = MPMovieScalingModeNone;
//theMovie. = MPMovieControlStyleFullscreen;
//movieViewController.controlStyle = MPMovieControlModeDefault;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(myMovieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:movieViewController];
//UIViewController *movieViewController = [[UIViewController alloc] initWithContentURL:theURL];
[self presentMoviePlayerViewControllerAnimated:movieViewController];
//[theMovie play];
}
© Stack Overflow or respective owner