mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
don't kill webrtc on temporary network issues #48.
This commit is contained in:
parent
733c39412b
commit
86a9effe41
@ -228,11 +228,15 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
|
|||||||
case 'connected':
|
case 'connected':
|
||||||
this.onConnected()
|
this.onConnected()
|
||||||
break
|
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':
|
case 'failed':
|
||||||
this.onDisconnected(new Error('peer failed'))
|
this.onDisconnected(new Error('peer failed'))
|
||||||
break
|
break
|
||||||
case 'disconnected':
|
case 'closed':
|
||||||
this.onDisconnected(new Error('peer disconnected'))
|
this.onDisconnected(new Error('peer closed'))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user