Embedded vimeo video in iPhone app using iOS 6 not playing

前端 未结 2 895
太阳男子
太阳男子 2021-02-06 16:46

I can\'t seem to get any videos playing in iOS 6. Both on the device (iP4) and simulator.

What I have is a UIWebView setup in IB. Then in my viewDidLoad I h

2条回答
  •  猫巷女王i
    2021-02-06 17:15

    You can still use UIWebview by registering to notifications from UIMoviePlayerController and handling the corresponding events...

    -(void)viewDidLoad
    {
    
    ...
    
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoStarted:)   name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoFinished:) name:@"UIMoviePlayerControllerDidExitFullscreenNotification" object:nil];
    }
    
    -(void)videoStarted:(NSNotification *)notification{
    // your code here
    }
    
    -(void)videoFinished:(NSNotification *)notification{
    // your code here
    }
    

提交回复
热议问题