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:
parent
1e9f599a35
commit
bebcc8234f
|
@ -68,7 +68,8 @@ export function getMultipleVideoSupportFeatureFlag(state: Object) {
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export function getMultipleVideoSendingSupportFeatureFlag(state: Object) {
|
export function getMultipleVideoSendingSupportFeatureFlag(state: Object) {
|
||||||
return getMultipleVideoSupportFeatureFlag(state) && isUnifiedPlanEnabled(state);
|
return navigator.product !== 'ReactNative'
|
||||||
|
&& getMultipleVideoSupportFeatureFlag(state) && isUnifiedPlanEnabled(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import { getCurrentConference } from '../conference';
|
import { getCurrentConference } from '../conference';
|
||||||
import { getMultipleVideoSupportFeatureFlag } from '../config';
|
import {
|
||||||
|
getMultipleVideoSendingSupportFeatureFlag,
|
||||||
|
getMultipleVideoSupportFeatureFlag
|
||||||
|
} from '../config/functions.any';
|
||||||
import { StateListenerRegistry } from '../redux';
|
import { StateListenerRegistry } from '../redux';
|
||||||
|
|
||||||
import { createVirtualScreenshareParticipant, participantLeft } from './actions';
|
import { createVirtualScreenshareParticipant, participantLeft } from './actions';
|
||||||
|
@ -47,12 +50,14 @@ function _updateScreenshareParticipants({ getState, dispatch }) {
|
||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (!localScreenShare && newLocalSceenshareSourceName) {
|
if (getMultipleVideoSendingSupportFeatureFlag(state)) {
|
||||||
dispatch(createVirtualScreenshareParticipant(newLocalSceenshareSourceName, true));
|
if (!localScreenShare && newLocalSceenshareSourceName) {
|
||||||
}
|
dispatch(createVirtualScreenshareParticipant(newLocalSceenshareSourceName, true));
|
||||||
|
}
|
||||||
|
|
||||||
if (localScreenShare && !newLocalSceenshareSourceName) {
|
if (localScreenShare && !newLocalSceenshareSourceName) {
|
||||||
dispatch(participantLeft(localScreenShare.id, conference, undefined, true));
|
dispatch(participantLeft(localScreenShare.id, conference, undefined, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const removedScreenshareSourceNames = _.difference(previousScreenshareSourceNames, currentScreenshareSourceNames);
|
const removedScreenshareSourceNames = _.difference(previousScreenshareSourceNames, currentScreenshareSourceNames);
|
||||||
|
|
Loading…
Reference in New Issue