diff --git a/openvidu-browser/src/OpenVidu/Stream.ts b/openvidu-browser/src/OpenVidu/Stream.ts index 68bd3e47..5cc39128 100644 --- a/openvidu-browser/src/OpenVidu/Stream.ts +++ b/openvidu-browser/src/OpenVidu/Stream.ts @@ -1072,15 +1072,16 @@ export class Stream { if (!this.getWebRtcPeer() || !this.getRTCPeerConnection()) { return false; } - if (this.isLocal() && !!this.session.openvidu.advancedConfiguration.forceMediaReconnectionAfterNetworkDrop) { + if (!!this.session.openvidu.advancedConfiguration.forceMediaReconnectionAfterNetworkDrop) { logger.warn( `OpenVidu Browser advanced configuration option "forceMediaReconnectionAfterNetworkDrop" is enabled. Stream ${this.streamId } (${this.isLocal() ? 'Publisher' : 'Subscriber'}) will force a reconnection` ); return true; + } else { + const iceConnectionState: RTCIceConnectionState = this.getRTCPeerConnection().iceConnectionState; + return iceConnectionState !== 'connected' && iceConnectionState !== 'completed'; } - const iceConnectionState: RTCIceConnectionState = this.getRTCPeerConnection().iceConnectionState; - return iceConnectionState !== 'connected' && iceConnectionState !== 'completed'; } /* Private methods */ diff --git a/openvidu-browser/src/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.ts b/openvidu-browser/src/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.ts index d9841249..b8492138 100644 --- a/openvidu-browser/src/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.ts +++ b/openvidu-browser/src/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.ts @@ -48,7 +48,7 @@ export interface OpenViduAdvancedConfiguration { * inspects all of its media streams to see their status. For any of them that are broken, it asks OpenVidu Server for a forced and silent reconnection. * * This policy is technically enough to recover any broken media connection after a network drop, but in practice it has been proven that OpenVidu Browser may think a media connection has properly recovered when in fact it has not. - * This is not a common case, and it only affects Publisher streams, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing media streams** after a network drop regardless of their supposed status. + * This is not a common case, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing and incoming media streams** after a network drop regardless of their supposed status. * * Default to `false`. */