我设置了远程描述,回调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];
}];
}
通话后收到此错误。
错误Domain = org.webrtc.RTCPeerConnection Code = -1“SessionDescription为NULL。”
答案 0 :(得分:0)
我遇到了相同的错误,并通过在Offer字符串的末尾添加“ \ n”来解决该错误。希望这会有所帮助。