JavaScript tutorial:
Inserting Sound or Video


Insert Sound/Video allows you to add sound files (i.e. .mp3, .mid) or video files (i.e .avi, .mpeg) to your web page.

To insert a sound/video:

Make sure that the web page is saved before you start inserting sound/video.This is important because the links to sound/video and other resources are relative to your document's path.

Select Insert/Sound or Insert/Video from menu.

Select the file and click OK.

If your sound/video is not in your document's folder (or one of its sub-folders), the Resource Wizard dialog will pop up. Deciding where your document is going to be located is important, so click here if you have not used the Resource Wizard before.

Click OK and the next window Media Options will appear. (seen below)

Of major consideration is whether you use the Embed tag or not: it is recognized by all major browsers and gives you maximum compatibility. If you leave this option un-checked, you will be using the Media Player object, which gives you more options, but only works on Internet Explorer. Other options are:

    Width, Height: adjusts the width and height size for the sound/video.

    Show Display: adds a viewing window to allow you to see the sound/video.

    Show Controls: adds control options to the sound/video (ie: play, stop, rewind, fast forward)

    Show Tracker: adds a tracker bar to keep track of where you are in the replay.

    Auto Start: automatically plays the sound/video when the web page is loaded.

    Auto Rewind: automatically rewinds the sound/video when your sound/video stops.

    Click to Play: mouse click activates the playback.

    Mute: mutes the sound/video.

    Play count: plays the sound/video the number of times specified.

Click OK to complete inserting the sound/video.