A Streaming Media JukeBox - Part II: Netscape: Embedding the Windows Media Player
A Streaming Media JukeBox - Part II: Netscape
Embedding the Windows Media Player's Plugin
In Column 51, A Streaming Media JukeBox, we showed you two ways to play a streaming media file. The first one is through an external Media Player. If you haven't install it yet on your computer, this link will connect you immediately to the download area:
To invoke the external Media Player, just place a link to an ASF or ASX file in your Web page. To see a live demo of a streaming media, try this Media Player Introduction. The minimum modem baud rate should be 28.8K. The video stream will look more like still pictures with lower-rate communication link.
The second method to play a streaming media is to embed the Media Player in the Web page as an ActiveX control. Since ActiveX control is unique to the Windows operating system and Internet Explorer, we need a third method to play streaming media with other operating systems and other browsers. The way to do it is by embedding the Media Player's Plugin in your page. When using the above download link, Microsoft server will identify your operating system and will download both the Media Player ActiveX control as well as its Plugin, either or both, whatever is playable on your computer.
The HTML tag that embeds the Media Player's Plugin is the <EMBED>
tag. Here is how we use this tag in our jukebox:
<EMBED TYPE="application/x-mplayer2"
PLUGINSPAGE="https://microsoft.com/windows/mediaplayer/en/download/"
ID=mediaPlayer
Name="mediaPlayer"
DISPLAYSIZE="4"
AUTOSIZE="-1"
BGCOLOR="darkblue"
SHOWCONTROLS="-1"
SHOWTRACKER="-1"
SHOWDISPLAY="0"
SHOWSTATUSBAR="-1"
VIDEOBORDER3D="-1"
WIDTH=320
HEIGHT=313
SRC="https://msdn.microsoft.com/downloads/samples/Internet/imedia/netshow/
smedia/NS3/JavaScript/Buttons/control.asx"
AUTOSTART="-1" ');
DESIGNTIMESP="5311">
</EMBED>
Let's examine the components of this tag:
Attribute | Description |
TYPE | The Plugin's name as was downloaded from Microsoft. Should be assigned the string "application/x-mplayer2". |
PLUGINSPAGE | The browser will check if you have the proper Plugin, and, if you don't, will change its location to the given URL for downloading it. |
ID | The Plugin's object ID. You can assign any string to the Plugin's ID. Used by Internet Explorer for object referencing. |
NAME | The Plugin's object name. You can assign any string to the Plugin's name. Used by Netscape Navigator for object referencing. |
DISPLAYSIZE | Specifies the relative size of the Plugin on the page. 0 is normal size, 1 is smaller than normal, 2 is larger than normal, 3 is even larger, and so on. |
AUTOSIZE | Specifies whether to automatically size the Plugin window according to the streaming media display size. 0 is false, non-zero is true. |
BGCOLOR | Specifies the background color of the streaming media window. |
SHOWCONTROLS | Specifies whether to show the streaming media controls below the media window. 0 is false, non-zero is true. |
SHOWTRACKER | Specifies whether to display the tracking marker that shows the current status of the player: opening, buffering, displaying, etc. |
SHOWDISPLAY | Specifies whether to display the show information portion, including the author name, the clip name, and the copyright information. 0 is false, non-zero is true. |
SHOWSTATUSBAR | Specifies whether to display the bar showing the pointer along the stream where the player is currently at. 0 is false, non-zero is true. |
VIDEOBORDER3D | Specifies whether to display a 3-D border around the player. 0 is false, non-zero is true. |
WIDTH | Specifies the width of the player window. |
HEIGHT | Specifies the height of the player window. |
SRC | Specifies streaming media file. Can be either ASX, ASF, or any other media format. |
AUTOSTART | Specifies whether to start the media automatically upon loading. 0 is false, non-zero is true. |
DESIGNTIMESP | A specical ID number. Can be ignored. |
Being a plugin, the <EMBED>
tag is not accompanied with any parameters to be used in JavaScript. All Plugin's characterstics are controlled via its methods, as we'll explain later in this column.
Produced by Yehuda Shiran and Tomer Shiran
Created: November 9, 1999
Revised: November 23, 1999
URL: https://www.webreference.com/js/column52/install.html