webrtc: show error in case setRemoteDescription fails (#3416)
This commit is contained in:
@@ -254,12 +254,16 @@ const onRemoteAnswer = (sdp) => {
|
||||
pc.setRemoteDescription(new RTCSessionDescription({
|
||||
type: 'answer',
|
||||
sdp,
|
||||
}));
|
||||
|
||||
if (queuedCandidates.length !== 0) {
|
||||
sendLocalCandidates(queuedCandidates);
|
||||
queuedCandidates = [];
|
||||
}
|
||||
}))
|
||||
.then(() => {
|
||||
if (queuedCandidates.length !== 0) {
|
||||
sendLocalCandidates(queuedCandidates);
|
||||
queuedCandidates = [];
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
onError(err.toString());
|
||||
});
|
||||
};
|
||||
|
||||
const sendOffer = (offer) => {
|
||||
|
||||
Reference in New Issue
Block a user