Play mp3 or flash player code on the web page

Play mp3 or flash player code on the web page

Copy code
The code is as follows:

<object id="player1" type="application/x-oleobject" height="360" width="300" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param NAME="AutoStart" VALUE="-1"> <!--Whether to play automatically-->
<param NAME="url" value="D:\FireAlarm.mp3"> <!--Play file address-->
<param NAME="PlayCount" VALUE="1">
</object>
<img src="1.jpg" onclick="player1.controls.play();" alt="play" style="cursor:hand">
<img src="1.jpg" onclick="player1.controls.pause();" alt="Pause" style="cursor:hand">
<img src="1.jpg" onclick="player1.controls.Stop();" alt="Stop" style="cursor:hand">
<img src="1.jpg" onclick="javascript:if(player1.playState==3)wmp.fullScreen=true;" alt="full screen"
style="cursor:hand">
<img src="1.jpg" onclick="player1.settings.mute = !player1.settings.mute;" alt="Mute"
style="cursor:hand">

Appendix 1:
Control the player controls
Media player control <br />Corresponding controls

Copy code
The code is as follows:

<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
player.URL = url; Set the file source
player.controls.play(); Play
player.controls.stop(); Stop
player.controls.pause(); Pause
player.controls.currentPosition returns the current time position of the playing file (in seconds)
player.controls.currentPositionString A string in the time format "0:32"
player.currentMedia.duration returns the total length of the playing file (in seconds)
player.currentMedia.durationString A string in the time format "4:34"
player.settings.volume volume (0-100)
player.settings.balance channel, through which you can control stereo, left channel, and right channel. However, the corresponding value is still unclear.
player.settings.mute = s mute (s value is true and false)
player.closedCaption.CaptioningID The ID of the container where the subtitles appear on the web page
player.closedCaption.SAMIFileName subtitle file address
player.playState returns the player state (3: playing, 2: paused, 1: stopped)
player.fullscreen=1 Play in full screen (press ESC to return after full screen)

======================================================
REAL PLAYER control <br />Corresponding controls

Copy code
The code is as follows:

<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"
player.DoPlay() plays
player.DoPause() Pause
player.DoStop()
player.GetLength() Returns the total length of the played file (in milliseconds)
player.GetPosition() Returns the current time position of the playing file (in milliseconds)
player.GetPlayState() returns the player status (0: Stop, 1: Connect, 2: Buffer, 3: Play, 4: Pause, 5: Seek)
player.SetPosition(n) The time position jumps to n (n is in milliseconds)
player.SetVolume(n) sets the volume (n is between 0 and 100)
player.SetMute(s) Mute (s can be true or false)
player.SetFullScreen() Full screen (press ESC to return after full screen)
player.setSource() Set the file source

Appendix 2:
param name tag part (player code)

Copy code
The code is as follows:

<param name="playcount" value="1"><!--Control the number of repetitions: "x" is the number of repetitions; x=0, infinite loop. -->
<param name="autostart" value="0"><!--Control the playback mode: x=1, open the web page and play automatically; x=0, press the play button to play. -->
<param name="clicktoplay" value="1"><!--Control the play switch: x=1, you can click the mouse to control the play or pause state; x=0, disable this function. -->
<param name="displaysize" value="0"><!--Control the playback screen: x=0, original size; x=1, half size; x=2, twice the size. -->
<param name="enablefullscreen controls" value="1"><!--Control switching full screen: x=1, allow switching to full screen; x=0, disable this function. -->
<param name="showaudio controls" value="1"><!--Control volume: x=1, allow volume adjustment; x=0, prohibit volume adjustment. -->
<param name="enablecontext menu" value="1"><!--Control shortcut menu: x=1, allow the right-click menu; x=0, disable the right-click menu. -->
<param name="showdisplay" value="1"><!--Control copyright information: x=1, display movie and author information; x=0, do not display related information-->
<param NAME="AutoStart" VALUE="-1"><!--Whether to play automatically-->
<param NAME="Balance" VALUE="0"><!--Adjust the balance of left and right channels, same as the old player code above-->
<param name="enabled" value="-1"><!--Whether the player can be manually controlled-->
<param NAME="EnableContextMenu" VALUE="-1"><!--Whether to enable the context menu-->
<param NAME="url" VALUE="http://1.wma"> <!--Play file address--><param NAME="PlayCount" VALUE="1"><!--Play count control, 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 position-->
<param name="currentMarker" value="0"><!--Control settings: current marker-->
<param name="defaultFrame" value=""><!--Show the default frame-->
<param name="invokeURLs" value="0"><!--Script command setting: whether to call URL-->
<param name="baseURL" value=""><!--Script command setting: the URL to be called-->
<param name="stretchToFit" value="0"><!--Whether to stretch in proportion-->
<param name="volume" value="50"><!--The default sound volume is 0%-100%, 50 means 50%-->
<param name="mute" value="0"><!--Whether to mute--
<param name="uiMode" value="mini"><!--Player display mode: Full displays all; mini is the simplest; None does not display playback controls, only displays the video window; invisible does not display anything--><param name="windowlessVideo" value="0"><!--If it is 0, full screen is allowed, otherwise it can only be viewed in the window-->
<param name="fullScreen" value="0"><!--Whether to automatically start full screen playback-->
<param name="enableErrorDialogs" value="-1"><!--Whether to enable error prompt reporting-->
<param name="SAMIStyle" value><!--SAMI style-->
<param name="SAMIFilename" value><!--Subtitle ID-->

