eyetracker.stop

getEyeTracker(id).stop() (since PennController 1.8) Stops tracking which element is being looked at. The EyeTracker element will stop collecting and sending data points to your PHP script after stop is executed. Example: [js highlight=”11″ try=”data”]newTrial( newButton(“Start”).print().wait(newEyeTracker().test.ready()) ) newTrial( newEyeTracker(“tracker”).calibrate(70) , newText(“Left”).css(“padding”,”20vw”).print(“20vw”, “40vh”), newText(“Right”).css(“padding”,”20vw”).print(“60vw”, “40vh”) , getEyeTracker(“tracker”).add( getText(“Left”) , getText(“Right”) ).showFeedback().start() , newTimer(1000).callback( getEyeTracker(“tracker”).stop() ).start() , newSelector().add( …

eyetracker.start

getEyeTracker(id).start() (since PennController 1.8) Starts tracking which element is being looked at. You should use first to tell the eye tracker which elements are to be tracked. The EyeTracker element will not collect any data points until start is executed. Use to stop tracking elements and sending data to your PHP script. Example: [js highlight=”9″ …

eyetracker.hideFeedback

getEyeTracker(id).hideFeedback() (since PennController 1.8) Hides the red dot estimating your looks. The red dot is hidden by default after calibration, but you can turn it back on using . Example: [js highlight=”11″ try=”data”]newTrial( newButton(“Start”).print().wait(newEyeTracker().test.ready()) ) newTrial( newEyeTracker(“tracker”).calibrate(70) , newText(“Left”).css(“padding”,”20vw”).print(“20vw”, “40vh”), newText(“Right”).css(“padding”,”20vw”).print(“60vw”, “40vh”) , getEyeTracker(“tracker”).add( getText(“Left”) , getText(“Right”) ).showFeedback().start() , newTimer(1000).callback( getEyeTracker(“tracker”).hideFeedback() ).start() , newSelector().add( getText(“Left”) …

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 …

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.record

getMediaRecorder(id).record() (since PennController 1.8) Starts recording. Example: [js highlight=”5″ try=”data”]InitiateRecorder(“https://myserver/upload.php”); newTrial( newMediaRecorder(“recorder”,”audio”) .record() , newTimer(“recording”, 2000) .start() .wait() , getMediaRecorder(“recorder”) .stop() .play() .wait(“playback”) );[/js] Will record audio for 2s and then play it back.

mediarecorder.play

getMediaRecorder(id).play() (since PennController 1.8) Starts playing the last recording (if any). Example: [js highlight=”15″ try=”data”]InitiateRecorder(“https://myserver/upload.php”); newTrial( newMediaRecorder(“recorder”) .record() , newTimer(“recording”, 2000) .start() .wait() , getMediaRecorder(“recorder”) .stop() .print() .disable() .play() .wait(“playback”) ); [/js] Will record for 2s and then play back the recording.

controller.wait

getController(id).wait() (since PennController 1.7) or getController(id).wait( test ) (since PennController 1.7) Waits until the controller has been completed. Example: [js highlight=”9″ try=”true”]newButton(“Start reading”) .print() .wait() .remove() , newController(“DashedSentence”, {s: “The mouse that the cat that the dog is petting is hugging is happy”} ) .print() .log() .wait() .remove() , newText(“Good job!”) .print() [/js]

scale.unselect

getScale(id).unselect() (since PennController 1.6) Will unselect the option currently selected. If the scale is a slider, it will set it back to the central value. Example: [js highlight=”5″ try=”true”]newScale(“score”, 10) .print() , newButton(“Unselect”) .settings.callback( getScale(“score”).unselect() ) .print()[/js] Prints a 10-point radio button scale and a button reading Unselect which, when clicked, unselects the currently selected …