video.test.hasPlayed

getVideo(id).test.hasPlayed() (since beta 0.3) Tests whether the video stream has played at least once before in the trial.

video.settings.log

getVideo(id).settings.log() or getVideo(id).settings.log(“play”) or getVideo(id).settings.log(“pause”) or getVideo(id).settings.log(“end”) or getVideo(id).settings.log(“seek”) Tells to add a line in the results file each time an event happens. If you do not specify which event you want to log, all of them will add a line to the results file. “play” adds a line including a timestamp and an offset, …

video.settings.once

getVideo(id).settings.once() Disables the buttons to play/pause the video right after its first playing (the video can still be played using the action play). Example: [js highlight=”5″ try=”true”] newText(“instructions”, “Please watch the video below”) .print() , newVideo(“skate”, “skate.mp4”) .settings.once() .print() .wait() [/js] Adds some instruction text to the screen and a video below the text. After …

video.wait

getVideo(id).wait() or getVideo(id).wait(“first”) or getVideo(id).wait(test) Waits until the video resource is done playing before evaluating and executing the next commands. If you call wait(“first”), then if the video has already been played at least once by the time this command is evaluated, the next commands are evaluated and executed right away. If it was never …

video.stop

getVideo(id).stop() (since beta 0.3) Stops the playback of the video and goes back to the start of it, making it impossible to resume from the current position later. Example: [js highlight=”10″ try=”true”]newVideo(“skate”, “skate.mp4”) .print() .play() , newTimer(“preview”, 2500) .start() .wait() , getVideo(“skate”) .stop()[/js] Prints and starts playing the file sentence.mp4 and stops it after 2500ms. …

video.remove

getVideo(id).remove() Removes the <video> element from the screen. Example: [js try=”true” highlight=”6″] newVideo(“skate”, “skate.mp4”) .print() .wait() , getVideo(“skate”) .remove()[/js] Adds the video ksate.mp4 onto the screen, and removes it from the screen after the video has been fully played.

video.print

getVideo(id).print() Adds the <video> element to the screen. Note that if you use play on the Video element without printing it, the video will play anyway in the background. Example: [js highlight=”2″ try=”true”]newVideo(“skate”, “skate.mp4”) .print()[/js] Show an interface to play the video file skate.mp4 onto the screen.

video.play

getVideo(id).play() Starts playing the video file. Example: [js highlight=”3″ try=”true”]newVideo(“beep”, “skate.mp4”) .print() .play()[/js] Starts playing the file skate.mp4.

video.pause

getVideo(id).pause() (since beta 0.3) Pauses the video file. Example: [js highlight=”10″ try=”true”] newVideo(“sentence”, “skate.mp4”) .print() .play() , newTimer(“preview”, 2500) .start() .wait() , getVideo(“sentence”) .pause()[/js] Starts playing the file skate.mp4 and pauses it after 2500ms.

standard.setVar

getElement(id).setVar( varName ) (since beta 0.3) Stores the current value of the element in the Var element named varName (if it exists). What the current value corresponds to is specific to each element type: For Audio elements, it corresponds to the timestamp of the end of the last playback so far (0 if never played …