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