fix(follow-me): disable the auto pin on SS
This commit is contained in:
parent
9ad87f3706
commit
13f76c2cce
|
@ -0,0 +1,16 @@
|
|||
// @flow
|
||||
|
||||
import { toState } from '../base/redux';
|
||||
|
||||
/**
|
||||
* Returns true if follow me is active and false otherwise.
|
||||
*
|
||||
* @param {Object|Function} stateful - Object or function that can be resolved
|
||||
* to the Redux state.
|
||||
* @returns {boolean} - True if follow me is active and false otherwise.
|
||||
*/
|
||||
export function isFollowMeActive(stateful: Object | Function) {
|
||||
const state = toState(stateful);
|
||||
|
||||
return Boolean(state['features/follow-me'].moderator);
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
export * from './functions';
|
||||
export * from './middleware';
|
||||
export * from './subscriber';
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import { setFilmstripVisible } from '../filmstrip';
|
|||
import { setTileView } from '../video-layout';
|
||||
|
||||
import { FOLLOW_ME_COMMAND } from './constants';
|
||||
import { isFollowMeActive } from './functions';
|
||||
import logger from './logger';
|
||||
|
||||
declare var APP: Object;
|
||||
|
@ -111,7 +112,7 @@ function _onFollowMeCommand(attributes = {}, id, store) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!state['features/follow-me'].moderator) {
|
||||
if (!isFollowMeActive(state)) {
|
||||
store.dispatch(setFollowMeModerator(id));
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import {
|
|||
getLocalParticipant,
|
||||
isLocalParticipantModerator
|
||||
} from '../base/participants';
|
||||
import { isFollowMeActive } from '../follow-me';
|
||||
|
||||
declare var interfaceConfig: Object;
|
||||
|
||||
|
@ -85,7 +86,7 @@ export function getMoreTabProps(stateful: Object | Function) {
|
|||
startAudioMutedPolicy,
|
||||
startVideoMutedPolicy
|
||||
} = state['features/base/conference'];
|
||||
const followMeActive = Boolean(state['features/follow-me'].moderator);
|
||||
const followMeActive = isFollowMeActive(state);
|
||||
const configuredTabs = interfaceConfig.SETTINGS_SECTIONS || [];
|
||||
|
||||
// The settings sections to display.
|
||||
|
|
|
@ -11,7 +11,9 @@ import {
|
|||
pinParticipant
|
||||
} from '../base/participants';
|
||||
import { StateListenerRegistry, equals } from '../base/redux';
|
||||
import { isFollowMeActive } from '../follow-me';
|
||||
import { selectParticipant } from '../large-video';
|
||||
|
||||
import { shouldDisplayTileView } from './functions';
|
||||
import { setParticipantsWithScreenShare } from './actions';
|
||||
|
||||
|
@ -48,12 +50,11 @@ StateListenerRegistry.register(
|
|||
StateListenerRegistry.register(
|
||||
/* selector */ state => state['features/base/tracks'],
|
||||
/* listener */ debounce((tracks, store) => {
|
||||
if (!_getAutoPinSetting()) {
|
||||
if (!_getAutoPinSetting() || isFollowMeActive(store)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const oldScreenSharesOrder
|
||||
= store.getState()['features/video-layout'].screenShares || [];
|
||||
const oldScreenSharesOrder = store.getState()['features/video-layout'].screenShares || [];
|
||||
const knownSharingParticipantIds = tracks.reduce((acc, track) => {
|
||||
if (track.mediaType === 'video' && track.videoType === 'desktop') {
|
||||
const skipTrack = _getAutoPinSetting() === 'remote-only' && track.local;
|
||||
|
|
Loading…
Reference in New Issue