feat(subtitles): Disable for guests.
This commit is contained in:
parent
8b4f1789a6
commit
3e7abf3da0
|
@ -83,8 +83,9 @@ export class AbstractClosedCaptionButton
|
|||
*/
|
||||
export function _abstractMapStateToProps(state: Object, ownProps: Object) {
|
||||
const { _requestingSubtitles } = state['features/subtitles'];
|
||||
const { isGuest = true } = state['features/base/jwt'];
|
||||
const { transcribingEnabled } = state['features/base/config'];
|
||||
const { visible = Boolean(transcribingEnabled) } = ownProps;
|
||||
const { visible = Boolean(transcribingEnabled && !isGuest) } = ownProps;
|
||||
|
||||
return {
|
||||
_requestingSubtitles,
|
||||
|
|
|
@ -32,7 +32,8 @@ class ClosedCaptionButton
|
|||
*/
|
||||
export function mapStateToProps(state: Object, ownProps: Object) {
|
||||
const { transcribingEnabled } = state['features/base/config'];
|
||||
const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true) && transcribingEnabled;
|
||||
const { isGuest = true } = state['features/base/jwt'];
|
||||
const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true) && transcribingEnabled && !isGuest;
|
||||
const { visible = enabled } = ownProps;
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue