getYoutube(id).test.hasPlayed() (since beta 0.3) Tests whether the end of the video was reached at least once. Note that the video need not have fully played, if the position was manually set before reaching the end.


getYoutube(id).settings.once() (since beta 0.3) Will disable the Youtube video after it has finished playing. Example: [js highlight=”2″ try=”true”]newYoutube(“myYoutube”, “aFPtc8BVdJk”) .settings.once() .print() .play() .wait() , newButton(“validate”, “Validate”) .print() .wait() [/js] Shows a video on the page and starts playing it. Playback will become disabled after it has finished.


log getYoutube(id).settings.log() (since beta 0.3) or getYoutube(id).settings.log(“play”) (since beta 0.4) or getYoutube(id).settings.log(“end”) (since beta 0.4) or getYoutube(id).settings.log(“pause”) (since beta 0.4) or getYoutube(id).settings.log(“buffer”) (since beta 0.4) or getYoutube(id).settings.log(“play”, “buffer”, …) (since beta 0.4) or getYoutube(id).settings.log(“all”) (since beta 0.3) Note: since beta 0.4, blank parentheses default back “play”. In beta 0.3, they default back to “all”. Will …


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


getYoutube(id).stop() (since beta 0.3) Pauses the video and moves it back to the beginning (position = 0s). Example: [js highlight=”10″ try=”true”]newYoutube(“mcgurk”, “aFPtc8BVdJk”) .print() .play() , newTimer(“preview”, 2000) .start() .wait() , getYoutube(“mcgurk”) .stop() [/js] Starts playing a mind-blowing video demonstrating the McGurk effect, waits 2 seconds and stops the video. The video will start over from …

getYoutube(id).play() Starts playing the video. If you did not use print before, the video will not be visible on the screen but sound will start playing anyway. Example: [js try=”true” highlight=”3″]newYoutube(“mcgurk”, “aFPtc8BVdJk”) .print() .play() .wait() [/js] Plays a mind-blowing video demonstrating the McGurk effect.


getYoutube(id).pause() Pauses the video. Example: [js highlight=”10″ try=”true”]newYoutube(“mcgurk”, “aFPtc8BVdJk”) .print() .play() , newTimer(“preview”, 1000) .start() .wait() , getYoutube(“mcgurk”) .pause() [/js] Starts playing a mind-blowing video demonstrating the McGurk effect, waits 1 second and pauses the video.