add await to setLocalDescription.

This commit is contained in:
Miroslav Šedivý 2023-05-31 22:20:42 +02:00
parent 147c94958e
commit 78a9a31624

View File

@ -251,7 +251,7 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
// add stereo=1 to answer sdp to enable stereo audio for chromium // add stereo=1 to answer sdp to enable stereo audio for chromium
answer.sdp = answer.sdp?.replace(/(stereo=1;)?useinbandfec=1/, 'useinbandfec=1;stereo=1') answer.sdp = answer.sdp?.replace(/(stereo=1;)?useinbandfec=1/, 'useinbandfec=1;stereo=1')
this._peer.setLocalDescription(answer) await this._peer.setLocalDescription(answer)
if (answer) { if (answer) {
this.emit('negotiation', answer) this.emit('negotiation', answer)