SoFunction
Updated on 2025-04-10

Parameter meaning of web player Windows Media Player Parameter meaning

(Default 0 is No, -1 or 1 is Yes)
<object class width="286" height="225">
   <param name="AudioStream" value="-1">
   <param name="AutoSize" value="-1">
<!--Whether to automatically adjust the playback size-->
   <param name="AutoStart" value="-1">
<!--Is it automatically played-->
   <param name="AnimationAtStart" value="-1">
   <param name="AllowScan" value="-1">
   <param name="AllowChangeDisplaySize" value="-1">
   <param name="AutoRewind" value="0">
   <param name="Balance" value="0">
<!--Balanced left and right channels, leftmost -9640, rightmost 9640-->
   <param name="BaseURL" value>
   <param name="BufferingTime" value="15">
<!--Buffering Time-->
   <param name="CaptioningID" value>
   <param name="ClickToPlay" value="-1">
   <param name="CursorType" value="0">
   <param name="CurrentPosition" value="0">
<!--The current playback progress -1 means unchanged, 0 means beginning. The unit is seconds. For example, 10 means starting from the 10th second. The value must be -1.0 or greater than or equal to 0-->
   <param name="CurrentMarker" value="0">
   <param name="DefaultFrame" value>
   <param name="DisplayBackColor" value="0">
   <param name="DisplayForeColor" value="16777215">
   <param name="DisplayMode" value="0">
   <param name="DisplaySize" value="0">
<!--Video 1-50%, 0-100%, 2-200%, 3-Full screen Other values ​​are processed as 0, and decimals are rounded and then processed before-->
   <param name="Enabled" value="-1">
   <param name="EnableContextMenu" value="-1">
<!-Whether to use the right click to pop up the menu-->
   <param name="EnablePositionControls" value="-1">
   <param name="EnableFullScreenControls" value="-1">
   <param name="EnableTracker" value="-1">
<!--Is it allowed to pull the playback progress bar to play anywhere-->
   <param name="Filename" value="/blog/" valuetype="ref">
<!--played file address-->
   <param name="InvokeURLs" value="-1">
   <param name="Language" value="-1">
   <param name="Mute" value="0">
<!--Silent or not->
   <param name="PlayCount" value="10">
<!--The number of repeated plays, 0 is always repeated-->
   <param name="PreviewMode" value="-1">
   <param name="Rate" value="1">
<!--Play rate control, 1 is normal, decimals are allowed-->
   <param name="SAMIStyle" value>
<!--SAMI style-->
   <param name="SAMILang" value>
<!--SAMI Language-->
   <param name="SAMIFilename" value>
<!--Subtitle ID-->
   <param name="SelectionStart" value="-1">
   <param name="SelectionEnd" value="-1">
   <param name="SendOpenStateChangeEvents" value="-1">
   <param name="SendWarningEvents" value="-1">
   <param name="SendErrorEvents" value="-1">
   <param name="SendKeyboardEvents" value="0">
   <param name="SendMouseClickEvents" value="0">
   <param name="SendMouseMoveEvents" value="0">
   <param name="SendPlayStateChangeEvents" value="-1">
   <param name="ShowCaptioning" value="0">
<!--Whether subtitles are displayed, it is a piece of black, and there will be a large piece of black below, which is generally not displayed-->
   <param name="ShowControls" value="-1">
<!-- Whether to display control, such as play, stop, pause-->
   <param name="ShowAudioControls" value="-1">
<!--Does the volume control be displayed-->
   <param name="ShowDisplay" value="0">
<!--Show program information, such as copyright, etc.-->
   <param name="ShowGotoBar" value="0">
<!-- Whether to enable the context menu-->
   <param name="ShowPositionControls" value="-1">
<!-- Whether to display forward, back and list, if displayed, it is generally gray and uncontrollable-->
   <param name="ShowStatusBar" value="-1">
<!--Current playback information, displays whether it is being played, as well as the total playback time and the current playback time-->
   <param name="ShowTracker" value="-1">
<!--Whether to display the current playback tracking bar, that is, the current playback progress bar-->
   <param name="TransparentAtStart" value="-1">
   <param name="VideoBorderWidth" value="0">
<!-- If the width of the display part is smaller than the video width, the minimum is the video width, or it is increased to the specified value and automatically increases the height. This change only changes the size of the surrounding black frames, and does not change the video size-->
   <param name="VideoBorderColor" value="0">
<!--Show the color of the black box, which is RGB value, such as ffff00 is yellow-->
   <param name="VideoBorder3D" value="0">
   <param name="Volume" value="0">
<!--Volume size, negative value indicates that it is the impairment of the current volume. The value will automatically take the absolute value, with the maximum value of 0 and the minimum value of -9640-->
   <param name="WindowlessVideo" value="0">
<!--If it is 0, full screen can be allowed, otherwise you can only view it in the window-->
</object>

The player above is the old-fashioned, version 6.4! The new player appears after MediaPlayer9.0, which means that only players installed with 9.0 or above can be used normally.

-------------------------------------------------------------------------------

Here is the new player code, which is much simpler than before:
<object height="64" width="260" class>
   <param NAME="AutoStart" VALUE="-1">
<!--Is it automatically played-->
   <param NAME="Balance" VALUE="0">
<!--Adjust the balance between left and right channels, same as the old player code above-->
   <param name="enabled" value="-1">
<!--Is the player artificially controlled-->
   <param NAME="EnableContextMenu" VALUE="-1">
<!-- Whether to enable the context menu-->
   <param NAME="url" value="/blog/">
<!--played file address-->
   <param NAME="PlayCount" VALUE="1">
<!--Play number control, as an integer-->
   <param name="rate" value="1">
<!--Play rate control, 1 is normal, decimals are allowed, 1.0-2.0-->
   <param name="currentPosition" value="0">
<!--Control settings: Current location-->
   <param name="currentMarker" value="0">
<!--Control settings: Current tag-->
   <param name="defaultFrame" value="">
<!--Show default frame-->
   <param name="invokeURLs" value="0">
<!--Script command settings: Whether to call URL-->
   <param name="baseURL" value="">
<!--Script command settings: the called URL-->
   <param name="stretchToFit" value="0">
<!-- Whether to stretch in proportion-->
   <param name="volume" value="50">
<!--Default sound size is 0%-100%, 50%-->
   <param name="mute" value="0">
<!--Silent or not->
   <param name="uiMode" value="mini">
<!--Player display mode: Full displays all; mini is the most simplified; None does not display playback control, only displays video window; invisible does not display-->
   <param name="windowlessVideo" value="0">
<!--If it is 0, full screen can be allowed, otherwise you can only view it in the window-->
   <param name="fullScreen" value="0">
<!--Is it automatic full screen to start playing?-->
   <param name="enableErrorDialogs" value="-1">
<!--Whether to enable error prompt report-->
   <param name="SAMIStyle" value>
<!--SAMI style-->
   <param name="SAMILang" value>
<!--SAMI Language-->
   <param name="SAMIFilename" value>
<!--Subtitle ID-->
</object>

Real Player Web Player Parameter Meaning

Parameters: autostart attribute: True or False Function: Specify whether the specified source file is automatically played.
Parameters: backgroundcolor Property: Any hexadecimal value starting with the symbol "#" or any predefined color function: Specify the background color of the image window
Parameter: center property: True or False Function: Specify that the fragment is played with the initial encoding size and is in the center of the image window.
Parameters: classid attribute: "clsid: CFCDAA03-8BE4-1lcf-B84B0020AFBBCCFA:** Function: Used to specify the unique string mark of the ActiveX control, and the embedded RealPalyer player can be recognized.
Parameters: console attribute: Any string function: Various RealPlayer controls can be gathered on a web page so that they can be used interactively or remain independent without affecting each other.
Parameters: controls Properties: ImageWindow, All, ControlPanel, PlavButton, PlayOnlyButton, PauseButton, StopButton, FFCtrl, RWCtrl, MuteCtrl, MuteVolume, VolumeSlider, PositionSlider, TACCtrl, HomeCtrl, InfoVolumePanel, InfoPanel, StatusBar, StatusField, PositionField Function: Let you specify which controls are visible.
Parameters: height attribute: Any integer value function: Specify the height of the RealPlayer element, unit: pixels
Parameters: id Attribute: Any string function: Specify a name for the RealPlayer element in the tag.
Parameters: imagestatus Property: True or False Function: Specify whether status information is displayed in the image window, the default value is true
Parameter: loop attribute: True or False Function: allows you to specify whether the fragment loops infinitely
Parameters: maintainaspect Property: True or False Function: Default RealPlayer stretches all fragments to fill the entire image window.
Parameter: name attribute: Any string function: Specify a name for the RealPlayer element in the tag (using id in the tag)
Parameters: nojava properties: True or False Function: Avoid starting Java virtual machine
Parameters: nolabels Attribute: True or False Function: It can prohibit the display of title or copyright information (if realplayer 5.0 or above, it is garbage...)
Parameters: nologo Attribute: True or False Function: Avoid display in the image window when RealPlayer is started
Parameters: numloop property: Any integer value function: allows you to specify the number of times a file slice loop is not required.
Parameter: prefetch attribute: True or False Function: Specify whether RealPlayer can obtain stream description information before playback. The default value is False
Parameters: region property: Any string function: used with SMIL. Allows you to specify the use of HTML instead of SMIL
Parameters: scriptcallbacks Property: Comma-segment list function: Specify the browser's callback monitoring (What a high-end thing!)
Parameters: shuffle Attribute: True or False Function: Used with multiple file slices of ram files or SMIL files. You can make files in RealPlayer shuffle list
Parameters: src attribute: any legal relative or complete URL Function: Specify the address of the playback file or source file
Parameters: type attribute: string function: Specify the MIME type for the embedded plugin
Parameters: width attribute: Any integer value function: Specify the width of the RealPlayer element

Some functions, methods and procedures of RealPlayer

These are all functions and methods of Real Player ActiveX Control Library (Version 1.0). If you are interested, you can study it.

