我有问题,利用MoviePlayerController议员拍摄一个嵌入式录像文档。 我的法典:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0];
NSString *proud = [[documentsDirectoryPath stringByAppendingPathComponent:@"archives"] stringByAppendingPathComponent:selectedCountry];
NSString *content = [proud stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *url = [[NSURL fileURLWithPath:content] retain];
NSLog(@"%@", url);
player =
[[MPMoviePlayerController alloc] initWithContentURL: url];
[player prepareToPlay];
player.allowsAirPlay = YES;
player.scalingMode = MPMovieScalingModeAspectFit;
player.view.frame = self.view.frame;
[self.view addSubview: player.view];
[player setFullscreen:YES animated:YES];
// ...
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitedFullscreen:) name:MPMoviePlayerDidExitFullscreenNotification object:player];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayerWillExitFullscreen:)
name:MPMoviePlayerWillExitFullscreenNotification
object:player];
[player play];
安保记录仪的返回
var/mobile/Applications/EF62B00B-2906-435C-BC84-036FE14D89E9/Documents/archives/Test%2520-%2520Daddy%2520May%25201%252001:26:35%2520PM.mp4
但是,录像从来就没有播放,尽管在MPMoviePlayerController 电影Finished Callback的标志一中确实触发了电影。 任何想法?