2012-02-16 17 views
2

http(.mp4)でビデオを再生できるアプリケーションを開発しました。多くのチュートリアルによると、彼らは私にMPMoviePlayerControllerの使用を提案します。私の職場では、インターネットにアクセスするためにプロキシサーバーの認証を行う必要がありますが、HTTP経由でビデオを再生することができないため、MPMoviePlayerControllerでプロキシauthenを実行するサンプルコードは見つかりません。MPMoviePlayerController urlからプロキシauthenでビデオを再生

皆さんお気軽にお問い合わせください。

おかげで、 よろしく

答えて

1

は、Appleのドキュメント

NSURLCredentialからソリューションを手に入れた*資格= [[NSURLCredentialのalloc] initWithUser:@ "myusernameと指定" パスワード:@ "mypasswordという" 持続性:NSURLCredentialPersistenceForSession] ;

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]; 
関連する問題