Re: NSURL Containing RTSP and Password?
Re: NSURL Containing RTSP and Password?
- Subject: Re: NSURL Containing RTSP and Password?
- From: Brad Carter <email@hidden>
- Date: Fri, 9 Mar 2007 23:28:23 -0700
Well that got me a little further but I still can't use rtsp://.
Using the delegate connection:didFailWithError I get the error
Unsupoorted URL but http:// does work (no error). So it looks like
NSURLRequest won't handle rtsp protocols and QTMovie can't
initWithURL when it contains the user:pass@ authentication scheme. I
really can't say for sure since I'm really new to Cocoa and programming.
I can use http://address and then use the delegate
conection:didReceiveAuthenticationChallenge: and use a
NSURLCredential to authenticate so I'm pretty sure my code is right.
Is there a way to use NSURLCredential with NSURL? I don't see where
NSURL has any delegates to aid in this.
-Brad
On Mar 9, 2007, at 8:12 AM, Julio Cesar Silva dos Santos wrote:
Well, I am not a QT developer but reading the RFC for RTSP (2326)
and HTTP (1945) I think you should create an NSMutableURLRequest
and then fill in the appropriate fields for the authentication,
probably using [NSMutableURLRequest addValue: forHTTPHeaderField:]
as rtsp addresses use the same http authentication scheme.
Julio Cesar Silva dos Santos
email@hidden
Skype: jcssantos01
Blogjective-C
http://www.jcs.santos.nom.br/wp
FetchYourLyrics
http://www.jcs.santos.nom.br/fyl/fyl.html
On 09/03/2007, at 03:17, Brad Carter wrote:
Sorry if some of you read this on the QuickTime API list last week
but I didn't get any hints so I'm posting this hear as well.
I'm trying to embed a username and password in an NSURL which in
turn I use initWithURL for a QTMovie object. I have no problems
with an RTSP stream that doesn't need authentication but when I
use the following format, rtsp://user:pass@address and then test
if I'm able to init using canInitWithURL I can't init the movie.
When I try using this same format in QuickTime Player's Open URL
and get an alert saying a network error has occurred. Based on
this it appears the QT API doesn't support authentication this
way. Can anyone confirm this or have a work around?
Thanks,
Brad
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden