Calling createAnswer
doesn't change signalingState
, it still in have-remote-offer
. What may be the possible reason for this.
offerSdp = { "sdp": offerSdp, "type": "offer" };
pc.setRemoteDescription(new RTCSessionDescription(offerSdp)).then(() => {
pc.createAnswer().then(answer => {
//state still have-remote-offer
pc.setLocalDescription(new RTCSessionDescription(answer)).then(() => {
deferred.resolve(answer.sdp)
});
});
});