小编igr*_*cia的帖子

无法在WebRTC上设置会话描述

我设置了远程描述,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。”

iphone video-streaming ios webrtc

5
推荐指数
1
解决办法
672
查看次数

标签 统计

ios ×1

iphone ×1

video-streaming ×1

webrtc ×1