mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-06 10:20:26 +02:00
webrtc connect / disconnect functions.
This commit is contained in:
parent
f30614db25
commit
cab53d7d17
2 changed files with 36 additions and 5 deletions
|
@ -73,11 +73,14 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
|||
this._log.debug(`peer ice connection state changed: ${this._peer!.iceConnectionState}`)
|
||||
|
||||
switch (this._state) {
|
||||
case 'disconnected':
|
||||
this.onDisconnected(new Error('peer disconnected'))
|
||||
break
|
||||
case 'failed':
|
||||
this.onDisconnected(new Error('peer failed'))
|
||||
break
|
||||
case 'disconnected':
|
||||
this.onDisconnected(new Error('peer disconnected'))
|
||||
case 'closed':
|
||||
this.onDisconnected(new Error('peer closed'))
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue