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) {
|
export function _abstractMapStateToProps(state: Object, ownProps: Object) {
|
||||||
const { _requestingSubtitles } = state['features/subtitles'];
|
const { _requestingSubtitles } = state['features/subtitles'];
|
||||||
const { transcribingEnabled } = state['features/base/config'];
|
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 {
|
return {
|
||||||
_requestingSubtitles,
|
_requestingSubtitles,
|
||||||
|
|
|
@ -31,14 +31,12 @@ class ClosedCaptionButton
|
||||||
* @returns {Props}
|
* @returns {Props}
|
||||||
*/
|
*/
|
||||||
export function mapStateToProps(state: Object, ownProps: Object) {
|
export function mapStateToProps(state: Object, ownProps: Object) {
|
||||||
const { transcribingEnabled } = state['features/base/config'];
|
const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true);
|
||||||
const { isGuest = true } = state['features/base/jwt'];
|
const abstractProps = _abstractMapStateToProps(state, ownProps);
|
||||||
const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true) && transcribingEnabled && !isGuest;
|
|
||||||
const { visible = enabled } = ownProps;
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
..._abstractMapStateToProps(state, ownProps),
|
...abstractProps,
|
||||||
visible
|
visible: abstractProps.visible && enabled
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue