OperationError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Called in wrong state: have-remote-offer
webRTC报“OperationError: Failed to execute 'setLocalDescription' on 'RTCPeerConnection': Failed to set local offer sdp: Called in wrong state: have-remote-offer”异常
翻译过来的意思不应该have-remote-offer状态去设置setLocalDescription。定位到错误的地方,我是在要createAnswer的时候设置setLocalDescription的。却将createAnswer写成了createOffer导致。因为createAnswer代码是从createOffer拷贝过来了。没有改过来所致。