function GetSource: WideString;
procedure SetSource(const lpszNewValue: WideString);
function GetConsole: WideString;
procedure SetConsole(const lpszNewValue: WideString);
function GetControls: WideString;
procedure SetControls(const lpszNewValue: WideString);
function GetNoLabels: WordBool;
procedure SetNoLabels(bNewValue: WordBool);
function GetAutoStart: WordBool;
procedure SetAutoStart(bNewValue: WordBool);
function GetAutoGotoURL: WordBool;
procedure SetAutoGotoURL(bNewValue: WordBool);
function GetVolume: Smallint;
procedure SetVolume(nVol: Smallint);
function GetMute: WordBool;
procedure SetMute(bMute: WordBool);
function GetLoop: WordBool;
procedure SetLoop(bVal: WordBool);
function GetImageStatus: WordBool;
procedure SetImageStatus(bEnable: WordBool);
function GetPacketsTotal: Integer;
function GetPacketsReceived: Integer;
function GetPacketsOutOfOrder: Integer;
function GetPacketsMissing: Integer;
function GetPacketsEarly: Integer;
function GetPacketsLate: Integer;
function GetBandwidthAverage: Integer;
function GetBandwidthCurrent: Integer;
procedure DoPlayPause;
procedure DoStop;
procedure DoNextItem;
procedure DoPrevItem;
function CanPlayPause: WordBool;
function CanStop: WordBool;
function HasNextItem: WordBool;
function HasPrevItem: WordBool;
function HasNextEntry: WordBool;
function HasPrevEntry: WordBool;
procedure DoNextEntry;
procedure DoPrevEntry;
procedure AboutBox;
procedure EditPreferences;
procedure HideShowStatistics;
function IsStatisticsVisible: WordBool;
procedure DoGotoURL(const url: WideString; const target: WideString);
procedure DoPlay;
procedure DoPause;
function GetPosition: Integer;
function GetPlayState: Integer;
function GetLength: Integer;
function GetTitle: WideString;
function GetAuthor: WideString;
function GetCopyright: WideString;
function GetClipWidth: Integer;
function GetClipHeight: Integer;
function CanPlay: WordBool;
function CanPause: WordBool;
procedure SetPosition(lPosition: Integer);
function GetNumLoop: Integer;
procedure SetNumLoop(lVal: Integer);
function GetCenter: WordBool;
procedure SetCenter(bVal: WordBool);
function GetNoLogo: WordBool;
procedure SetNoLogo(bVal: WordBool);
function GetMaintainAspect: WordBool;
procedure SetMaintainAspect(bVal: WordBool);
function GetBackgroundColor: WideString;
procedure SetBackgroundColor(const pVal: WideString);
function GetStereoState: WordBool;
function GetLiveState: WordBool;
function GetShowStatistics: WordBool;
procedure SetShowStatistics(bVal: WordBool);
function GetShowPreferences: WordBool;
procedure SetShowPreferences(bVal: WordBool);
function GetShowAbout: WordBool;
procedure SetShowAbout(bVal: WordBool);
function GetOriginalSize: WordBool;
procedure SetOriginalSize;
function GetDoubleSize: WordBool;
procedure SetDoubleSize;
function GetFullScreen: WordBool;
procedure SetFullScreen;
function GetEnableContextMenu: WordBool;
procedure SetEnableContextMenu(bVal: WordBool);
function GetEnableOriginalSize: WordBool;
procedure SetEnableOriginalSize(bVal: WordBool);
function GetEnableDoubleSize: WordBool;
procedure SetEnableDoubleSize(bVal: WordBool);
function GetEnableFullScreen: WordBool;
procedure SetEnableFullScreen(bVal: WordBool);
function GetEnableMessageBox: WordBool;
procedure SetEnableMessageBox(bVal: WordBool);
procedure SetTitle(const pVal: WideString);
procedure SetAuthor(const pVal: WideString);
procedure SetCopyright(const pVal: WideString);
function GetWantKeyboardEvents: WordBool;
procedure SetWantKeyboardEvents(bWantsEvents: WordBool);
function GetWantMouseEvents: WordBool;
procedure SetWantMouseEvents(bWantsEvents: WordBool);
function GetNumEntries: Smallint;
function GetCurrentEntry: Smallint;
function GetEntryTitle(uEntryIndex: Smallint): WideString;
function GetEntryAuthor(uEntryIndex: Smallint): WideString;
function GetEntryCopyright(uEntryIndex: Smallint): WideString;
function GetEntryAbstract(uEntryIndex: Smallint): WideString;
procedure SetCanSeek(bCanSeek: WordBool);
function GetCanSeek: WordBool;
function GetBufferingTimeElapsed: Integer;
function GetBufferingTimeRemaining: Integer;
function GetConnectionBandwidth: Integer;
function GetPreferedLanguageString: WideString;
function GetPreferedLanguageID: Integer;
function GetUserCountryID: Integer;
function GetNumSources: Smallint;
function GetSourceTransport(nSourceNum: Smallint): WideString;
function GetWantErrors: WordBool;
procedure SetWantErrors(bVal: WordBool);
function GetShuffle: WordBool;
procedure SetShuffle(bVal: WordBool);
function GetVersionInfo: WideString;
function GetLastMessage: WideString;
function GetLastErrorSeverity: Integer;
function GetLastErrorRMACode: Integer;
function GetLastErrorUserCode: Integer;
function GetLastErrorUserString: WideString;
function GetLastErrorMoreInfoURL: WideString;
procedure SetPreFetch(bVal: WordBool);
function GetPreFetch: WordBool;
procedure SetRegion(const pVal: WideString);
function GetRegion: WideString;
function GetIsPlus: WordBool;
function GetConsoleEvents: WordBool;
procedure SetConsoleEvents(bVal: WordBool);
function GetDRMInfo(const pVal: WideString): WideString;
property ControlInterface: IRealAudio read GetControlInterface;
property DefaultInterface: IRealAudio read GetControlInterface;

