瀏覽代碼

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
 

Loading…
取消
儲存