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
For this I had to ditch the UIWebView completely.
I don't know if you get this on free vimeo accounts, but on our PRO account, in the video settings there's a tab for 'video file' and at the bottom there's a field labelled 'HTTP Live Streaming' and there's practically a direct link to your video.
And then instead of the UIWebView, I used MPMoviePlayerViewController to play the video.
Add the MediaPlayer.framework into your 'Link Binary With Libraries' setting.
In the .h file of my view controller that has a UIImageView, a couple of labels, and a play button, I imported #import
and setup a property @property(nonatomic, readonly) MPMoviePlayerViewController *player;
Then, in the .m file:
-(IBAction)playVideo:(id)sender{
NSString *videoString = @"http://player.vimeo.com/external/THE_VIDEO_ID.m3u8?p=standard,mobile&s=UNIQUE_VALUE_FOR_EACH_VIDEO";
player = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:videoString]];
[player.moviePlayer prepareToPlay];
[player.view setFrame: self.view.bounds];
[self.view addSubview: player.view];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMoviePlayerDidExitFullscreen:) name:MPMoviePlayerDidExitFullscreenNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMoviePlayerDidExitFullscreen:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
[player.moviePlayer play];
}
- (void)MPMoviePlayerDidExitFullscreen:(NSNotification *)notification{
[[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerDidExitFullscreenNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
[player.moviePlayer stop];
[player.moviePlayer.view removeFromSuperview];
}
I did try loading the HTTP Live Stream URL into the UIWebView, but it doesn't seem to work. A black screen briefly appears with the vimeo play button in the middle. Then within a second of that the fullscreen player opens for about a second, closes and then the UIWebView goes white.
I'm still testing around with this and so far have managed to play our longest video, 1hr 45min without issue over WiFi on iOS 6 and 5.1. But hopefully this will help others out as a start.