Guide to using WMP video control in web pages

□Playing methods and properties
In addition to playing, pausing, and stopping, the media player also has the following properties:
Scanning—similar to the fast forward and fast inversion function of the video recorder;
Searching - Move directly to the specific stage time marked in the clip;

□Play
Media player provides two techniques to specify the media name (clip) to be played. You can set the FileName property, or call the Open method. If the value of the AutoStart property is true, the movie clip will start playing when the FileName property is set to the URL of the movie clip; otherwise the movie clip will not start playing unless you call the Play method. The Open method starts playing asynchronously, unlike the Play method, which does not start playing until other processes are finished.
The media player provides the following VCR-like properties and methods to control streaming media playback:
Play, Stop, Pause methods to start, stop, and pause streaming.
PlayCount property, sets the number of times the file is played.
AutoRewind property, determines whether to return to the beginning of the movie clip when the playback is stopped.

□Audio control
The media player provides the following properties to manage audio:
Balance attribute, determines the sound balance between left and right speakers;
Volume attribute, used to increase or decrease the volume;
Mute property, used to turn off or turn on sound;
※You can set the ShowAudioControls property to true to add controls to the control bar to process sounds.

□Scan
The media player provides the following properties for scanning:
FastForward method, fast forward;
FastReverse method, quickly turn it down;
Rate attribute, change the playback rate;
※To make movie clips scanned, the CanScan and AllowScan properties must be set to true.

□Search
The attributes used for search are:
MarkerCount property, refers to the total number of markers in the clip;
CurrentMaker, GetMarkerName, GetMarkerTime methods are used to return tag information;
MarkerHit event, triggered when a marker is encountered;
CurrentPosition property, the current position (measured in seconds), can be used to move the playhead to the specified point in the clip;
PositionChange event, triggered when the CurrentPosition property is set;
※To search for any time, the CanSeek attribute must be set to true. To search for marking points, the CanSeekToMarkers attribute must be set to true.

□Appearance interface of media player
In a web page, you can control which parts of the media player appear and which parts do not appear through relevant properties.
The media player includes the following elements:
Video Display Panel: Video Display Panel;
Video Border: Video border;
Closed Captioning Display Panel; subtitle display panel;
Track Bar; Search Bar;
Control Bar with Audio and Position Controls: Control bar with sound and position control;
Go To Bar: Go to the bar;
Display Panel: Display panel;
Status Bar: Status Bar;
The following attributes are used to determine which element to display:
ShowControls property: Whether to display the control bar (including playback controls and optional sound and position controls);
ShowAudioControls Properties: Whether to display sound controls (mute buttons and volume sliders) in the control bar;
ShowPositionControls property: Whether to display position controls in the control bar (including jump backward, rewind, fast forward, jump forward, preview each clip in the playlist);
ShowTracker property: Whether to display the search bar;
ShowDisplay attribute: Whether to display the display panel (used to provide information about programs and clips);
ShowCaptioning property: Whether to display the subtitle display panel;
ShowGotoBar property: whether to display Go to the bar;
ShowStatusBar property: Whether to display the status bar;

