|
@@ -3,7 +3,10 @@
|
3
|
3
|
import { openDialog } from '../../../base/dialog';
|
4
|
4
|
import { IconLiveStreaming } from '../../../base/icons';
|
5
|
5
|
import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
|
6
|
|
-import { getLocalParticipant } from '../../../base/participants';
|
|
6
|
+import {
|
|
7
|
+ getLocalParticipant,
|
|
8
|
+ isLocalParticipantModerator
|
|
9
|
+} from '../../../base/participants';
|
7
|
10
|
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
8
|
11
|
import { getActiveSession } from '../../functions';
|
9
|
12
|
|
|
@@ -125,13 +128,14 @@ export function _mapStateToProps(state: Object, ownProps: Props) {
|
125
|
128
|
// If the containing component provides the visible prop, that is one
|
126
|
129
|
// above all, but if not, the button should be autonomus and decide on
|
127
|
130
|
// its own to be visible or not.
|
|
131
|
+ const isModerator = isLocalParticipantModerator(state);
|
128
|
132
|
const {
|
129
|
133
|
enableFeaturesBasedOnToken,
|
130
|
134
|
liveStreamingEnabled
|
131
|
135
|
} = state['features/base/config'];
|
132
|
136
|
const { features = {} } = getLocalParticipant(state);
|
133
|
137
|
|
134
|
|
- visible = liveStreamingEnabled;
|
|
138
|
+ visible = isModerator && liveStreamingEnabled;
|
135
|
139
|
|
136
|
140
|
if (enableFeaturesBasedOnToken) {
|
137
|
141
|
visible = visible && String(features.livestreaming) === 'true';
|