Home Web Front-end HTML Tutorial Embed codes for several old-fashioned players_HTML/Xhtml_Web page production

Embed codes for several old-fashioned players_HTML/Xhtml_Web page production

May 16, 2016 pm 04:36 PM
Embed player

The players we see on the web are nothing more than WMP/RealPlayer/Flash Player. The others are just different panels or adding other controls. Some players installed on the computer are also encoders and decoders. For integration, the core encoding and decoding technologies are the same. For example: the most popular windows media streams on the Internet (asf, wma, wmv formats), Real streams (rm, rmvb formats), and MPEG series encoding formats (MP4, MP3 formats). The following is a common web player code compiled by admin10000.com


1. Use the Embed tag to play multimedia files
Format <embed src="file name"/>. The file name can be in any multimedia file format. For example, "test.wma" will display a Windows Media Player on the web page (because wma is exclusive to WMP). Another example is "test.rm". Display a Real Player player on the web page. Of course, RealPlayer must be installed on your computer to display it.
In fact, the embed tag can also display Flash animation (the role of the embed tag is similar to that of using the object tag to display Flash animation). Example: <embed src="a.swf">
In short, summarize embed The function of the tag: Play specified multimedia files on the web page.


2. Call Windows Media Player to play
Can be used to play wmv, asf and other format files

XML/HTML CodeCopy content to clipboard
  1. <object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" type="application/x-oleobject" height="200" width="300">  
  2. <param name="filename" value="test.wmv" />  
  3. <param name="autostart" value="false" />  
  4. <param name="showstatusbar" value="true" />  
  5. <param name="showtracker" value="true" />  
  6. <param name="showcontrols" value="true" />  
  7. <embed filename="test.wmv" autostart="false" pluginspage="http://www.microsoft.com/windows/windowsmedia/" showcontrols="true" showstatusbar="true" showtracker="true" src="test.wmv" type="application/x-mplayer2" height="200" width="300"></embed>  
  8. </object>  

The class ID for Windows Media Player 7 and above is: clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6
The class ID in the above example is an old version, but it can still work because Its backward compatibility. But if you use the old class ID, you will not be able to use the new features added to the component.
An example of the new version is given below

CSS CodeCopy content to clipboard
  1. <object classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/ x-oleobject" height="200" width="300">
  2. <param name="url" value="test.wmv" />
  3. <param name="autostart" value="false" />
  4. <param name="showstatusbar" value="true" />
  5. <param name="showtracker" value="true" />
  6. <param name="showcontrols" value="true" />
  7. <param name="uimode" value="full"/>
  8. <embed filename="test.wmv" autostart="false " showcontrols="true" showstatusbar="true" showtracker=" true" uimode="full" src="test.wmv" type="application/x-mplayer2" height="200" width="300"></embed >
  9. </object>


3. Call Real Player to play
Can be used to play rm, ram and other format files

Play box:

XML/HTML CodeCopy content to clipboard
  1. <object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=285 id=RAOCX name=rmplay width=356>  
  2. <param name="SRC" value="影片地址">  
  3. <param name="CONSOLE" value="Clip1">  
  4. <param name="CONTROLS" value="imagewindow">  
  5. <param name="AUTOSTART" value="true">  
  6. <embed src="影片地址" autostart="true" controls="ImageWindow" console="Clip1" pluginspage="http://www.real.com"/’ width="356" height="285">  
  7. </embed>  
  8. </object>  

控制框:可紧跟播放框一起

CSS Code复制内容到剪贴板
  1. <object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=27 id=video1 width=356>   
  2. <param name="_ExtentX" value="7276">   
  3. <param name="_ExtentY" value="1058">   
  4. <param name="AUTOSTART" value="0">   
  5. <param name="SHUFFLE" value="0">   
  6. <param name="PREFETCH" value="0">   
  7. <param name="NOLABELS" value="0">   
  8. <param name="CONTROLS" value="ControlPanel">   
  9. <param name="CONSOLE" value="Clip1">   
  10. <param name="LOOP" value="0">   
  11. <param name="NUMLOOP" value="0">   
  12. <param name="CENTER" value="0">   
  13. <param name="MAINTAINASPECT" value="0">   
  14. <param name="BACKGROUNDCOLOR" value="#ffffff">   
  15. <embed type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ControlPanel" height="27" width="356" autostart="0" _extentx="7276" _extenty="1058" shuffle="0" prefetch="0" nolabels="0" loop="0" numloop="0" center="0" maintainaspect="0" backgroundcolor="#ffffff">   
  16. </embed>   
  17. </object>  
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

VLC Chromecast not working on Windows PC VLC Chromecast not working on Windows PC Mar 26, 2024 am 10:41 AM

VLC Chromecast not working on Windows PC

Combining PHP with HTML: three techniques for embedding code Combining PHP with HTML: three techniques for embedding code Mar 06, 2024 am 08:09 AM

Combining PHP with HTML: three techniques for embedding code

Win10 player progress bar does not move Win10 player progress bar does not move Feb 12, 2024 am 08:12 AM

Win10 player progress bar does not move

How to solve the problem that Win10's built-in player HEVC video extension requires payment? How to solve the problem that Win10's built-in player HEVC video extension requires payment? Feb 09, 2024 pm 02:54 PM

How to solve the problem that Win10's built-in player HEVC video extension requires payment?

What is an iframe embedded player? What is an iframe embedded player? Aug 25, 2023 pm 02:13 PM

What is an iframe embedded player?

How to implement a video player in Vue? How to implement a video player in Vue? Jun 25, 2023 am 09:46 AM

How to implement a video player in Vue?

How to change the player background of Kugou Concept Edition and how to set the player background How to change the player background of Kugou Concept Edition and how to set the player background Mar 12, 2024 pm 12:00 PM

How to change the player background of Kugou Concept Edition and how to set the player background

Developing an online video player based on JavaScript Developing an online video player based on JavaScript Aug 08, 2023 am 10:37 AM

Developing an online video player based on JavaScript

See all articles