□Play list
The media player provides the following methods to access clips in a playlist:
Next method, skip to the next clip in the show (playlist);
Previous method, jump back to the previous clip in the show;
A feature of the media player is that it can preview every clip in the program, using the following properties:
PreviewMode property determines whether the media player is currently in preview mode;
CanPreview attribute determines whether the media player can be in preview mode;
In the windows media metafile, you can specify a preview time - PREVIEWDURATION for each clip. If not specified, the default preview time is 10 seconds.
You can also use Windows media metafiles to add watermarks and banners, and the metafiles also support gapless stream switching when inserting ads.

□Program information
Use the GetMediaInfoString method to return the following information about the relevant clip or program:
File name: File name
Title
Description: Description
Author: Author
Copyright: Copyright
Level: Rating
URLs: address of logo icon, watermark, banner
Clip information can be placed in media files, in Windows media metafiles, or both. If clip information is specified in the metafile, the information in the metafile is returned by the GetMediaInfoString method, and the information contained in the clip will not be returned.
In metafiles, additional information can be placed in the PARAM tag of each clip or program. You can add as many PARAM tags to each clip to store custom information or link to related sites. Information in the PARAM tag can be accessed through the GetMediaParameter method.
The following properties return information about size and time:
ImageSourceHeight, ImageSourceWidth: Returns the display size of the image window;
Duration property, returns the length of the clip (seconds). To check whether this property contains a valid value, check the IsDurationValid property. (For broadcast videos, the length is unpredictable).

□Subtitles
You can use the .smi file to add subtitles to your show. The media player supports the following properties to handle subtitles:
SAMIFileName property, specifying the name of the .smi file;
SAMILang property, specifying the language for the subtitles (if not specified, the first language is used);
SAMIStyle property, specifying the text size and style of the subtitles;
ShowCaptioning property, determines whether to display the subtitle display panel;

□Script command
With audio and video streams, you can add script commands to the streaming media file. Script commands are multiple pairs of Unicode strings in a multimedia stream that are synchronized with a specific time. The first string identifies the type of command to be sent, and the second string specifies the command to be executed.
When the stream is played to a script-related time, the control sends a ScriptCommand event to the web page, and the event handler responds to the event. The script command string is passed to the event handler as a parameter to the script command event.
The media player will automatically process the following types of embedded script commands:
1) URL type command: When the media player control receives a URL type command, the specified URL will be loaded into the user's default browser. If the media player is embedded in a framed HTML file, the URL page can be loaded into the frame specified by the script command. If the script command does not specify a frame, the DefaultFrame property will determine which frame the URL page will be loaded.
You can decide whether to automatically process URL-type script commands by setting the InvokeURLs property. If the value of this property is false , the media player control ignores the URL-type command. But script command events still fire, which allows you to selectively handle URL-type commands.
The URL type command specifies the relative address of the URL. The base address is specified by the BaseURL attribute. The command parameters of the script command event transmitted by the media player control are the linking address.
2) FILENAME type command: When the media player control receives a FILENAME type command, it sets the FileName property to the file provided by the script command, and the media player will open the file and start playing. Media player controls always process FILENAME type commands automatically, unlike URL type commands, they cannot be prohibited.
3) TEXT type command: When the media player control receives a TEXT type command, it will display the content of the command in the control's subtitle window. The content can be plain text or HTML.
4) EVENT type command: When the media player control receives an EVENT type command, it will search the media metafile for the NAME attribute of the EVENT element. If the NAME attribute matches the second string in the script command, the media player control executes the entry contained in the EVENT element.
5) OPENEVENT type command: When the media player control receives an OPENEVENT type command, it checks the EVENT element in the media metafile and opens the matching title, but does not play until it receives a real event of the same name from the EVENT type command.

