Browse Source

Maybe start the audio

main
Luke Murphy 5 years ago
parent
commit
10414e593e
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 8
      voicegardens/static/voicegardens.js

8
voicegardens/static/voicegardens.js

@ -56,17 +56,12 @@ function record() {
/** /**
* Start recording a sound. * Start recording a sound.
**/ **/
userStartAudio();
if (microphone.enabled === true) { if (microphone.enabled === true) {
recorder.record(recording); recorder.record(recording);
} }
} }
function enableAudioContext() {
if (getAudioContext().state !== "running") {
getAudioContext().resume();
}
}
function stop() { function stop() {
/** /**
* Stop recording a new sound. * Stop recording a new sound.
@ -158,7 +153,6 @@ function setupRecording() {
recordButton = createImg("../static/images/RECORD-COLOR.png"); recordButton = createImg("../static/images/RECORD-COLOR.png");
recordButton.mousePressed(record); recordButton.mousePressed(record);
recordButton.touchStarted(enableAudioContext);
recordButton.class("button record"); recordButton.class("button record");
stopButton = createImg("../static/images/STOP-BW.png"); stopButton = createImg("../static/images/STOP-BW.png");

Loading…
Cancel
Save