|
@@ -31,14 +31,12 @@ class ClosedCaptionButton
|
31
|
31
|
* @returns {Props}
|
32
|
32
|
*/
|
33
|
33
|
export function mapStateToProps(state: Object, ownProps: Object) {
|
34
|
|
- const { transcribingEnabled } = state['features/base/config'];
|
35
|
|
- const { isGuest = true } = state['features/base/jwt'];
|
36
|
|
- const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true) && transcribingEnabled && !isGuest;
|
37
|
|
- const { visible = enabled } = ownProps;
|
|
34
|
+ const enabled = getFeatureFlag(state, CLOSE_CAPTIONS_ENABLED, true);
|
|
35
|
+ const abstractProps = _abstractMapStateToProps(state, ownProps);
|
38
|
36
|
|
39
|
37
|
return {
|
40
|
|
- ..._abstractMapStateToProps(state, ownProps),
|
41
|
|
- visible
|
|
38
|
+ ...abstractProps,
|
|
39
|
+ visible: abstractProps.visible && enabled
|
42
|
40
|
};
|
43
|
41
|
}
|
44
|
42
|
|