-
-
Save fra3il/525f4c49eb1e3e09e6ae to your computer and use it in GitHub Desktop.
[WP/171] YouTube 동영상의 재생, 종료 시점을 확인하는 방법
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad { | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeStarted:) name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(youTubeFinished:) name:@"UIMoviePlayerControllerDidExitFullscreenNotification" object:nil]; | |
} | |
- (void)youTubeStarted:(NSNotification *)notification { | |
NSLog(@"youTubeStarted"); | |
} | |
- (void)youTubeFinished:(NSNotification *)notification { | |
NSLog(@"youTubeFinished"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// iOS4.3 이상 | |
UIMoviePlayerControllerDidEnterFullscreenNotification | |
UIMoviePlayerControllerDidExitFullscreenNotification | |
// iOS4.2 이하 | |
UIMoviePlayerControllerDidEnterFullcreenNotification | |
UIMoviePlayerControllerDidExitFullcreenNotification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// YouTube | |
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_4_3 | |
#define UIMoviePlayerControllerDidEnterFullscreenNotification @"UIMoviePlayerControllerDidEnterFullscreenNotification" | |
#define UIMoviePlayerControllerDidExitFullscreenNotification @"UIMoviePlayerControllerDidExitFullscreenNotification" | |
#else | |
#define UIMoviePlayerControllerDidEnterFullscreenNotification @"UIMoviePlayerControllerDidEnterFullcreenNotification" | |
#define UIMoviePlayerControllerDidExitFullscreenNotification @"UIMoviePlayerControllerDidExitFullcreenNotification" | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment