views:

135

answers:

2

I want to play a video from a remote server and not from youtube. The video should start streaming in the in built video player of the iphone.

Can anyone help me with this.....

Thanx in advance

A: 

You can use the Media Player Framework, there is an example here http://developer.apple.com/iphone/library/samplecode/MoviePlayer%5FiPhone/index.html

mbehan
Thanx for the link but when I am trying to play my video on the iphone it says the "the file could not be found". When I try to play a youtube video it says "The server is not correctly configured" Can anybody help me with this error msg....
Atulkumar V. Jain
A: 

I use UIWebView to play my apps tutorial movies. Just make sure you're providing an iPhone-compatible movie format.

NSUrl *url = @"http://streamXXX.com/mymovie.m4v";
[yourWebview loadRequest:[NSURLRequest requestWithURL:url]];

And FWIW, I was going to embed the videos in my bundle, but it quickly grew beyond the 10MB app store download limit (when not connected with wifi) so after fighting with hosting them at youtube, blip.tv came to the rescue. My vids weren't reformatted dimensionally @blip.

wkw
I tried what u have given but gives a runtime error statingTerminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString absoluteURL] : unrecognised selector sent to instance 0*3030'
Atulkumar V. Jain
How to embed videos in the bundle?
Atulkumar V. Jain