mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-09-26 21:01:12 +08:00
Ignore null ice candidates
Ignore null ice candidate
This commit is contained in:
@@ -83,16 +83,18 @@ export class WebrtcConnection extends Subscribed {
|
||||
}),
|
||||
|
||||
this.pc.onIceCandidate.subscribe(async (iceCandidate) => {
|
||||
await firstValueFrom(this.onOfferSent)
|
||||
this.sendMessage({
|
||||
body: {
|
||||
doorbot_id: camera.id,
|
||||
ice: iceCandidate.candidate,
|
||||
mlineindex: iceCandidate.sdpMLineIndex,
|
||||
},
|
||||
dialog_id: this.dialogId,
|
||||
method: 'ice',
|
||||
})
|
||||
if (iceCandidate?.candidate) {
|
||||
await firstValueFrom(this.onOfferSent)
|
||||
this.sendMessage({
|
||||
body: {
|
||||
doorbot_id: camera.id,
|
||||
ice: iceCandidate.candidate,
|
||||
mlineindex: iceCandidate.sdpMLineIndex,
|
||||
},
|
||||
dialog_id: this.dialogId,
|
||||
method: 'ice',
|
||||
})
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user