Streaming video from server....Not easy..help would be appreciated!
Dear Developers,
It has been a long time since I have posted on this community - its nice to see some familiar avatars still here.
I have been developing an iphone/ipad app for cancer patients that requires streaming of video footage from a server. The app is sturctured in a simple tableview with images of a range of videos. The user selects these tableview cells and the video should then stream.
I hoped to use material saved on a private youTube account - but getting a seamless stream from the Tableview selection hasnt been easy. It seems that youTube clips must be loaded into a uiWebview and then selected. This feels clumsy.
I have subsequently opted to stream from an alternative server with .mov files. The code I am using is as follows:
NSString *videoURLString = @"https://www.dropbox.com/s/7wmltu14ti91qm9/IMG_0024.MOV";
NSURL *videoURL = [NSURL URLWithString:videoURLString];
MPMoviePlayerController moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:videoURL];
[moviePlayer prepareToPlay];
[moviePlayer play];
[self.view addSubview:moviePlayer.view];
When I select call this code the movieplayer opens, but the video will not load. I recieve an error warning in the console containing :
CGcontextsaveGState: invalid context 0x0
CGContextClipToRect: Invalid context 0x0
CGContextTranslateCTM: invalid context 0x0
CGContextDrawShading: invalid context 0x0
CGContextRestoreGSState: invalid context 0x0.
What must I do to get this code working ?
I would be very grateful for your help on this. I am also keen to learn if anyone knows of other source code that would provide a cleaner experience of youtube video streaming.
with thanks.
James