2017-10-11 06:08:51 +08:00
|
|
|
import React from 'react';
|
2022-02-15 23:58:28 +08:00
|
|
|
import Toggle from '/imports/ui/components/common/switch/component';
|
2017-10-11 06:08:51 +08:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
|
|
import BaseMenu from '../base/component';
|
2021-11-05 22:43:42 +08:00
|
|
|
import Styled from './styles';
|
2017-02-16 02:49:40 +08:00
|
|
|
|
2017-04-11 04:27:29 +08:00
|
|
|
const intlMessages = defineMessages({
|
|
|
|
videoSectionTitle: {
|
|
|
|
id: 'app.submenu.video.title',
|
|
|
|
description: 'Heading for video submenu section',
|
|
|
|
},
|
|
|
|
videoSourceLabel: {
|
|
|
|
id: 'app.submenu.video.videoSourceLabel',
|
|
|
|
description: 'Label for video source section',
|
|
|
|
},
|
|
|
|
videoOptionLabel: {
|
|
|
|
id: 'app.submenu.video.videoOptionLabel',
|
|
|
|
description: 'default video source option label',
|
|
|
|
},
|
|
|
|
videoQualityLabel: {
|
|
|
|
id: 'app.submenu.video.videoQualityLabel',
|
|
|
|
description: 'Label for video quality section',
|
|
|
|
},
|
|
|
|
qualityOptionLabel: {
|
|
|
|
id: 'app.submenu.video.qualityOptionLabel',
|
|
|
|
description: 'default quality option label',
|
|
|
|
},
|
|
|
|
participantsCamLabel: {
|
|
|
|
id: 'app.submenu.video.participantsCamLabel',
|
|
|
|
description: 'Label for participants cam section',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2017-04-19 23:22:48 +08:00
|
|
|
class VideoMenu extends BaseMenu {
|
2016-05-06 05:14:39 +08:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
2017-02-16 02:49:40 +08:00
|
|
|
|
|
|
|
this.state = {
|
2017-02-25 04:19:53 +08:00
|
|
|
settingsName: 'video',
|
|
|
|
settings: props.settings,
|
2017-02-16 02:49:40 +08:00
|
|
|
};
|
2016-05-06 05:14:39 +08:00
|
|
|
}
|
|
|
|
|
2017-02-16 02:49:40 +08:00
|
|
|
render() {
|
2017-04-11 04:27:29 +08:00
|
|
|
const { intl } = this.props;
|
|
|
|
|
2016-05-06 05:14:39 +08:00
|
|
|
return (
|
2021-11-05 22:43:42 +08:00
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Styled.Title>
|
|
|
|
{intl.formatMessage(intlMessages.videoSectionTitle)}
|
|
|
|
</Styled.Title>
|
2016-07-12 01:01:09 +08:00
|
|
|
</div>
|
2017-02-16 02:49:40 +08:00
|
|
|
|
2021-11-05 22:43:42 +08:00
|
|
|
<Styled.Form>
|
|
|
|
<Styled.Row>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElement aria-label={intl.formatMessage(intlMessages.videoSourceLabel)}>
|
|
|
|
<Styled.LabelSmall htmlFor="videoSourceSelect">
|
2017-04-11 04:27:29 +08:00
|
|
|
{intl.formatMessage(intlMessages.videoSourceLabel)}
|
2021-11-05 22:43:42 +08:00
|
|
|
</Styled.LabelSmall>
|
|
|
|
<Styled.Select
|
2017-10-11 06:08:51 +08:00
|
|
|
id="videoSourceSelect"
|
2017-06-03 03:25:02 +08:00
|
|
|
defaultValue="-1"
|
|
|
|
>
|
|
|
|
<option value="-1" disabled>
|
2017-04-26 22:08:47 +08:00
|
|
|
{intl.formatMessage(intlMessages.videoOptionLabel)}
|
|
|
|
</option>
|
2021-11-05 22:43:42 +08:00
|
|
|
</Styled.Select>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElement aria-label={intl.formatMessage(intlMessages.videoQualityLabel)}>
|
|
|
|
<Styled.LabelSmall htmlFor="videoSelectQuality">
|
2017-04-11 04:27:29 +08:00
|
|
|
{intl.formatMessage(intlMessages.videoQualityLabel)}
|
2021-11-05 22:43:42 +08:00
|
|
|
</Styled.LabelSmall>
|
|
|
|
<Styled.Select
|
2017-10-11 06:08:51 +08:00
|
|
|
id="videoSelectQuality"
|
2017-06-03 03:25:02 +08:00
|
|
|
defaultValue="-1"
|
|
|
|
>
|
|
|
|
<option value="-1" disabled>
|
2017-04-26 22:08:47 +08:00
|
|
|
{intl.formatMessage(intlMessages.qualityOptionLabel)}
|
|
|
|
</option>
|
2021-11-05 22:43:42 +08:00
|
|
|
</Styled.Select>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
|
|
|
<Styled.Row>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElement>
|
|
|
|
<Styled.Label>
|
2017-04-11 04:27:29 +08:00
|
|
|
{intl.formatMessage(intlMessages.participantsCamLabel)}
|
2021-11-05 22:43:42 +08:00
|
|
|
</Styled.Label>
|
|
|
|
</Styled.FormElement>
|
|
|
|
</Styled.Col>
|
|
|
|
<Styled.Col>
|
|
|
|
<Styled.FormElementRight>
|
2017-06-03 03:25:02 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
|
|
|
defaultChecked={this.state.viewParticipantsWebcams}
|
|
|
|
onChange={() => this.handleToggle('viewParticipantsWebcams')}
|
2021-11-05 22:43:42 +08:00
|
|
|
ariaLabelledBy="viewCamLabel"
|
2017-06-03 03:25:02 +08:00
|
|
|
ariaLabel={intl.formatMessage(intlMessages.participantsCamLabel)}
|
|
|
|
/>
|
2021-11-05 22:43:42 +08:00
|
|
|
</Styled.FormElementRight>
|
|
|
|
</Styled.Col>
|
|
|
|
</Styled.Row>
|
|
|
|
</Styled.Form>
|
2016-06-07 03:52:03 +08:00
|
|
|
</div>
|
2016-05-06 05:14:39 +08:00
|
|
|
);
|
|
|
|
}
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|
2017-04-11 04:27:29 +08:00
|
|
|
|
2017-04-19 23:22:48 +08:00
|
|
|
export default injectIntl(VideoMenu);
|