Insert rm format video :

Copy code
The code is as follows:

<object id="player" name="player" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="339" height="227">
<param name="_ExtentX" value="9869">
<param name="_ExtentY" value="7726">
<param name="AUTOSTART" value="-1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="-1">
<param name="SRC" value="http://entdown.163.com/ent/garbage/mv/1028/xuemv.rm">
<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>

1.avi format

Copy code
The code is as follows:

<object classid=CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95
codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab
#Version=5,1,52,701 height=180 id=NSPlay type=application/x-oleobject width=240
VIEWASTEXT standby="Loading Microsoft Windows Media Player components..."">
<param name="FileName" value="">
<param name="AutoStart" value="true">
<param name="AutoRewind" value="-1">
<param name="AnimationAtStart" value="false">
<param name="ShowControls" value="false">
<param name="ClickToPlay" value="false">
<param name="EnableContextMenu" value="true">
<param name="EnablePositionControls" value="false">
<param name="Balance" value="0">
<param name="ShowStatusBar" value="false">
<param name="AutoSize" value="0">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
filename src
enablecontextmenu="false"
clicktoplay="false"
enablepositioncontrols="false"
showcontrols="0" showstatusbar="1"
showdisplay="0" width="240" height="180">
</embed>
</object>

or

Copy code
The code is as follows:

<object id="video" width="400" height="200" border="0"
classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<param name="ShowDisplay" value="0">
<param name="ShowControls" value="1">
<param name="AutoStart" value="1">
<param name="AutoRewind" value="0">
<param name="PlayCount" value="0">
<param name="Appearance value="0 value=""">
<param name="BorderStyle value="0 value=""">
<param name="MovieWindowHeight" value="240">
<param name="MovieWindowWidth" value="320">
<param name="FileName" value="file:///D|/work/vod/Mbar.avi">
<embed width="400" height="200" border="0" showdisplay="0" showcontrols="1"
playcount="0" moviewindowheight="240" moviewindowwidth="320"
filename="file:///D|/work/vod/Mbar.avi" src="Mbar.avi">
</embed>
</object>

2.mpg format

Copy code
The code is as follows:

<object classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" id="ActiveMovie1"
width="239" height="250">
<param name="Appearance" value="0">
<param name="AutoStart" value="-1">
<param name="AllowChangeDisplayMode" value="-1">
<param name="AllowHideDisplay" value="0">
<param name="AllowHideControls" value="-1">
<param name="AutoRewind" value="-1">
<param name="Balance" value="0">
<param name="CurrentPosition" value="0">
<param name="DisplayBackColor" value="0">
<param name="DisplayForeColor" value="16777215">
<param name="DisplayMode" value="0">
<param name="Enabled" value="-1">
<param name="EnableContextMenu" value="-1">
<param name="EnablePositionControls" value="-1">
<param name="EnableSelectionControls" value="0">
<param name="EnableTracker" value="-1">
<param name="Filename" value="http://www.cnblogs.com/../mpeg/halali.mpg" valuetype="ref">
<param name="FullScreenMode" value="0">
<param name="MovieWindowSize" value="0">
<param name="PlayCount" value="1">
<param name="Rate" value="1">
<param name="SelectionStart" value="-1">
<param name="SelectionEnd" value="-1">
<param name="ShowControls" value="-1">
<param name="ShowDisplay" value="-1">
<param name="ShowPositionControls" value="0">
<param name="ShowTracker" value="-1">
<param name="Volume" value="-480">
</object>

