mediarecorder.once

getMediaRecorder(id).once() (since PennController 1.8)

Disables the button to record after the first recording. You can still play back the recording, or programmatically start a new recording using the command record.

Example:

[js highlight=”5″ try=”data”]InitiateRecorder(“https://myserver/upload.php”);

newTrial(
newMediaRecorder(“recorder”)
.once()
.print()
.wait()
.play()
.wait(“playback”)
);[/js]

Adds a media player and a recording button to the page, and when the recording stops, the button becomes disabled and the video automatically plays back.

Published by Jeremy

Researcher in semantics and pragmatics; Programmer of PennController for IBEX