Streamalot: Streaming
Media Tips, Tricks, and Hints
Media Player
Embedding
Below, you will find the code and working examples for two different styles of an embedded Windows Media player.
**Please note that if you want to embed two or more instances of the player that uses the selection menu, you will need to be sure to give each instance a unique "name" and "id" in both the "Select" and Object" tag statements. You'll also need to be sure to use those names in the "onchange" statement of each as well.
Windows Media Embedded
If you have trouble copying the code below directly from this page then please
- Click Here -
---- HERE'S THE CODE ----
(NOTE: This player will not work in Firefox)
If you have trouble copying the code below directly from this page then please
- Click Here -
---- HERE'S THE CODE ----
<OBJECT id='mediaPlayer1' width="180" height="50"
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="Stream URL or Full File Path Goes Here">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="false">
<param name='showControls' value="true">
<param name ="ShowAudioControls"value="true">
<param name="ShowStatusBar" value="true">
<param name='loop' value="false">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="420" height="380"
src="Stream URL or Full File Path Goes Here" autostart="true" designtimesp='5311' loop="false">
</EMBED>
</OBJECT>
<br>
<a href="Stream URL or Full File Path Goes Here">Click here for standalone player</a>
Here is a table of some of the common parameters used in the above examples
Parameter
Default
Description
autoStart
true
Specifies or retrieves a value indicating whether the current media item begins playing automatically.
balance
0
Specifies the current stereo balance. Values range from –100 to 100.
baseURL
Specifies the base URL used for relative path resolution with URL script commands that are embedded in media items.
captioningID
0
Specifies the name of the element displaying the captioning.
currentMarker
0
Specifies the current marker number.
currentPosition
0
Specifies the current position in the media item in seconds.
defaultFrame
-
Specifies the name of the frame used to display a URL.
enableContextMenu
true
Specifies a value indicating whether to enable the context menu, which appears when the right mouse button is clicked.
enabled
false
Specifies whether the Windows Media Player control is enabled.
fullScreen
false
Specifies whether video content is played back in full-screen mode.
InvokeURLs
true
Specifies a value indicating whether URL events should launch a Web browser.
Mute
false
Specifies if audio is muted.
PlayCount
1
Specifies the number of times a media item will play. Minimum value of one.
Rate
1.0
Specifies the playback rate. 0.5 equates to half the normal playback speed, 2 equates to twice.
stretchToFit
false
Specifies whether video displayed by the control automatically sizes to fit the video window, when the video window is larger than the dimensions of the video image.
uiMode
full
Specifies which controls are shown in the user interface. Possible values: invisible, none, mini, full.
URL
-
Specifies the name of the media item to play. You can specify a local filename or a URL.
Volume
Last setting
Zero specifies no volume and 100 specifies full volume.
windowlessVideo
false
Specifies or retrieves a value indicating whether the Windows Media Player control renders video in windowless mode. When windowlessVideo is set to true, the Player control renders video directly in the client area, so you can apply special effects or layer the video with text. Supported by Windows Media Player for Windows XP or later.
For information on embedding RealPlayer - Click Here -
For information on embedding QuickTime Player - Click Here -