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