2010-07-07 3 views
0

MpMoviePlayerController 내 AAP에서 비디오를 재생하려면. 아래 그림에서 빨간색 원으로 표시된 컨트롤 버튼을 눌러 알림을 처리하고 싶습니다. Iphone MPMoviePlayer 알림

alt text http://grab.by/5iOY

어떤 사람은 나를 도울 수있는 알림이 제어 버튼의 불을 수행 ???

업데이트 :이 방법으로 그것을 시도 ,

NSString * filePath = [[NSBundle mainBundle] pathForResource:@"Movie" ofType:@"m4v"]; 
NSURL *url = [NSURL fileURLWithPath:filePath]; 
self.player = [[[MPMoviePlayerViewController alloc] initWithContentURL:url] autorelease]; 
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieDidExitFullScreen:) 
              name:MPMoviePlayerDidExitFullscreenNotification 
              object:self.player.moviePlayer]; 
[self.window addSubview:self.player.view]; 

그리고 선택의 기능은 다음과 같습니다

-(void)movieDidExitFullScreen:(id)sender{ 
NSLog(@"Movie player did exit full screen");} 

그러나 제어 버튼을 눌러 때 함수가 호출되지 없구요.

m 일이 잘못되어 있다면 알려주십시오.

감사합니다,

답변

0

나는 이것이 MPMoviePlayerScalingModeDidChangeNotification를 생성합니다 생각합니다. 알림을 받으면 scalingMode 속성 값을 확인하여 플레이어가 전환 된 배율 모드를 확인해야합니다.

업데이트 :

이 설명서를 보면은 MPMoviePlayerController는 (보다 구체적으로 MPMovieControlStyle 열거), 당신이 처리하는 버튼이 포함 된 전체 화면보기 사이에서 전환 될 것으로 보인다. 이 코드는 MPMoviePlayerWillEnterFullscreenNotification이어야하며 그에 해당하는 WillExitDidEnter/ DidExit 알림을 생성해야합니다.

+0

안녕 FRANCI 덕분 같이해야합니다. 확인했지만이 컨트롤 버튼은 알림을 보내지 않습니다. "MPMoviePlayerScalingModeDidChangeNotification"알림은 진행률 표시기 끝에있는 제어 단추를 통해 전송됩니다. – Nic

1

당신의 선택 기능은 귀하의 회신이

-(void)movieDidExitFullScreen:(NSNotification *)notification