Chinaunix首页 | 论坛 | 博客
  • 博客访问: 696638
  • 博文数量: 260
  • 博客积分: 7033
  • 博客等级: 少将
  • 技术积分: 2633
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-13 23:15
文章分类

全部博文(260)

文章存档

2012年(2)

2011年(41)

2010年(78)

2009年(139)

我的朋友

分类:

2010-01-25 16:47:59

// 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];
   
}
阅读(853) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~