bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/settings/submenus/video/component.jsx

122 lines
4.0 KiB
React
Raw Normal View History

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',
},
});
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 = {
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>
</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>
</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
export default injectIntl(VideoMenu);