Detailed explanation of the use of web player Object, for friends who make web player, you can refer to it.
1. Code
<object ID=javademo CLASSID=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA HEIGHT=280 WIDTH=200>
<param name=AUTOSTART value=0>
<param name=SHUFFLE value=0>
<param name=PREFETCH value=0>
<param name=NOLABELS value=0>
<param name=SRC value=yy.wma>
<param name=CONTROLS value=ImageWindow>
<param name=CONSOLE value=Clip1>
<param name=LOOP value=0>
<param name=NUMLOOP value=0>
<param name=CENTER value=0>
<param name=MAINTAINASPECT value=0>
<param name=BACKGROUNDCOLOR value=#000000>
</object>
2. Control instructions
<input type=button value=play onclick=javademo.DoPlay()>
<input type=button value=pause onclick=javademo.DoPause()>
<input type=button value=stop onclick=javademo.DoStop()>
1. REAL PLAYER controls
player.DoPlay() plays
player.DoPause() pause
player.DoStop() stops
player.GetLength() returns the total length of the playback file (in milliseconds)
player.GetPosition() returns the current time position of the playback file (in milliseconds)
player.GetPlayState() returns the player status (0: stop, 1: connection, 2: buffer, 3: play, 4: pause, 5: search) player.SetPosition
(n) time position jumps to the place where n (n takes the value in milliseconds)
player.SetVolume(n) sets the volume (n takes the value from 0 to 100)
player.SetMute(s) mute (s takes the values of true and false)
player.SetFullScreen() full screen
player.setSource() sets the file source
2. media player control
player.controls.play(); play
player.controls.stop(); stop
player.controls.pause(); pause
player.controls.currentPosition returns the current time position of the play file (in seconds)
player.controls.currentPositionString time format string 0:32
player.currentMedia.duration returns the total length of the play file (in seconds)
player.currentMedia.durationString time format string 4:34
player.settings.volume volume (0-100)
player.settings.balance channel, through which you should be able to control stereo, left channel, and right channel. But the corresponding value is not yet clear.
player.settings.mute = s mute (s takes the values true and false)
player.closedCaption.CaptioningID The ID of the container where subtitles appear in the web page
player.closedCaption.SAMIFileName subtitle file address
player.playState returns to the player status (3: playing, 2: pause 1: stopped)
3. Attribute (event) description
all
Show all function menus
controlpanel
Display Control Panel
infovolumepanel
Display sound version
infopanel
Display information page
statusbar
Display status column
playbutton
Show start button
stopbutton
Show stop button
volumeslider
Show sound adjustment button
posititonslider
Display position adjustment button
positionfield
Display location area
statusfield
Display status column
src
Sound source location
autostart
Whether to play automatically
nolabels
Whether to display title , author , and coptright information
autogotourl
Whether to automatically transmit url events
method
Aboutbox
Show about dialog box
canplaypause
Can I pause or replay
canstop
Can you stop realaudio
doplaypause
Set playback or pause
dostop
Stop playing
donextitem
Play the next sound file
doprevitem
Play the previous sound file
editpreferences
Open the set dialog box
hasnextitem
Check if there is the next sound file
hasprevitem
Check if there is a previous sound file
Hideshowstatistics
Set the dialog box to turn on or off the connection statistics
isstatisticsvisible
Check whether the dialog box for connecting statistics is enabled
dogotourl
Load the set realaudio sound file
Event onclipopened
The event triggered when realaudio sound file is enabled onclipclosed
Event triggered when closing realaudio sound file onshowstatus
Event ongotourl triggered when the status column text changes
When playing sound effects, the event triggered when the URL event is encountered
4. Give examples to illustrate that
the default 0 means no, and -1 or 1 means yes
<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 id=MediaPlayer1 width=286 height=225>
<param name=AudioStream value=/-1>
<param name=AutoSize value=-1>
<!--Is the playback size automatically adjusted->
<param name=AutoStart value=-1>
<!--Is the playback size automatically adjusted->
<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>
<!--Left and Right Channel Balance, Left-9640, Right-right 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 the beginning 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-Other values on full screen are processed as 0, and the decimals are rounded and then pressed before processing -->
<param name=Enabled value=-1>
<param name=EnableContextMenu value=-1>
<!-Where to use the right-click pop-up menu to control -->
<param name=EnablePositionControls value=-1>
<param name=EnableFullScreenControls value=-1> <
param name=EnableTracker value=-1>
<!--Where to pull the playback progress bar to play anywhere-> <param name=Filename value=01.wma valuetype=ref> <!--Play file address--> <param name=EnableTracker value=-1> <!--Where to pull the playback progress bar to play anywhere-->
<param name=Filename value=01.wma valuetype=ref>
<!--Played file address-->
<param name=InvokeURLs value=-1>
<param name=Language value=-1>
<param name=Mute value=0>
<!--Musing or not -->
<param name=PlayCount value=10>
<!--Repeat times, 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 to display subtitles, it is a black piece, and there will be a large piece of black below, which is generally not displayed -->
<param name=ShowControls value=-1>
<!--Does display control, such as playback, stop, and pause-->
<param name=ShowAudioControls value=-1>
<!--Does display volume control-->
<param name=ShowDisplay value=0>
<!--Does display program information, such as copyright, etc. -->
<param name=ShowGotoBar value=0>
<!--Does enable context menu-->
<param name=ShowPositionControls value=-1>
<!--Whether to display forward and back and list, if the display is generally gray, it is uncontrollable -->
<param name=ShowStatusBar value=-1>
<!--Current playback information, whether it is playing, 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>
<!--Whether to display the width of the display part, if it is less than the video width, is the minimum video width, or it is increased to the specified value, and the height is automatically increased. This change only changes the size of the surrounding black frame, and does not change the video size-->
<param name=VideoBorderColor value=0>
<!--The color of the black box is displayed, 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, the maximum is 0, and the minimum is -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 above players are 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.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NAME=EnableContextMenu VALUE=-1>
<!--Whether to enable the context menu-->
<param NAME=url VALUE=1.wma>
<!--Playing file address-->
<param NAME=PlayCount VALUE=1>
<!--Playing number control, as integer-->
<param name=rate value=1>
<!--Play rate control, 1 is normal, allow decimals, 1.0-2.0-->
<param name=currentPosition value=0>
<!--Control settings: current position-->
<param name=currentMarker value=0>
<!--Control settings: current mark-->
<param name=defaultFrame value=>
<!--Show the default frame-->
<param name=invokeURLs value=0>
<!--Script command settings: whether to call URL-->
<param name=baseURL value=>
<!--Script command settings: called URL-->
<param name=stretchToFit value=0>
<!--Show to stretch in proportion-->
<param name=volume value=50>
<!--Default sound size 0%-100%, 50%-->
<param name=mute value=0>
<!--Silent-->
<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 all-->
<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>
<!--Start playback automatically full screen -->
<param name=enableErrorDialogs value=-1>
<!--Whether error prompt report is enabled -->
<param name=SAMIStyle value>
<!--SAMI style-->
<param name=SAMILang value>
<!--SAMI language-->
<param name=SAMIFilename value>
<!--Subtitle ID-->
</object>