Youtube나 facebook에 올라가 있는 동영상을 다시 다운로드할려고 할 때

Freemake Video Download라는 프로그램을 사용해 보자

youtube/facebook의 동영상 URL만 입력하면 된다.

참고로 Facebook URL은
http://www.facebook.com/video/video.php?v=134076749968xxx

Youtube URL은
http://www.youtube.com/watch?v=L9_Mjd3exxx
형태이니 맘껏 사용하시기를...
Posted by 피의복수

iOS4 로 업글되면서 XCode도 같이 업데이트했더니..어라?
3.1이 안보인다.
그럼 나같이 아직도 3.1 쓰는 사람은 어떻게 개발하라고?

개발 시 필요한 Framework가 달라졌다. 그래서 컴파일도 안되고..ㅋㅋ
사용자 삽입 이미지

위와 같이 AVFoundation.framework는 3.x에는 없다. 이럴 경우 Role을 Required에서 Weak로 변경해 준다.

그리고 프로젝트 정보에서 배포를 3.x로 변경한다.
사용자 삽입 이미지

이렇게 하면 3.x로 컴파일도 되고, 배포도 가능하다.
단 소스에서 버전별로 처리를 해야 하는 부분이 있다면,

[[[UIDevice currentDevice] systemVersion] doubleValue] < 3.2

위와 같이 시스템의 버전을 확인한 후에 코딩이 필요하다.
근데 진짜 삽질 많이 해야 한다. iOS4가 되면서 API가 많이 달라져서..

WIPI도 그랬는데, Android 도 그렇고..젠장 이제는 iPhone까지
하위버전에 대한 100% 호환을 안해주면 어쩌란 말이냐?



Posted by 피의복수

iOS4가 나오면서 조금씩 달라지는 API들.
역시 Upgrade에 장사없다고, 하위버전에 대한 호환이 안되는군. OS자체를 다 바꿔야 하니..ㅋㅋ

일단 아래와 같이 3.2를 기준으로 하위 버전과 상위버전에 대한 처리를 다르게 해 본다.

/**
 * Video Play
 * @param data : 인식된 data
 */
- (void) playMovie: (NSString *) dataValue
{
    NSString *movieURL;
   
    movieURL = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"mp4"];

    /// iPhone Device 버전에 따라 동영상 Play
    if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 3.2) {
        /// MPMoviePlayerViewController 초기화
        MPMoviePlayerViewController *playerView = [[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:movieURL]] autorelease];
        playerView.view.backgroundColor = [UIColor blackColor];
        playerView.moviePlayer.scalingMode = MPMovieScalingModeAspectFit;
       
        /// 동영상 끝났을때 호출
        [[NSNotificationCenter defaultCenter] addObserver:self
                                                 selector:@selector(playbackDidFinish:)
                                                     name:MPMoviePlayerPlaybackDidFinishNotification
                                                   object:playerView.moviePlayer];
        /// Play the movie
        [self presentMoviePlayerViewControllerAnimated:playerView];
    }
    else if    ([[[UIDevice currentDevice] systemVersion] doubleValue] < 3.2) {
        /// MPMoviePlayerController 초기화
        MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:movieURL]];
        moviePlayer.initialPlaybackTime = 0;
        moviePlayer.scalingMode = MPMovieScalingModeAspectFill;
        moviePlayer.movieControlMode = MPMovieControlModeDefault;
        /// 동영상 끝났을때 호출
        [[NSNotificationCenter defaultCenter] addObserver:self
                                                 selector:@selector(playbackFinishedCB:)
                                                     name:MPMoviePlayerPlaybackDidFinishNotification
                                                   object:moviePlayer];
        /// Play the movie
        [moviePlayer play];
    }
}



/**
 * when the movie is finished
 */
- (void) playbackFinishedCB:(NSNotification *) aNotification
{
    if ([[[UIDevice currentDevice] systemVersion] doubleValue] >= 3.2) {
        MPMoviePlayerController *player = [aNotification object];
        [[NSNotificationCenter defaultCenter] removeObserver:self
                                                        name:MPMoviePlayerPlaybackDidFinishNotification
                                                      object:player];
        [player stop];
        [self dismissMoviePlayerViewControllerAnimated];
    }
    else if ([[[UIDevice currentDevice] systemVersion] doubleValue] < 3.2) {
         MPMoviePlayerController *player = [aNotification object];
       
        [[NSNotificationCenter defaultCenter] removeObserver:self
                                              name:MPMoviePlayerPlaybackDidFinishNotification
                                              object:player];
        [player stop];
        [player release];
    }
}


Posted by 피의복수

푸켓을 가본지 벌써 10년도 더 되었다.
한 번 더 가야지 하면서도 그놈의 돈이 뭔지...사실 마음의 여유가 없다는 것이 맞을 것이다.

더 늙기전에, 다닐 수 있다고 판단될 때 함 가보려 한다.

오늘은 푸켓과 관련된 Blog를 하나 발견했다. 항상 태사랑만 다니다가 좀 신선하네^^
http://blog.daum.net/thaistart/

자유여행..정말 하고 싶다.
Posted by 피의복수

MAC에 있는 iWeb으로 사이트를 만들면 곤란한 경우가 발생한다.
이게 다른데서 만든 것을 불러올 수가 없다. 오직 자신의 MAC에서 만들어진 것을 사용할 수 밖에 없는데, 지금부터 내가 만든 사이트를 다른 사람이 볼 수 있도록, 그리고 다른 사람이 만든 사이트를 내가 가져올 수 있도록 작업을 해 본다.

헐^^도대체 어디에 저장을 하는겨?

MAC의 Application은 대부분 사용자계정의 Library에 데이터를 저장한다.
Library > Application Support 에 가면 Application이 사용하는 또는 저장한 데이터들이 있다.
cd iWeb 에 가서 안의 내용을 보면 Domain.sites2라는 directory가 보일 것이다.
그 안에 모든 내용이 있다고 보면된다.

Domain1.sites2라는 directory를 만들어서 모든 내용을 여기에 복사한 후 다른 사용자에게 배포하면 된다.

참 쉬죠~~

Posted by 피의복수

BLOG main image
일에 필요한 자료 by 피의복수

카테고리

분류 전체보기 (40)
프로그램이야기 (38)
끄적끄적 (1)
취미 (0)
서비스이야기 (1)
빅데이터 (0)

최근에 올라온 글