An important new feature in HTML5 is native support of video and audio. At this time, the browsers that accept video and/or audio do not all accept the same encodings, so for each of these examples, I created 3 versions of the same video content and 2 versions of the same audio content.
Plain, 'static', video, with controls
Video bouncing in a box: masked to be a circle. This uses drawImage. The code for the bouncing is the same used in the basic examples referenced earlier. The mask is a donut drawn as two simply-connected (no hole) shapes.
Map (Google Maps) as portal to videos and images. This uses the Google Maps API to access and display a Google map. Internal data associates certain locations (latitude/longitude) with either video or an image. When the visitor clicks on the map, the media associated with the nearest of the locations is diplayed. HINT: click near Purchase College for a video from the Robotics class. Click north, nearer to Mt. Kisco for a picture of my mother. Click south, nearer the Statue of Liberty for a video of fireworks.
Rock paper scissors . A critical factor here is to coordinate the sound, the image representing the computer's throw emerging on the screen, and the updating of the score.
Geolocation is an independent effort being developed in parallel to the HTML5 specification. The idea is to use some means to locate the client computer. This can include triangulation of WiFi hot spots as recorded by companies such as Google, triangulation of cell phone towers, GPS, and tables of IP addresses as recorded by ISPs.
Provides geolocation information (if available and user is willing). This is intended to help you test how good the found location is.
Performs geolocation and/or allows user to select from 3 locations or click to establish a new base. Computes distance from base to clicked location. Also provides Google directions..
Building drawings from ovals and rectangles and saving using localStorage
This is a stub for a game or other application in which the player/user drags shapes. It also demonstrates use of localStorage, the HTML5 version of cookies. Since the information to be saved is of variable length, encoding and decoding is done using join and split.