3.smi format

Copy code
The code is as follows:

<OBJECT id=RVOCX classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA width=240
height=180>
<param name="_ExtentX" value="6350">
<param name="_ExtentY" value="4763">
<param name="AUTOSTART" value="-1">
<param name="SHUFFLE" value="0">
<param name="PREFETCH" value="0">
<param name="NOLABELS" value="-1">
<param name="SRC" value="rm.rm">
<param name="CONTROLS" value="ImageWindow">
<param name="CONSOLE" value="console1">
<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"><embed src="real.smi"
type="audio/x-pn-realaudio-plugin" console="Console1" controls="ImageWindow"
height="180" width="240" ></OBJECT>

5.wmv format

Copy code
The code is as follows:

<object id="NSPlay" width=200 height=180
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab
#Version=6,4,5,715"
standby="Loading Microsoft Windows Media Player components…"
type="application/x-oleobject" align="right" hspace="5">
<!- ​​ASX File Name ->
<param name="AutoRewind" value=1>
<param name="FileName" value="xxxxxx.wmv">
<!- ​​Display Controls ->
<param name="ShowControls" value="1">
<!- ​​Display Position Controls -> This parameter is used to determine whether to display the playback progress bar control
<param name="ShowPositionControls" value="0">
<!- ​​Display Audio Controls -> This parameter is used to define whether to display the volume control button
<param name="ShowAudioControls" value="1">
<!- ​​Display Tracker Controls -> This parameter is used to define whether the channel can be controlled
<param name="ShowTracker" value="0">
<!- ​​Show Display ->
<param name="ShowDisplay" value="0">
<!- ​​Display Status Bar -> This parameter is used to define whether to display the playback status bar
<param name="ShowStatusBar" value="0">
<!- ​​Play Go To Bar ->
<param name="ShowGotoBar" value="0">
<!- ​​Display Controls -> This parameter is used to define whether to display the control panel
<param name="ShowCaptioning" value="0">
<!- ​​Player Autostart -> This parameter is used to define whether to play automatically
<param name="AutoStart" value=1>
<!- ​​Animation at Start ->
<param name="Volume" value="-2500">
<param name="AnimationAtStart" value="0">
<!- ​​Transparent at Start -> This parameter is used to define the transparency of the video file
<param name="TransparentAtStart" value="0">
<!- ​​Do not allow a change in display size ->
<param name="AllowChangeDisplaySize" value="0">
<!- ​​Do not allow scanning -> This parameter is used to define whether to allow dragging the progress bar
<param name="AllowScan" value="0">
<!- ​​Do not show contect menu on right mouse click -> This parameter is used to define whether to allow right click in the video playback area
<param name="EnableContextMenu" value="0">
<!- ​​Do not allow playback toggling on mouse click ->
<param name="ClickToPlay value="0">
</object>

<<:  Ideas and codes for implementing iframe to intercept part of the website content

>>:  Json string + Cookie + localstorage in JS

Recommend

Pure CSS to achieve cool neon light effect (with demo)

I have recently been following the CSS Animation ...

Solution to the problem of slow docker pull image speed

Currently, Docker has an official mirror for Chin...

Detailed usage of kubernetes object Volume

Overview Volume is the abstraction and virtualiza...

Mysql accidental deletion of data solution and kill statement principle

mysql accidentally deleted data Using the delete ...

Detailed analysis of MySQL optimization of like and = performance

introduction Most people who have used databases ...

Introduction to the B-Tree Insertion Process

In the previous article https://www.jb51.net/arti...

Installation and use of Ubuntu 18.04 Server version (picture and text)

1 System Installation Steps OS Version:1804 Image...

Shell script settings to prevent brute force ssh

The shell script sets access control, and the IP ...

Detailed explanation of table return and index coverage examples in MySQL

Table of contents Index Type Index structure Nonc...

UDP DUP timeout UPD port status detection code example

I have written an example before, a simple UDP se...

The whole process of implementing the summary pop-up window with Vue+Element UI

Scenario: An inspection document has n inspection...

Things to note when writing self-closing XHTML tags

The img tag in XHTML is so-called self-closing, w...

Code comment writing standards during web page production

<br />I have summarized the annotation writi...

Automated front-end deployment based on Docker, Nginx and Jenkins

Table of contents Preliminary preparation Deploym...