views:

37

answers:

2

I am basically making a video library where you download videos and I then write them to the applications documents folder. This all works fine and if i stream the video from online it plays fine. Or indeed I can stream it from the resource folder fine.

However, after downloading it and saving to the documents folder then attempting to stream I get the error 'movie format not supported' any ideas?

thanks very much

A: 

Probably your code fails to write the file successfully. Did you checked the size of the file (and does it match the size of the video).

However: If the video format isn't a supported one, this wont work at all ;)

unset
great idea, will check the size now
padatronic
I am such a mug, wasn't downloading the actual file!!! got it now thanks
padatronic
A: 

Hi,

I'd appreciate if you could post some code, or explain the general idea, about how you're downloading files (image, video). Are you using Objective-C or Javascript?

I'm looking for some javascript code but I can't find any.

Thanks.

StJimmy
Yeah i am doing it using object-c using nsurlconnection
padatronic
downloadConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if (downloadConnection) { } else { // Inform the user that the connection failed. NSLog(@"the connection failed "); }
padatronic
you then have didReceiveResponse
padatronic
didReceiveData and connectionDidFinishLoading check out the docs
padatronic