feat: Show cc button for ongoing transcribed meetings for guests
This commit is contained in:
parent
c4ba97e87c
commit
20ce38bd4c
|
@ -85,7 +85,12 @@ export class AbstractClosedCaptionButton
|
|||
export function _abstractMapStateToProps(state: Object, ownProps: Object) {
|
||||
const { _requestingSubtitles } = state['features/subtitles'];
|
||||
const { transcribingEnabled } = state['features/base/config'];
|
||||
const { visible = Boolean(transcribingEnabled && isLocalParticipantModerator(state)) } = ownProps;
|
||||
const { isTranscribing } = state['features/transcribing'];
|
||||
|
||||
// if the participant is moderator, it can enable transcriptions and if
|
||||
// transcriptions are already started for the meeting, guests can just show them
|
||||
const { visible = Boolean(transcribingEnabled
|
||||
&& (isLocalParticipantModerator(state) || isTranscribing)) } = ownProps;
|
||||
|
||||
return {
|
||||
_requestingSubtitles,
|
||||
|
|
|
@ -31,14 +31,12 @@ class ClosedCaptionButton
|
|||
* @returns {Props}
|
||||
*/
|
||||
export function mapStateToProps(state: Object, ownProps: Object) {
|
||||
const { transcribingEnabled } = state['features/base/config'];
|
||||
const { isGuest = true } = state['features/base/jwt'];
|
||||
const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true) && transcribingEnabled && !isGuest;
|
||||
const { visible = enabled } = ownProps;
|
||||
const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true);
|
||||
const abstractProps = _abstractMapStateToProps(state, ownProps);
|
||||
|
||||
return {
|
||||
..._abstractMapStateToProps(state, ownProps),
|
||||
visible
|
||||
...abstractProps,
|
||||
visible: abstractProps.visible && enabled
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue