mirror of
https://github.com/m1k1o/neko.git
synced 2025-04-29 10:26:22 +02:00
don't kill webrtc on temporary network issues #48.
This commit is contained in:
parent
733c39412b
commit
86a9effe41
1 changed files with 6 additions and 2 deletions
|
@ -228,11 +228,15 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
|||
case 'connected':
|
||||
this.onConnected()
|
||||
break
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Signaling_and_video_calling#ice_connection_state
|
||||
// We don't watch the disconnected signaling state here as it can indicate temporary issues and may
|
||||
// go back to a connected state after some time. Watching it would close the video call on any temporary
|
||||
// network issue.
|
||||
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
Reference in a new issue