□Capture keyboard and mouse events
The EnableContextMenu and ClickToPlay properties provide users with a method to operate in the image window.
If the EnableContextMenu property is true, right-clicking the mouse in the image window can open the context menu. If the ClickToPlay property is set to true, the user can click the image window to switch between playback and pause.
To receive mouse movement and click events, set the SendMouseMoveEvents and SendMouseClickEvents properties to true . Mouse events include:
MouseDown, generated when the user presses the mouse;
MouseUp, generated when the user releases the mouse;
MouseMove, generated when the user moves the mouse;
Click, generated when the user clicks the mouse button on the media player;
DbClick, generated when the user double-clicks the mouse button on the media player;
To receive keyboard events, set the SendKeyboardEvents property to true . Keyboard events include:
KeyDown, generated when the user presses a key;
KeyUp, generated when the user releases a key;
KeyPress, generated when the user presses and releases a key;

□ Monitor flow status and network links
Flow state properties include:
PlayState: playback status;
OpenState: Open status;
Bandwidth: bandwidth;
Supported events are:
OpenStateChange: Open state change (fired only if the SendOpenStateChangeEvents property is true)
PlayStateChange: Play status changes (only triggered when the SendPlayStateChangeEvents property is true)
EndOfStream: Triggered at the end of the stream;
NewStream: Triggered when opening a new stream;
Network reception attributes include:
ReceptionQuality: Receive quality;
ReceivedPackets: packages that have been received;
LostPackets: Lost packages;
The properties of monitoring buffers are:
BufferingTime: Buffering time;
BufferingCount: the number of buffers;
BufferingProgress: buffering process;
Buffering: buffering events;

□Error handling
Media players provide built-in error handling capabilities—display error messages in the dialog box or status bar. Also, you can add an error handler yourself. If the SendErrorEvents property is set to true, an error box will not be displayed, but an error event will be sent; if the SendErrorEvents property is set to false, an error box will be displayed, but an error event will be sent.
The media player supports the following error handling events:
Error Event, refers to a dangerous error;
Warning incident refers to a non-risk error;
When your application receives an error event, you can detect the following properties to determine the specific error message:
HasError: Detect the current media player for errors;
ErrorCode: Provides code values ​​related to errors in this type;
ErrorDescription: Provides error description information;
ErrorCorrection: Specifies that the media player corrects this type of error;

□Play CD
The media player treats the CD as a single audio stream (with markers at the beginning of each track). To use CDs in web pages, you need to set the FileName property to CDAUDI, which must be with a colon as shown below:
<HTML>
<HEAD><TITLE>CD Audio Playback Example</TITLE></HEAD>
<BODY>
<OBJECT ID="MediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
WIDTH="320"
HEIGHT="508"
STYLE="position:absolute; left:0px; top:70px;" >
<PARAM NAME="FileName" VALUE="cdaudi">
<PARAM NAME="AutoStart" VALUE="0">
<PARAM NAME="ShowControls" VALUE="1">
<PARAM NAME="ShowStatusBar" VALUE="1">
<PARAM NAME="ShowDisplay" VALUE="1">
</OBJECT>
</BODY>
</HTML>
After that, you can use the Play method to play the CD.
You can specify the playback order and information for each track in the Windows media metafile. Examples are as follows:

<ASX VERSION="3.0">
<TITLE>CD Audio with the Media Player</TITLE>
<AUTHOR>Windows Media Technologies</AUTHOR>
<COPYRIGHT>(c) 1999, Microsoft, Inc.</COPYRIGHT>

<ENTRY>
<TITLE>Track 1: Title 1</TITLE>
<REF href="/blog/cdaudi" />
<STARTMARKER NUMBER="1"/>
<ENDMARKER NUMBER="2"/>
</ENTRY>

<ENTRY>
<TITLE>Track 2: Title 2</TITLE>
<REF href="/blog/cdaudi" />
<STARTMARKER NUMBER="2"/>
<ENDMARKER NUMBER="3"/>
</ENTRY>

<ENTRY>
<TITLE>Track 3: Title 3</TITLE>
<REF href="/blog/cdaudi" />
<STARTMARKER NUMBER="3"/>
<ENDMARKER NUMBER="4"/>
</ENTRY>

