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
This commit is contained in:
Saúl Ibarra Corretgé 2022-08-29 20:23:21 +02:00 committed by Saúl Ibarra Corretgé
parent 1e9f599a35
commit bebcc8234f
2 changed files with 13 additions and 7 deletions

View File

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

View File

@ -3,7 +3,10 @@
import _ from 'lodash';
import { getCurrentConference } from '../conference';
import { getMultipleVideoSupportFeatureFlag } from '../config';
import {
getMultipleVideoSendingSupportFeatureFlag,
getMultipleVideoSupportFeatureFlag
} from '../config/functions.any';
import { StateListenerRegistry } from '../redux';
import { createVirtualScreenshareParticipant, participantLeft } from './actions';
@ -47,6 +50,7 @@ function _updateScreenshareParticipants({ getState, dispatch }) {
return acc;
}, []);
if (getMultipleVideoSendingSupportFeatureFlag(state)) {
if (!localScreenShare && newLocalSceenshareSourceName) {
dispatch(createVirtualScreenshareParticipant(newLocalSceenshareSourceName, true));
}
@ -54,6 +58,7 @@ function _updateScreenshareParticipants({ getState, dispatch }) {
if (localScreenShare && !newLocalSceenshareSourceName) {
dispatch(participantLeft(localScreenShare.id, conference, undefined, true));
}
}
const removedScreenshareSourceNames = _.difference(previousScreenshareSourceNames, currentScreenshareSourceNames);
const addedScreenshareSourceNames = _.difference(currentScreenshareSourceNames, previousScreenshareSourceNames);