2013-05-10 3 views
1

내가 엑스 코드 아이폰 프로젝트에서 기본 비디오 플레이어를 대체하는 비디오 플레이어 프레임 워크에 와서 IGN VideoPlayerKit : 그것은 위대한 찾고 https://github.com/ign/VideoPlayerKit임베드 VideoPlayerKit가

, 나는 그것이 작동했다,하지만 난 관리 할 수 ​​없습니다 github의 첫 번째 스크린 샷 (아래 테이블 뷰가있는 videoplayer)과 같이 내 앱 기본보기에 비디오를 인라인으로 포함합니다.

// ViewController.h 

#import 
#import "VideoPlayerKit.h" 

@interface ViewController : UIViewController 

@property (nonatomic) BOOL fullScreenToggled; 

@end 

// ViewController.m 

#import "ViewController.h" 

@interface ViewController() 

@property (nonatomic, strong) VideoPlayerKit *ViewController; 

@end 

@implementation ViewController 

    (id)init { if ((self = [super init])) { } return self; } 

// Fullscreen/minimize without need for user's input 

    (void)fullScreen 
    { 
    if (!self.ViewController.fullScreenModeToggled) { 
    [self.ViewController launchFullScreen]; 
    } else { 
    [self.ViewController minimizeVideo]; 
    } 
    } 

    (void)playVideo 
    { 

    NSURL *url = [NSURL URLWithString:@"http://mystream.m3u8"]; 

    self.ViewController = [VideoPlayerKit videoPlayerWithContainingViewController:self optionalTopView:NO hideTopViewWithControls:YES]; 

    [self.ViewController playVideoWithTitle:@"Title" URL:url videoID:nil shareURL:nil isStreaming:NO playInFullScreen:YES]; 

} 

    (void)viewDidLoad 
    { 
    [super viewDidLoad]; 
    } 

    (void)didReceiveMemoryWarning 
    { 
    [super didReceiveMemoryWarning]; 
    // Dispose of any resources that can be recreated. 
    } 

@end 

누구나 내가 여기에 누락 무엇인지 어떤 생각을 :

은 여기 내 기본보기 파일과 같이 무엇인가? 아니면 내가 뭘 잘못하고있는거야?

답변을 원하면 감사합니다. 다윗은 일명

답변

0

난 당신이보기의 프레임을 설정해야합니다 발견 대칭 이동

self.ViewController.view.frame=CGRectMake(10.0f,10.0f,200.0f,200.0f);