The VoiceRecorder element is deprecated since PennController 1.8. See mediarecorder.play instead.
getVoiceRecorder(id).play()
Starts playing the last recording (if any).
Example:
[js highlight=”13″ try=”data”]InitiateRecorder(“https://myserver/upload.php”);
newTrial(
newVoiceRecorder(“recorder”)
.record()
,
newTimer(“recording”, 2000)
.start()
.wait()
,
getVoiceRecorder(“recorder”)
.stop()
.play()
.wait(“playback”)
);
[/js]
Will record audio for 2s and then play it back.