The new PCIbex Farm is here! Be sure to check out all of its new features and changes.

Link Search Menu Expand Document

mediarecorder.stop

description

Stops recording / playing the latest sample.

syntax

getMediaRecorder(ELEMENT_NAME).stop()

example(s)


@InitiateRecorder("https://myserver/upload.php");
@
@newTrial(
@    newMediaRecorder("recorder")
@        .record()
@    ,
@    newTimer("recording", 3000)
@        .start()
@        .wait()
@    ,
@    getMediaRecorder("recorder")
@        .stop()
$        .disable()
@        .print()
@        .play()
@    ,
@    newTimer("preview", 1000)
@        .start()
@        .wait()
@    ,
@    getMediaRecorder("recorder")
$        .stop()
@);
  • Will start recording a video and stop recording after 2s, then play back the first second of the recording and stop the playback.