iphone - Getting video to play in simulator -
so have alert view pop in application , on clicking view button video supposed play nothing happens in simulator. don't want test on device until working in simulator. code below far can tell should work. reaches log statement , outputs console video not play. ideas?
-(void)alertview:(uialertview *)alertview clickedbuttonatindex: (nsinteger)buttonindex{ if (buttonindex == 1) { nsurl *url = [nsurl urlwithstring:@"http://srowley.co.uk/endyvid.mp4"]; mpmovieplayercontroller *player = [[[mpmovieplayercontroller alloc] initwithcontenturl:url] autorelease]; //---play movie--- [player setfullscreen:yes]; [self.view addsubview:[player view]]; nslog(@"player should play!"); [player play]; } }
you need set frame on player's view.
[[player view] setframe: [self.view bounds]];
Comments
Post a Comment