【发布时间】:2021-02-21 08:37:25
【问题描述】:
我正在尝试在 Flutter webrtc 中连接两个对等点,但出现以下错误。我正在使用 firebase 作为信号服务器。
[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Unable to RTCPeerConnection::setRemoteDescription: peerConnectionSetRemoteDescription(): WEBRTC_SET_REMOTE_DESCRIPTION_ERROR: Failed to set remote answer sdp: Called in wrong state: stable
我正在使用下面的代码来监听 firebase 的变化
if (val['t'] == "ans") {
assert(isInitiator);
_peerCon.setRemoteDescription(
RTCSessionDescription(
val['sdp'],
val['tp'],
),
);
return;
}
【问题讨论】: