如何在WebRTC iOS中进行音频通话时知道两个客户端之间的网络丢失

时间:2018-09-07 08:47:58

标签: ios webrtc

在IOS中使用webRTC音频呼叫时,如何确定两个客户端(任一侧)之间的网络丢失?在android中使用onPeerConnectionError进行识别。

1 个答案:

答案 0 :(得分:0)

这里是:

/** Called any time the IceConnectionState changes. */
- (void)peerConnection:(RTCPeerConnection *)__unused peerConnection didChangeIceConnectionState:(RTCIceConnectionState)newState {

    /*
     * RTCIceConnectionStateNew,
     * RTCIceConnectionStateChecking,
     * RTCIceConnectionStateConnected,
     * RTCIceConnectionStateCompleted,
     * RTCIceConnectionStateFailed,
     * RTCIceConnectionStateDisconnected,
     * RTCIceConnectionStateClosed,
     * RTCIceConnectionStateCount,
     */
}

RTCPeerConnectionDelegate

中实现

https://github.com/otalk/webrtc-ios/blob/master/include/RTCPeerConnectionDelegate.h#L59