2016-11-16 05:00:28 +08:00
|
|
|
import React from 'react';
|
|
|
|
import Button from '/imports/ui/components/button/component';
|
|
|
|
import { clearModal } from '/imports/ui/components/app/service';
|
|
|
|
import { joinMicrophone } from '/imports/api/phone';
|
|
|
|
import styles from '../styles.scss';
|
|
|
|
|
2016-12-01 11:37:52 +08:00
|
|
|
import MicSource from '/imports/ui/components/mic-source/component';
|
|
|
|
import SpeakerSource from '/imports/ui/components/speaker-source/component';
|
|
|
|
import EnterAudio from '/imports/ui/components/enter-audio/component';
|
|
|
|
|
2016-11-16 05:00:28 +08:00
|
|
|
export default class AudioSettings extends React.Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
this.chooseAudio = this.chooseAudio.bind(this);
|
|
|
|
this.joinAudio = this.joinAudio.bind(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
handleClick() {
|
|
|
|
}
|
|
|
|
|
2016-11-22 05:06:19 +08:00
|
|
|
playAudioSample() {
|
|
|
|
const snd = new Audio('resources/sounds/audioSample.mp3');
|
|
|
|
snd.play();
|
|
|
|
}
|
|
|
|
|
2016-11-16 05:00:28 +08:00
|
|
|
chooseAudio() {
|
|
|
|
this.props.changeMenu(this.props.JOIN_AUDIO);
|
|
|
|
}
|
|
|
|
|
|
|
|
joinAudio() {
|
|
|
|
clearModal();
|
|
|
|
joinMicrophone();
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div className={styles.center}>
|
|
|
|
<Button className={styles.backBtn}
|
|
|
|
label={'Back'}
|
|
|
|
icon={'left-arrow'}
|
|
|
|
size={'md'}
|
|
|
|
color={'primary'}
|
|
|
|
ghost={true}
|
|
|
|
onClick={this.chooseAudio}
|
|
|
|
/>
|
|
|
|
<div>
|
|
|
|
Choose your audio settings
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={styles.half}>
|
2016-12-01 11:37:52 +08:00
|
|
|
<MicSource />
|
|
|
|
<SpeakerSource />
|
2016-11-16 05:00:28 +08:00
|
|
|
</div>
|
|
|
|
<div className={styles.half}>
|
2016-12-01 11:37:52 +08:00
|
|
|
<EnterAudio />
|
2016-11-16 05:00:28 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|