mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: make forceMediaReconnectionAfterNetworkDrop also affect subscribers
parent
cc402f34d3
commit
0b57843e84
|
@ -1072,15 +1072,16 @@ export class Stream {
|
||||||
if (!this.getWebRtcPeer() || !this.getRTCPeerConnection()) {
|
if (!this.getWebRtcPeer() || !this.getRTCPeerConnection()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.isLocal() && !!this.session.openvidu.advancedConfiguration.forceMediaReconnectionAfterNetworkDrop) {
|
if (!!this.session.openvidu.advancedConfiguration.forceMediaReconnectionAfterNetworkDrop) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`OpenVidu Browser advanced configuration option "forceMediaReconnectionAfterNetworkDrop" is enabled. Stream ${this.streamId
|
`OpenVidu Browser advanced configuration option "forceMediaReconnectionAfterNetworkDrop" is enabled. Stream ${this.streamId
|
||||||
} (${this.isLocal() ? 'Publisher' : 'Subscriber'}) will force a reconnection`
|
} (${this.isLocal() ? 'Publisher' : 'Subscriber'}) will force a reconnection`
|
||||||
);
|
);
|
||||||
return true;
|
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 */
|
/* Private methods */
|
||||||
|
|
|
@ -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.
|
* 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 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`.
|
* Default to `false`.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue