Procházet zdrojové kódy

fix(rn,multi-stream) don't send multiple streams on mobile

Mobile does not do multiple local video streams for performance reasons,
so avoid creating the local fake participant.

WIP
factor2
Saúl Ibarra Corretgé před 2 roky
rodič
revize
bebcc8234f

+ 2
- 1
react/features/base/config/functions.any.js Zobrazit soubor

@@ -68,7 +68,8 @@ export function getMultipleVideoSupportFeatureFlag(state: Object) {
68 68
  * @returns {boolean}
69 69
  */
70 70
 export function getMultipleVideoSendingSupportFeatureFlag(state: Object) {
71
-    return getMultipleVideoSupportFeatureFlag(state) && isUnifiedPlanEnabled(state);
71
+    return navigator.product !== 'ReactNative'
72
+        && getMultipleVideoSupportFeatureFlag(state) && isUnifiedPlanEnabled(state);
72 73
 }
73 74
 
74 75
 /**

+ 11
- 6
react/features/base/participants/subscriber.js Zobrazit soubor

@@ -3,7 +3,10 @@
3 3
 import _ from 'lodash';
4 4
 
5 5
 import { getCurrentConference } from '../conference';
6
-import { getMultipleVideoSupportFeatureFlag } from '../config';
6
+import {
7
+    getMultipleVideoSendingSupportFeatureFlag,
8
+    getMultipleVideoSupportFeatureFlag
9
+} from '../config/functions.any';
7 10
 import { StateListenerRegistry } from '../redux';
8 11
 
9 12
 import { createVirtualScreenshareParticipant, participantLeft } from './actions';
@@ -47,12 +50,14 @@ function _updateScreenshareParticipants({ getState, dispatch }) {
47 50
         return acc;
48 51
     }, []);
49 52
 
50
-    if (!localScreenShare && newLocalSceenshareSourceName) {
51
-        dispatch(createVirtualScreenshareParticipant(newLocalSceenshareSourceName, true));
52
-    }
53
+    if (getMultipleVideoSendingSupportFeatureFlag(state)) {
54
+        if (!localScreenShare && newLocalSceenshareSourceName) {
55
+            dispatch(createVirtualScreenshareParticipant(newLocalSceenshareSourceName, true));
56
+        }
53 57
 
54
-    if (localScreenShare && !newLocalSceenshareSourceName) {
55
-        dispatch(participantLeft(localScreenShare.id, conference, undefined, true));
58
+        if (localScreenShare && !newLocalSceenshareSourceName) {
59
+            dispatch(participantLeft(localScreenShare.id, conference, undefined, true));
60
+        }
56 61
     }
57 62
 
58 63
     const removedScreenshareSourceNames = _.difference(previousScreenshareSourceNames, currentScreenshareSourceNames);

Načítá se…
Zrušit
Uložit