Code and parameters of the HTML Video Player

Source: Internet
Author: User
PS :( the original http://www.wangjoy.com/article.asp? Id = 242) It is very practical to find it on a friend's blog!
The most practical code for playing a video is the program code <object classid = "CLSID: 6bf52a52-394a-11d3-b153-00c04f79faa6 "width =" 500 "Height =" 400 "> <Param name =" autostart "value =" 0 "/> <Param name =" url "value =" video address. WMV "/> <embed src =" video address. WMV "autostart =" 0 "type =" Video/X-MS-WMV "width =" 500 "Height =" 400 "> </embed> </Object>

Modify the parameters for others.

1. AVI format
The code snippet is as follows: program code <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 = "movie1_wwidth" value = "320">
<Param name = "FILENAME" value = "/mbar. Avi">
<Embed width = "400" Height = "200" border = "0" showdisplay = "0" showcontrols = "1" autostart = "1" autorewind = "0" playcount =" 0 "moviedomainwheight =" 240 "moviedomainwwidth =" 320 "filename ="/mbar. avi "src =" mbar. avi ">
</Embed>
</Object>

2. mpg format
The code snippet is as follows: program code <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 = "/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>

4. rm format
The code snippet is as follows: program code <Object ID = video1 classid = "CLSID: CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" Height = 288 width = 352>
<Param name = "_ extentx" value = "9313">
<Param name = "_ extenty" value = "7620">
<Param name = "autostart" value = "0">
<Param name = "Shuffle" value = "0">
<Param name = "prefetch" value = "0">
<Param name = "nolabels" value = "0">
<Param name = "src" value = "rtsp: // 203. *. *. 35/VOD/dawan-a.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"> <embed SRC type = "audio/X-PN-RealAudio-plugin" console = "clip1" controls = "imagewindow" height = "288" width = "352" autostart = "false">
</Object>

5. WMV Format
The code snippet is as follows: the program code <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 ">
<Param name = "autorewind" value = 1>
<Param name = "FILENAME" value = "/blog/******. wmv">
<Param name = "showcontrols" value = "1">
<Param name = "showpositioncontrols" value = "0">
<Param name = "showaudiocontrols" value = "1">
<Param name = "showtracker" value = "0">
<Param name = "showdisplay" value = "0">
<Param name = "showstatusbar" value = "0">
<Param name = "showgotobar" value = "0">
<Param name = "showcaptioning" value = "0">
<Param name = "autostart" value = 1>
<Param name = "volume" value = "-2500">
<Param name = "animationatstart" value = "0">
<Param name = "transparentatstart" value = "0">
<Param name = "allowchangedisplaysize" value = "0">
<Param name = "allowscan" value = "0">
<Param name = "enablecontextmenu" value = "0">
<Param name = "clicktoplay" value = "0">
</Object>

6.wma format
In <body>. Some explanations are as follows:
<Object classid = "CLSID: 22d6f312-b0f6-11d0-94ab-0080c74c7e95" id = "mediaplayer1">
<Param name = "FILENAME" value = "/blog/1.wma"> <! -- Location of your file -->
<Param name = "playcount" value = "1"> <! -- Control repeated times: "X" indicates the number of repeated playback times. x = 0 indicates an infinite loop. -->
<Param name = "autostart" value = "0"> <! -- Control the playback mode: x = 1. Enable automatic playback on the webpage; X = 0. Press the seek key to play the video. -->
<Param name = "clicktoplay" value = "1"> <! -- Control the playback switch: x = 1. You can click to control the playback or pause status. x = 0 to disable this function. -->
<Param name = "displaysize" value = "0"> <! -- Control the playback screen size: x = 0, original size; X = 1, half size; X = 2, 2 times 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"> <! -- Volume Control: x = 1. Allow volume adjustment; X = 0. Disable volume adjustment. -->
<Param name = "enablecontext menu" value = "1"> <! -- Shortcut menu: x = 1. Right-click menu is allowed; X = 0. Right-click menu is disabled. -->
<Param name = "showdisplay" value = "1"> <! -- Control copyright information: x = 1. The information about the movie and the author is displayed. x = 0. No relevant information is displayed. -->
</Object>

7. Windows Media Player series (different panel styles)
Integrated: program code <object classid = CLSID: 22d6f312-b0f6-11d0-94ab-0080c74c7e95 codebase = "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,1,5,217"
Id = mediaplayer type = application/X-oleobject width = 210 Height = 340 standby = "loading Microsoft Windows Media Player components..." viewastext align = center>
<Param name = audiostream value =-1>
<Param name = autosize value = 0>
<Param name = autostart value = 1>
<Param name = animationatstart value = 0>
<Param name = allowscan value =-1>
<Param name = allowchangedisplaysize value = 0>
<Param name = autorewind value = 0>
<Param name = balance value = 0>
<Param name = baseurl value = "">
<Param name = bufferingtime value = 5>
<Param name = captioningid value = "">
<Param name = clicktoplay value = 0>
& Lt; Param name = cursortype value = 32512 & gt;
<Param name = currentposition value =-1>
<Param name = currentmarker value = 0>
<Param name = defaultframe value = 1>
<Param name = displaybackcolor value = 0>
<Param name = displayforecolor value = 16777215>
<Param name = displaymode value = 0>
<Param name = displaysize value = 0>
<Param name = Enabled value =-1>
<Param name = enablecontextmenu value =-1>
<Param name = enablepositioncontrols value = 0>
<Param name = enablefullscreencontrols value = 0>
<Param name = enabletracker value = 1>
<Param name = filename value = "http: // 202.102./*. */flash/2/fff.swf">
<Param name = invokeurls value =-1>
<Param name = language value =-1>
<Param name = mute value = 0>
<Param name = playcount value = 1>
<Param name = previewmode value = 0>
<Param name = rate value = 1>
<Param name = samilang value = "">
<Param name = samistyle value = "">
<Param name = samifilename value = "">
<Param name = selectionstart value = 0>
<Param name = selectionend value = true>
<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>
<Param name = showcontrols value = 1>
<Param name = showaudiocontrols value = 1>
<Param name = showdisplay value = 1>
<Param name = showgotobar value = 1>
<Param name = showpositioncontrols value = 1>
<Param name = showstatusbar value = 1>
<Param name = showtracker value = 1>
<Param name = transparentatstart value = 0>
<Param name = videoborderwidth value = 0>
<Param name = videobordercolor value = 0>
<Param name = videoborder3d value = 0>
<Param name = volume value =-1070>
<Param name = windowlessvideo value = 1>
</Object>

Parameter meanings of Web player Windows Media Player web player

(The default value 0 indicates no.-1 or 1 indicates 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">
<! -- Whether to automatically adjust the playback size -->
<Param name = "autostart" value = "-1">
<! -- Automatic playback? -->
<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-right channel balance, leftmost-9640, rightmost 9640 -->
<Param name = "baseurl" value>
<Param name = "bufferingtime" value = "15">
<! -- Buffer 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 indicates that the playback progress remains unchanged. 0 indicates that the start unit is seconds. For example, 10 indicates that the playback starts from 10th seconds. 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 for 0 processing, decimal rounding, and then processing by the front -->
<Param name = "enabled" value = "-1">
<Param name = "enablecontextmenu" value = "-1">
<! -Right-click the menu and choose Menu Control>
<Param name = "enablepositioncontrols" value = "-1">
<Param name = "enablefullscreencontrols" value = "-1">
<Param name = "enabletracker" value = "-1">
<! -- Whether to allow pulling the playback progress bar to play anywhere -->
<Param name = "FILENAME" value = "/blog/01.wma" valuetype =" Ref ">
<! -- Playback file address -->
<Param name = "invokeurls" value = "-1">
<Param name = "language" value = "-1">
<Param name = "mute" value = "0">
<! -- Mute or not -->
<Param name = "playcount" value = "10">
<! -- Indicates the number of replay times. If the value is 0, it indicates the number of replay times. -->
<Param name = "previewmode" value = "-1">
<Param name = "rate" value = "1">
<! -- Playback speed control. The value 1 indicates 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 piece of black, and there will be a large piece of black below, which is generally not displayed -->
<Param name = "showcontrols" value = "-1">
<! -- Display control, such as playing, stopping, and pausing -->
<Param name = "showaudiocontrols" value = "-1">
<! -- Display volume control -->
<Param name = "showdisplay" value = "0">
<! -- Display program information, such as copyright -->
<Param name = "showgotobar" value = "0">
<! -- Enable context menu -->
<Param name = "showpositioncontrols" value = "-1">
<! -- Whether to display forward, backward, and list. If displayed, it is usually gray and uncontrollable. -->
<Param name = "showstatusbar" value = "-1">
<! -- Current playback information, indicating whether the video is being played, total playback time, and current playback time -->
<Param name = "showtracker" value = "-1">
<! -- Whether to display the current playback trace, that is, the current playback progress bar -->
<Param name = "transparentatstart" value = "-1">
<Param name = "videoborderwidth" value = "0">
<! -- The width of the display part. If the value is smaller than the video width, the minimum value is the video width, or the video width is increased to the specified value and the height is automatically increased. this change only changes the size of the black box around and does not change the video size -->
<Param name = "videobordercolor" value = "0">
<! -- Display the color of the black box, which is an RGB value. For example, FFFF00 is yellow. -->
<Param name = "videoborder3d" value = "0">
<Param name = "volume" value = "0">
<! -- Volume size. A negative value indicates the impairment of the current volume. The value automatically takes the absolute value. The maximum value is 0 and the minimum value is-9640. -->
<Param name = "windowlessvideo" value = "0">
<! -- If it is 0, full screen is allowed; otherwise, it can only be viewed in the window -->
</Object>

The above player is old-fashioned, version 6.4! The new player appeared after mediaplayer9.0. That is to say, it can be used normally only when 9.0 or more players are installed.

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

The following is the new player code, which is much simpler than before:
<Object ID = "Player" Height = "64" width = "260" classid = "CLSID: 6bf52a52-394a-11d3-b153-00c04f79faa6">
<Param name = "autostart" value = "-1">
<! -- Automatic playback? -->
<Param name = "balance" value = "0">
<! -- Adjust the left-right channel balance and the old player code above -->
<Param name = "enabled" value = "-1">
<! -- Whether the player can be controlled by humans -->
<Param name = "enablecontextmenu" value = "-1">
<! -- Enable context menu -->
<Param name = "url" value = "/blog/1.wma">
<! -- Playback file address -->
<Param name = "playcount" value = "1">
<! -- Control the number of playbacks, which is an integer -->
<Param name = "rate" value = "1">
<! -- The playback speed is controlled. 1 is normal, and decimal places are allowed. -->
<Param name = "currentposition" value = "0">
<! -- Control settings: Current Position -->
<Param name = "currentmarker" value = "0">
<! -- Control settings: Current tag -->
<Param name = "defaultframe" value = "">
<! -- Display default frame -->
<Param name = "invokeurls" value = "0">
<! -- Script command setting: whether to call URL -->
<Param name = "baseurl" value = "">
<! -- Script command setting: called URL -->
<Param name = "stretchtofit" value = "0">
<! -- Scale up or not -->
<Param name = "volume" value = "50">
<! -- The default sound size is 0%-100%, and 50 is 50%. -->
<Param name = "mute" value = "0">
<! -- Mute or not -->
<Param name = "uimode" value = "mini">
<! -- Player display mode: full display all; Mini is the most simplified; none does not show the playback control, only the video window is displayed; invisible does not show all -->
<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 enable automatic full screen playback -->
<Param name = "enableerrordialogs" value = "-1">
<! -- Enable error prompt report -->
<Param name = "samistyle" value>
<! -- Sami style -->
<Param name = "samilang" value>
<! -- Sami language -->
<Param name = "samifilename" value>
<! -- Subtitle id -->
</Object>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.