2017-10-11 06:08:51 +08:00
|
|
|
import React from 'react';
|
2017-02-16 02:49:40 +08:00
|
|
|
import Toggle from '/imports/ui/components/switch/component';
|
|
|
|
import cx from 'classnames';
|
2017-10-11 06:08:51 +08:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
|
|
import BaseMenu from '../base/component';
|
2018-01-08 14:17:18 +08:00
|
|
|
import { styles } 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 (
|
2017-02-16 02:49:40 +08:00
|
|
|
<div className={styles.tabContent}>
|
|
|
|
<div className={styles.header}>
|
2017-04-11 04:27:29 +08:00
|
|
|
<h3 className={styles.title}>{intl.formatMessage(intlMessages.videoSectionTitle)}</h3>
|
2016-07-12 01:01:09 +08:00
|
|
|
</div>
|
2017-02-16 02:49:40 +08:00
|
|
|
|
|
|
|
<div className={styles.form}>
|
|
|
|
<div className={styles.row}>
|
|
|
|
<div className={styles.col}>
|
2017-04-25 10:27:28 +08:00
|
|
|
<div
|
|
|
|
className={styles.formElement}
|
2017-06-03 03:25:02 +08:00
|
|
|
aria-label={intl.formatMessage(intlMessages.videoSourceLabel)}
|
|
|
|
>
|
2017-10-11 06:08:51 +08:00
|
|
|
<label htmlFor="videoSourceSelect" className={cx(styles.label, styles.labelSmall)}>
|
2017-04-11 04:27:29 +08:00
|
|
|
{intl.formatMessage(intlMessages.videoSourceLabel)}
|
2017-02-16 02:49:40 +08:00
|
|
|
</label>
|
|
|
|
<select
|
2017-10-11 06:08:51 +08:00
|
|
|
id="videoSourceSelect"
|
2017-06-03 03:25:02 +08:00
|
|
|
defaultValue="-1"
|
|
|
|
className={styles.select}
|
|
|
|
>
|
|
|
|
<option value="-1" disabled>
|
2017-04-26 22:08:47 +08:00
|
|
|
{intl.formatMessage(intlMessages.videoOptionLabel)}
|
|
|
|
</option>
|
2017-02-16 02:49:40 +08:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.col}>
|
2017-04-25 10:27:28 +08:00
|
|
|
<div
|
|
|
|
className={styles.formElement}
|
2017-06-03 03:25:02 +08:00
|
|
|
aria-label={intl.formatMessage(intlMessages.videoQualityLabel)}
|
|
|
|
>
|
2017-10-11 06:08:51 +08:00
|
|
|
<label htmlFor="videoSelectQuality" className={cx(styles.label, styles.labelSmall)}>
|
2017-04-11 04:27:29 +08:00
|
|
|
{intl.formatMessage(intlMessages.videoQualityLabel)}
|
2017-02-16 02:49:40 +08:00
|
|
|
</label>
|
|
|
|
<select
|
2017-10-11 06:08:51 +08:00
|
|
|
id="videoSelectQuality"
|
2017-06-03 03:25:02 +08:00
|
|
|
defaultValue="-1"
|
|
|
|
className={styles.select}
|
|
|
|
>
|
|
|
|
<option value="-1" disabled>
|
2017-04-26 22:08:47 +08:00
|
|
|
{intl.formatMessage(intlMessages.qualityOptionLabel)}
|
|
|
|
</option>
|
2017-02-16 02:49:40 +08:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.row}>
|
|
|
|
<div className={styles.col}>
|
|
|
|
<div className={styles.formElement}>
|
2017-10-11 06:08:51 +08:00
|
|
|
<div className={styles.label}>
|
2017-04-11 04:27:29 +08:00
|
|
|
{intl.formatMessage(intlMessages.participantsCamLabel)}
|
2017-10-11 06:08:51 +08:00
|
|
|
</div>
|
2017-02-16 02:49:40 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.col}>
|
2017-04-25 10:27:28 +08:00
|
|
|
<div className={cx(styles.formElement, styles.pullContentRight)}>
|
2017-06-03 03:25:02 +08:00
|
|
|
<Toggle
|
|
|
|
icons={false}
|
|
|
|
defaultChecked={this.state.viewParticipantsWebcams}
|
|
|
|
onChange={() => this.handleToggle('viewParticipantsWebcams')}
|
|
|
|
ariaLabelledBy={'viewCamLabel'}
|
|
|
|
ariaLabel={intl.formatMessage(intlMessages.participantsCamLabel)}
|
|
|
|
/>
|
2017-02-16 02:49:40 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-06-07 03:52:03 +08:00
|
|
|
</div>
|
|
|
|
</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);
|