Iphone MPMoviePlayerController使用代理身份验证从url播放视频
我开发了一个可以通过http播放视频(.mp4)的应用程序。根据许多教程,他们建议我使用MPMoviePlayerController。在我的工作场所,我必须进行代理服务器身份验证才能访问internet,但我找不到任何使用MPMoviePlayerController进行代理身份验证的示例代码,因此我无法通过http播放任何视频 你们有什么建议吗 谢谢,Iphone MPMoviePlayerController使用代理身份验证从url播放视频,iphone,authentication,proxy,mpmovieplayercontroller,Iphone,Authentication,Proxy,Mpmovieplayercontroller,我开发了一个可以通过http播放视频(.mp4)的应用程序。根据许多教程,他们建议我使用MPMoviePlayerController。在我的工作场所,我必须进行代理服务器身份验证才能访问internet,但我找不到任何使用MPMoviePlayerController进行代理身份验证的示例代码,因此我无法通过http播放任何视频 你们有什么建议吗 谢谢, 问候从苹果文档中获得了解决方案 NSURLCredential*凭证=[[NSURLCredential alloc] initWithUs
问候从苹果文档中获得了解决方案 NSURLCredential*凭证=[[NSURLCredential alloc] initWithUser:@“myusername” 密码:@“我的密码” 持久性:NSURLDERSENTIALDERSENTISTEFORSESSION]
NSURLProtectionSpace *protectionSpace = [[NSURLProtectionSpace alloc]
initWithProxyHost:@"192.168.110.14" //proxy server
port:8080
type:NSURLProtectionSpaceHTTPProxy
realm:nil
authenticationMethod:NSURLAuthenticationMethodDefault];
[[NSURLCredentialStorage sharedCredentialStorage]
setDefaultCredential: credential
forProtectionSpace: protectionSpace];
[protectionSpace release];
[credential release];