English 中文(简体)
我怎么能从我的手里发射“Quicktime”?
原标题:How can I launch QuickTime from my app?

我正试图从网上录制一个录像,但是,在“Quicktime”播放这一录像时遇到麻烦。 我只能听听听音。 我要发射“快速启动方案”。

- (void)loadView {
    NSURL *movieURL = [NSURL URLWithString:@"http://movies.apple.com/media/us/mac/getamac/2009/apple-mvp-biohazard_suit-us-20090419_480x272.mov"];


    if (movieURL != nil) {
        moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];

        moviePlayer.initialPlaybackTime = -1.0;

        // Register to receive a notification when the movie has finished playing. 
        [[NSNotificationCenter defaultCenter] addObserver:self
                                                 selector:@selector(moviePlayBackDidFinish:) 
                                                     name:MPMoviePlayerScalingModeDidChangeNotification 
                                                   object:moviePlayer];

        [[NSNotificationCenter defaultCenter] addObserver:self
                                                 selector:@selector(endPlay:) 
                                                     name:MPMoviePlayerPlaybackDidFinishNotification 
                                                   object:moviePlayer];

        moviePlayer.scalingMode = MPMovieScalingModeAspectFit; 
        moviePlayer.movieControlMode = MPMovieControlModeDefault;
        moviePlayer.backgroundColor = [UIColor blackColor];

        [moviePlayer play];
    }
}
最佳回答

i 改用观点控制器:

moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:mySTVideo.video_url]];

[self presentModalViewController:moviePlayerViewController animated:YES];

[moviePlayerViewController release];
问题回答

你们是否在装置上试过? 我听到了模拟器有时在装置为科索沃时出现这一问题。

另一项解决办法是让它出现在Quick 时间:

NSString * urlStr = @"http://movies.apple.com/media/us/mac/getamac/2009/apple-mvp-biohazard_suit-us-20090419_480x272.mov";
NSString * htmlStr = [[@"<html><body><video preload="auto" autoplay="true"><source src="" stringByAppendingString:urlStr] stringByAppendingString:@""></video></body></html>"];
UIWebView * wv = [[UIWebView alloc] init];
wv.frame = self.view.frame;
[self.view addSubview:wv];
wv.hidden = true;
wv.mediaPlaybackRequiresUserAction = false;
[wv loadHTMLString:htmlStr baseURL:nil];

但是,当快速参与者关闭时,你必须从超级调查中人工删除网上调查。





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签