Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Attribute for <EMBED ...>
MASTERSOUND

Usage Recommendation
Only use this attribute if you also use the NAME attribute and the embedded object is a sound

MASTERSOUND, which only works with Netscape, is required if you are embedding a sound and if you use the NAME attribute.

MASTERSOUND is also for the unusual situation where you would like to spread the controls for a single sound around different places on the page. MASTERSOUND allows several <EMBED ...>'s to control a single sound. This is usually done in conjunction with the CONTROLS attribute so that one object displays the volume control, another the start button, another the pause button, etc.

Consider the situation where we want to have the play button, pause button, stop button and volume lever all in different cells of a table, but they all control one sound. We could do this with the following (lengthy) code:

<TABLE BGCOLOR=RED BORDER>
<TR ALIGN=CENTER>
<TD><EMBED 
    SRC="../graphics/sounds/1812over.mid"
    NAME="SoundGroup"
    WIDTH=34 HEIGHT=23
    CONTROLS=PLAYBUTTON
    MASTERSOUND
    ><BR>Play</TD>

<TD><EMBED 
    SRC="stub1.mid" 
    NAME="SoundGroup"
    WIDTH=34 HEIGHT=23
    CONTROLS=PAUSEBUTTON
    ><BR>Pause</TD>

<TD><EMBED 
    SRC="stub2.mid" 
    NAME="SoundGroup"
    WIDTH=34 HEIGHT=23
    CONTROLS=STOPBUTTON
    ><BR>Stop</TD>

<TR ALIGN=CENTER>
<TD COLSPAN=3 ALIGN=CENTER><EMBED 
    SRC="stub3.mid" 
    NAME="SoundGroup"
    WIDTH=74 HEIGHT=20
    CONTROLS=VOLUMELEVER
    ><BR>Volume</TD>
</TR>
</TABLE>

This would create this set of sound controls:


Play

Pause

Stop

Volume

Notice several things about using MASTERSOUND:

  • Every sound <EMBED ...> in the group must use the NAME attribute, and they must all have the same name. If you use the MASTERSOUND attribute, even for just one sound <EMBED ...>, you must use NAME.
  • One and only one of the sound <EMBED ...>'s must have the MASTERSOUND attribute.
  • Each <EMBED ...> uses the CONTROLS attribute to indicate a different type of sound control.
  • Only the MASTERSOUND tag needs to point to the sound file, but they must all point to some sound file of the same type so that the browser knows all of the <EMBED ...>'s are of the same type. Netscape recommends that all <EMBED ...>'s in the group beside the MASTERSOUND one point to "stub" files. Stub files are dummy files which aren't really sound files at all, but just text files one character long (all of the stub files used above consist of a single 'x'). The browser never reads the stub files, but it sees that they are of the same type of file as the MASTERSOUND file.

The use of MASTERSOUND as a multi-control interface has been a confusing addition to HTML, but to make matters worse it doesn't even work very well in Netscape. There have been consistent problems with the controls appearing not as buttons or sliders but as empty gray boxes. Microsoft has not seen fit to waste its time copying Netscape's MASTERSOUND.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire