// XieWei 20100125
- (void) showHelpVideo
{
NSLog(@"%s %d", __FUNCTION__, __LINE__);
NSString *moviePath = [[NSBundle mainBundle] pathForResource: @"iPhoneDecksDemoDevice" ofType: @"mp4" ];
NSURL *m_videoURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL: m_videoURL];
// Warning: undocumented API
[moviePlayer setOrientation:UIDeviceOrientationLandscapeRight animated:NO];
// Register to receive a notification when the movie has finished playing.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
[moviePlayer play];
}
阅读(877) | 评论(0) | 转发(0) |