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 …

standard.remove

getElement(id).remove() Removes the element from the screen. This has no effect for non-visual elements such as the purely interactive . Note that this leaves no space where the element previously was on the page (this is really removing the element, not just hiding it). Example [js highlight=”4″ try=”true”] newButton(“clickme”, “Click me”) .print() .wait() .remove() [/js] …

standard.print

getElement(id).print() or getElement(id).print(x,y) (limited support in PennController 1.3, general since 1.4) or getElement(id).print(x,y,canvas) (limited support in PennController 1.3, general since 1.4) Adds the content of the element to the screen. This has no effect for non-visual elements such as the purely interactive . Since PennController 1.3, you can pass x and y values to print …

youtube.wait

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 …

youtube.stop

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 …

youtube.play

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.