TheWidlarzGroup/react-native-video

[feature/ios] support self signed https URL

已關閉

#2,776 建立於 2022年7月20日

 (2 則留言) (0 個反應) (0 位負責人)Kotlin (3,027 個分叉)batch import
6.x.xPlatform: iOSV6featurehelp wanted

倉庫指標

星標
 (7,677 顆星)
PR 合併指標
 (平均合併 2天 3小時) (30 天內合併 11 個 PR)

描述

When I what to play a video asset stored in self signed certificate server via iOS, it shows error as "The certificate for this server is invalid.". Is there any way to ignore certificate validation? When request data from self signed cert server with NSURLSession, I can ignore cert validation using following code

- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler {
    NSURLCredential *credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
    completionHandler(NSURLSessionAuthChallengeUseCredential, credential);
}

How can I do this in this component? as this issue #2649

貢獻者指南