views:

33

answers:

1

I was just wondering if the QTMovie class does handle URL redirects, because I'm streaming audio files with it and the stream URLs can contain redirects. Sometimes the movie won't start playing but doesn't throw an error (i always operate on the main thread, i know this class is not thread safe).

Any ideas why QTMovie might not start playing?

Regards, Erik

Update:


QTMovie returns following -userInfo dict on error. Does the 403 refer to HTTP 403?

{
 QTMovieStatusCodeNotificationParameter = 403,
 QTMovieStatusFlagsNotificationParameter = 26411036
}
+1  A: 

Sometimes the movie won't start playing but doesn't throw an error ….

Do you mean throw an exception, or return an error? I wouldn't expect it to throw an exception, but you should check whether the method failed and, if it did, inspect the error object.

Any ideas why QTMovie might not start playing?

Try observing for QTMovieStatusStringPostedNotification on the local notification center.

Peter Hosey
I have the objc_exception_throw breakpoint set at all times so i would notice an exception. I check if the -init returns an NSError or nil.I'll try to observe the status string, let's see if that gives some useful information.
Erik Aigner
Weird... now that I'm registered to receive status notifications, I can't reproduce the error anymore. Maybe its a race condition problem :( ?
Erik Aigner
Aaah now it occurred again with status code 403 and status flags 26411036. Where are the error codes listed? (I assume 403 means HTTP status code 403 Forbidden, or does it not?)
Erik Aigner
Where'd you get the status code and status flags from? Please edit that code into your question so you can code-format it.
Peter Hosey
I'll just pretend this is a `YES` to my answer :)
Erik Aigner