<ENTRY>
<TITLE>Track 4: Title 4</TITLE>
<REF href="/blog/cdaudi" />
<STARTMARKER NUMBER="4"/>
</ENTRY>
</ASX>



1. How to paste rm, ra, ram type music, the code is as follows:
<embed width="0" height="0" type="audio/x-pn-realaudio-plugin" autostart="true" controls="ControlPanel" src="/uploads/";>

2. How to paste music of midi, asf, wma, asx, the code is as follows:
<embed autostart="true" loop="-1" controls="ControlPanel" width="0" height="0" src="/uploads/";>

3.<bgsound src="Your Song Address" loop="-1">

You only need to copy the entire code into the article (please use HTML code mode when editing the article, otherwise the code will be displayed in text form and cannot be executed), and use the URL of your favorite music file to replace the above music address code. Note that if the music is too large, it may cause the browser to stop responding if it is serious. Therefore, if you want to play background music, please do not use large files.

The URL of a music file refers to the URL of the music file.
The way to get the URL is to move the mouse to the link music name and right-click -> Copy shortcut, and then press CTRL+C to the URL where you want to add the music file (paste the previously copied address).

There are two errors in this case where you cannot listen to music normally after adding background music:
1. The music address is wrong, and the URL ending at html is mistakenly regarded as the address of the music.
2. The music file is too large and it takes a long time to play.


<embed height=26 src=http://song./5musicreall/2003_ydzh/emhj/ type=audio/x-pn-realaudio-plugin width=120 controls="StatusField" autostart="true"
Add music code. This code is music added to RM format. It is recommended to use this code, which is relatively fast.
<bgsound src='???' loop=true>This code is the fastest among all music. It is recommended to consider using this code/when using it first, change the question mark part to the music address. TRUE can be changed to Arabic numerals. Used to control the number of times the music is played.
<embed src=?? width=240 high=180>This code is to insert the FLASH screen. The digital part can adjust the screen size
<script language="JavaScript" src="http://danlovesary./music/"></script>

Common properties and methods of windows mediaplayer control

The windows mediaplayer control is often used when we program, but there are many properties and methods but I don’t know how to use it. Now, take the wmp 9.0 control as an example to talk about its commonly used properties and methods in Delphi 7.0 (the usage in JavaScript is almost exactly the same).

Assume that this control is named wmp

Property/Method Name: Description:
[Basic attributes]
URL:String; Specify media location, local or network address
uiMode:String; Player interface mode, can be Full, Mini, None, Invisible
playState:integer; play status, 1=stop, 2=pause, 3=play, 6=buffering, 9=connecting, 10=ready
enableContextMenu:Boolean; enable/disable the right-click menu
fullScreen:boolean; whether to display full screen
[controls] // Basic control of the player
; Play
; pause
; stop
:double; current progress
:string; Current progress, string format. As in "00:23"
; fast forward
; Retreat quickly
; Next song
; Previous song
[settings] //Basic Player settings
:integer; volume, 0-100
:Boolean; Whether to play automatically
:Boolean; whether to mute
:integer; Number of plays
[currentMedia] //Current Media Properties
:double; total media length
:string; Total media length, string format. As in "03:24"
(const string); Get current media information "Title"=media title, "Author"=artist, "Copyright"=Copyright information, "Description"=media content description, "Duration"=duration (seconds), "FileSize"=file size, "FileType"=file type, "sourceURL"=original address
(const string); Set media information by property name
:string; same as ("Title")
[currentPlaylist] //Current playlist attribute
:integer; The number of media contained in the current playlist
[integer]; Get or set the specified project media information, and its sub-attributes are the same

There are almost so many commonly used ones. For all information, please refer to the Windows Media Player 9 SDK documentation.

There is also an attribute: the number of the current media in the current playlist, and I don’t know how to get it. I hope friends who know will leave a message to let me know, thank you.