我设置了远程描述,didSetSessionDescriptionWithError命中了回调,并显示了错误:
- (void)processAnswer:(NSString *)sdpAnswer connectionId:(NSString *)connectionId {
//NSParameterAssert(sdpAnswer);
NSParameterAssert(connectionId);
NBMPeerConnection *connection = self.connectionMap[connectionId];
__block __weak RTCPeerConnection* peerConnection = connection.peerConnection;
RTCSessionDescription *description = [[RTCSessionDescription alloc] initWithType:RTCSdpTypeAnswer sdp:sdpAnswer];
[connection.peerConnection setRemoteDescription:description completionHandler:^(NSError * _Nullable error) {
[self peerConnection:peerConnection didSetSessionDescriptionWithError:error];
}];
}
Run Code Online (Sandbox Code Playgroud)
通话后收到此错误。
错误Domain = org.webrtc.RTCPeerConnection代码= -1“ SessionDescription为NULL。”