0
我正在玩使用下面的代碼的電影,但想知道是否有一種方法來保存這個電影文件,當用戶按下按鈕時,我保存在應用程序中保存到設備的相機膠捲。如何將資源中存儲的視頻保存到相機膠捲?
NSString *moviePath = [[[NSBundle mainBundle] resourcePath]
stringByAppendingPathComponent:@"video.mp4"];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]
initWithContentURL:[NSURL fileURLWithPath:moviePath]];
moviePlayer.movieControlMode = MPMovieControlModeDefault;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(movieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];
[moviePlayer play];