The VoiceRecorder element is deprecated since PennController 1.8. See mediarecorder.once instead.
getVoiceRecorder(id).settings.once()
Disables the button to record after the first recording. You can still record using the action command record
.
Example:
[js highlight=”5″ try=”data”]InitiateRecorder(“https://myserver/upload.php”);
newTrial(
newVoiceRecorder(“recorder”)
.settings.once()
.print()
.wait()
.play()
.wait(“playback”)
);[/js]
Adds a recording and a playback button to the page, and when the recording button is clicked for the second time (i.e., recording is over) the buttons become disabled and the audio automatically plays back.