Просмотр исходного кода

fix(ParticipantConnectionStatus): status from JVB is true by default

If there was no notification from the JVB about the connectivity status
it means it's connected. That's because the bridge does not send any
notification unless there is a problem.
dev1
paweldomas 9 лет назад
Родитель
Сommit
2fb775cede
1 измененных файлов: 8 добавлений и 1 удалений
  1. 8
    1
      modules/connectivity/ParticipantConnectionStatus.js

+ 8
- 1
modules/connectivity/ParticipantConnectionStatus.js Просмотреть файл

@@ -312,7 +312,14 @@ export default class ParticipantConnectionStatus {
312 312
 
313 313
         const isConnectionActive = participant.isConnectionActive();
314 314
         const hasAnyVideoRTCMuted = participant.hasAnyVideoTrackWebRTCMuted();
315
-        const isConnActiveByJvb = this.rtcConnStatusCache[endpointId];
315
+        let isConnActiveByJvb = this.rtcConnStatusCache[endpointId];
316
+
317
+        // If no status was received from the JVB it means that it's active
318
+        // (the bridge does not send notification unless there is a problem).
319
+        if (typeof isConnActiveByJvb !== 'boolean') {
320
+            logger.debug("Assuming connection active by JVB - no notification");
321
+            isConnActiveByJvb = true;
322
+        }
316 323
 
317 324
         logger.debug(
318 325
             "Remote track removed, is active: " + isConnectionActive

Загрузка…
Отмена
Сохранить