Chapter 10: Audio and Video Devices - Examples

Note that only the WebSocket parts will work in current browsers.

  1. Listing 10-1: Creating a device selector for a video stream
  2. Listing 10-2: Displaying captured video from a device in a <video> element
  3. Listing 10-3: Recording media from a device
  4. Listing 10-4: Simple WebSocket example using the websocket.org echo service
  5. Listing 10-5: A WebSocket server written in JavaScript for node.js that broadcasts all incoming messages
  6. Listing 10-6: A client for the WebSocket server in Listing 10-5 that sends which buttons are pressed
  7. Listing 10-7: A client for the WebSocket server in Listing 10-5 that allows shared video viewing
  8. Listing 10-8: A video conferencing web page example using WebSockets and the <device> element