浏览代码

fix(ShareDesktopButton): getParticipants reference

master
Hristo Terezov 4 年前
父节点
当前提交
e91df47d1b
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1
    4
      react/features/toolbox/components/web/ShareDesktopButton.js

+ 1
- 4
react/features/toolbox/components/web/ShareDesktopButton.js 查看文件

3
 import { translate } from '../../../base/i18n';
3
 import { translate } from '../../../base/i18n';
4
 import { IconShareDesktop } from '../../../base/icons';
4
 import { IconShareDesktop } from '../../../base/icons';
5
 import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
5
 import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
6
-import { getParticipants } from '../../../base/participants';
7
 import { connect } from '../../../base/redux';
6
 import { connect } from '../../../base/redux';
8
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
7
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
9
 import { getLocalVideoTrack } from '../../../base/tracks';
8
 import { getLocalVideoTrack } from '../../../base/tracks';
123
     if (enableFeaturesBasedOnToken) {
122
     if (enableFeaturesBasedOnToken) {
124
         // we enable desktop sharing if any participant already have this
123
         // we enable desktop sharing if any participant already have this
125
         // feature enabled
124
         // feature enabled
126
-        desktopSharingEnabled = getParticipants(state)
127
-            .find(({ features = {} }) =>
128
-                String(features['screen-sharing']) === 'true') !== undefined;
125
+        desktopSharingEnabled = state['features/base/participant'].haveParticipantWithScreenSharingFeature;
129
         desktopSharingDisabledTooltipKey = 'dialog.shareYourScreenDisabled';
126
         desktopSharingDisabledTooltipKey = 'dialog.shareYourScreenDisabled';
130
     }
127
     }
131
 
128
 

正在加载...
取消
保存