mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
do not fail on remote ICE candidate error in offer.
This commit is contained in:
parent
720c2f7a3d
commit
4f08056c59
@ -238,11 +238,17 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
||||
await this._peer.setRemoteDescription({ type: 'offer', sdp })
|
||||
|
||||
if (this._candidates.length > 0) {
|
||||
let candidates = 0
|
||||
for (const candidate of this._candidates) {
|
||||
try {
|
||||
await this._peer.addIceCandidate(candidate)
|
||||
candidates++
|
||||
} catch (error: any) {
|
||||
this._log.warn(`unable to add remote ICE candidate`, { error })
|
||||
}
|
||||
}
|
||||
|
||||
this._log.debug(`added ${this._candidates.length} remote ICE candidates`, { candidates: this._candidates })
|
||||
this._log.debug(`added ${candidates} remote ICE candidates`, { candidates: this._candidates })
|
||||
this._candidates = []
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user