forked from External/mediamtx
webrtc: show error in case setRemoteDescription fails (#3416)
This commit is contained in:
parent
f4b7f147a5
commit
6da8aee64f
2 changed files with 20 additions and 12 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue