Do not aggressively disconnect when video stream goes down (#2621)
This commit is contained in:
@ -147,7 +147,6 @@ export enum ConnectionError {
|
|||||||
Unset = 0,
|
Unset = 0,
|
||||||
LongLoadingTime,
|
LongLoadingTime,
|
||||||
|
|
||||||
LostVideoStream,
|
|
||||||
ICENegotiate,
|
ICENegotiate,
|
||||||
DataChannelError,
|
DataChannelError,
|
||||||
WebSocketError,
|
WebSocketError,
|
||||||
@ -168,8 +167,6 @@ export const CONNECTION_ERROR_TEXT: Record<ConnectionError, string> = {
|
|||||||
[ConnectionError.Unset]: '',
|
[ConnectionError.Unset]: '',
|
||||||
[ConnectionError.LongLoadingTime]:
|
[ConnectionError.LongLoadingTime]:
|
||||||
'Loading is taking longer than expected...',
|
'Loading is taking longer than expected...',
|
||||||
[ConnectionError.LostVideoStream]:
|
|
||||||
'Lost connection to video stream... Reconnecting...',
|
|
||||||
[ConnectionError.ICENegotiate]: 'ICE negotiation failed.',
|
[ConnectionError.ICENegotiate]: 'ICE negotiation failed.',
|
||||||
[ConnectionError.DataChannelError]: 'The data channel signaled an error.',
|
[ConnectionError.DataChannelError]: 'The data channel signaled an error.',
|
||||||
[ConnectionError.WebSocketError]: 'The websocket signaled an error.',
|
[ConnectionError.WebSocketError]: 'The websocket signaled an error.',
|
||||||
@ -1350,17 +1347,9 @@ export class EngineCommandManager extends EventTarget {
|
|||||||
console.log('received track', mediaStream)
|
console.log('received track', mediaStream)
|
||||||
|
|
||||||
mediaStream.getVideoTracks()[0].addEventListener('mute', () => {
|
mediaStream.getVideoTracks()[0].addEventListener('mute', () => {
|
||||||
if (this.engineConnection) {
|
console.error(
|
||||||
this.engineConnection.state = {
|
'video track mute: check webrtc internals -> inbound rtp'
|
||||||
type: EngineConnectionStateType.Disconnecting,
|
)
|
||||||
value: {
|
|
||||||
type: DisconnectingType.Error,
|
|
||||||
value: {
|
|
||||||
error: ConnectionError.LostVideoStream,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
setMediaStream(mediaStream)
|
setMediaStream(mediaStream)
|
||||||
|
Reference in New Issue
Block a user