Skip to content
Snippets Groups Projects
Commit 0e761383 authored by Greg Fodor's avatar Greg Fodor
Browse files

Tone text

parent e1c35d09
No related branches found
No related tags found
No related merge requests found
......@@ -75,7 +75,8 @@ class UIRoot extends Component {
enterInVR: false,
micDevices: [],
mediaStream: null,
toneInterval: null
toneInterval: null,
tonePlaying: false
}
performDirectEntryFlow = async (enterInVR) => {
......@@ -134,7 +135,13 @@ class UIRoot extends Component {
beginAudioSetup = async () => {
await this.fetchMicDevices();
const playTone = () => document.querySelector("#test-tone").play();
const playTone = () => {
document.querySelector("#test-tone").play();
this.setState({ tonePlaying: true });
setTimeout(() => this.setState({ tonePlaying: false }), 2000);
};
playTone();
const toneInterval = setInterval(playTone, 5000);
this.setState({ toneInterval, entryStep: ENTRY_STEPS.audio_setup });
......@@ -204,6 +211,7 @@ class UIRoot extends Component {
<select value={selectedMicDeviceId} onChange={this.micDeviceChanged}>
{ this.state.micDevices.map(d => (<option key={ d.deviceId } value={ d.deviceId }>{d.label}</option>)) }
</select>
{ this.state.tonePlaying && (<div>Tone</div>) }
<button onClick={this.onAudioReadyButton}>
Audio Ready
</button>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment