내 iPad 앱에서 실제로 동영상 재생을 위해 MPMoviePlayerController
을 사용하고 있습니다.여러 동영상 재생
// Look for the video in the main bundle
NSString *urlStr = [[NSBundle mainBundle] pathForResource:@"3idiots.mov" ofType:nil];
NSURL *url = [NSURL fileURLWithPath:urlStr];
NSString *urlStr2 = [[NSBundle mainBundle] pathForResource:@"3idiots.mov" ofType:nil];
NSURL *url2 = [NSURL fileURLWithPath:urlStr2];
videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[self.view addSubview:videoPlayer.view];
videoPlayer.view.frame = CGRectMake(0, 0,200, 200);
videoPlayer2 = [[MPMoviePlayerController alloc] initWithContentURL:url2];
[self.view addSubview:videoPlayer2.view];
videoPlayer2.view.frame = CGRectMake(0, 300,200, 200);
[videoPlayer2 play];
NSLog(@"Video 1 playing");
[videoPlayer play];
NSLog(@"Video 2 playing");
첫 번째 비디오가 올바르게 시작됩니다하지만 두 번째 :
사실, 난 easly 한 비디오를 재생할 수 있지만 동시에 2 비디오에서 재생하기 위해 노력하고있어, 여기에 내 코드입니다.
2012-06-18 13:47:23.015 testMosaique[2498:11f03] Video 1 playing
2012-06-18 13:47:23.016 testMosaique[2498:11f03] Video 2 playing
동시에 2 개 이상의 동영상을 재생할 수 MPMoviePlayerController
을 사용하는 동안 방법이 있나요 : 여기
감사의
몇 가지 코드 또는 데모를 게시 할 수 있습니다. –
내 코드는 약간 더러워졌지만, 여기에 내가 얻은 튜토리얼이 있습니다. http://abdulazeem.wordpress.com/2012/04/02/비디오 조정 in-ios-resizing 합치고 겹치는 -video-in-ios / – Edelweiss