getScale(id).settings.label(index,label) Sets the content of the index-th label (with index starting at 0). This will mostly be useful if you want to use something like an Image element as a label, which cannot be passed as a direct parameter when creating the new Scale. [js highlight=”2,3″ try=”true”] newScale(“score”, “Bad”, “So-so”, “Good”) .settings.label( 0 , newImage(“no.png”) …
Post Type Archives: Wiki Pages
eyetracker.calibrate
getEyeTracker(id).calibrate(threshold) (since PennController 1.8) or getEyeTracker(id).calibrate(threshold,attempts) Calibrates the eye-tracker so that threshold% of the estimated looks fall on the target. If the eye-tracker was calibrated before, this command will display a button at the center of the page: after clicking it, participants must fix it for 3s. If fewer than threshold% of the estimated looks …
EyeTracker element
mediarecorder.test.recorded
getMediaRecorder(id).test.recorded() (since PennController 1.8) Tests whether a recording was completed.
mediarecorder.test.playing
getMediaRecorder(id).test.playing() (since PennController 1.8) Tests whether the recording is currently being played back.
mediarecorder.test.hasPlayed
getMediaRecorder(id).test.hasPlayed() (since PennController 1.8) Tests whether the recording was ever played back.
mediarecorder.wait
getMediaRecorder(id).wait() (since PennController 1.8) or getMediaRecorder(id).wait(“first”) or getMediaRecorder(id).wait(“playback”) Waits for the current (or next) recording to be over. If you pass “first” and a sample had already been recorded by the time this command gets evaluated and executed, the commands that come next are immediately evaluated and executed. Otherwise, it waits until a recording has …
mediarecorder.stop
getMediaRecorder(id).stop() (since PennController 1.8) Stops recording / playing the latest sample. Example: [js highlight=”12,22″ try=”data”]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() );[/js] Will start recording a video and stop recording after 2s, then play back the first second of …
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 …
mediarecorder.log
getVoiceRecorder(id).log() (since PennController 1.8) Will add a line whenever a recording starts and whenever it stops. Note that a line with the filename of the recorded sample is always logged anyway even if you do not call .log(), so you can identify it in the output archive. [js highlight=”2″]newMediaRecorder(“recorder”) .log() .print() .wait() [/js] Adds a …