Embed video code in the webpage

Source: Internet
Author: User

1. Currently, the most common formats are FLV and WMV.

Currently, FLV almost does not need to install software on the client. The browser supports this format. For IIS servers, you need to set it. Tomcat supports FLV without configuration. wmv is very limited by user machines, if Windows Media Player is not installed, it cannot be played.

The page code is as follows:

<Div align = "center">
<Object classid = "CLSID: 22d6f312-b0f6-11d0-94ab-0080c74c7e95" id = "mediaplayer1" width = "550" Height = "465">
<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 = "0">
<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 to 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 = "×. wmv/×. FLV" 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>
</Div>

2. Second, some require rmvb format.

The rmvb format is restricted. If the real play player is not installed on the machine, the video cannot be played. If it is installed, the video cannot be played due to inconsistent decoder.

The Code is as follows:

<Object classid = CLSID: CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA Height = 285 width = 356>
<Param name = "src" value = "*. rmvb">
<Param name = "console" value = "clip1">
<Param name = "controls" value = "imagewindow">
<Param name = "autostart" value = "true">
<Embed src = "*. rmvb "autostart =" true "controls =" imagewindow "console =" clip1 "pluginspage ="/"target =" _ blank "> /"; width = "356" Height = "285">
</Embed>
</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.