How to embed sound and video

Some browser can handle background music. View the source to see the format.

Analogous to how we include image files with the (img) tag, we can include sound/video files with the (embed) tag. The computer must have the right plugins to play them though. The (embed) tag has the following arguments: src="location_of_filename"

  • autostart=true (default is false)
  • loop=true (default is false)
  • hidden=true (default is false) Try not to make it true; so that the user has some control over it.
  • height=??? (in pixels)
  • width=??? (in pixels)
  • volume=??? (in percent of the maximum)
  • name=??? (in text string)

    If is a good idea to read the sound/video files at the end of the document because they are usually large and take a long time to download. There is an .avi file embedded immediately after this, which is represented by the first frame of the video file. You can specify the size. (For some reason, it is not working now.)

    The following avi is inserted as (object), which seems to work.

    A .mid/rmi file is embedded with the (embed) tag which is automatically represented by an MPLAYER icon embedded within the .rmi file. We click on the next icon to start playing. Since it does not have a stop button, we do not have a way to stop it; we must play it in its entirety.

    The next one starts automatically with "autostart=true" & has a different console from the one above with "controls=largeconsole".

    The next one has a small console and loops (the align tag is ignored).

    Another one (the align tag is also ignored) but only one plays. With this technique, as is being done here, one can list several sound clips and choose which one to play.

    ©1996-1998 by Nam Sun Wang