Home Web Front-end HTML Tutorial Common html web player codes

Common html web player codes

Apr 02, 2017 am 09:52 AM

The players we see on the web page are nothing more than WMP/RealPlayer/Flash Player, the others are just different panels, or other controls are added, for on the computer Some of the players installed are also the integration of encoding and decoding, and their 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).

1. Use the Embed tag to play multimedia files


Format . 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 (at this time, the role of the embed tag is similar to that of using the object tag to display Flash animation), example:
In short, summarize the role of the embed tag: play the specified multimedia file on the web page.


2. Call Windows Media Player for playback


Can be used to play wmv, asf and other format files

<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">  
<param name="filename" value="test.wmv" />  
<param name="autostart" value="false" />  
<param name="showstatusbar" value="true" />  
<param name="showtracker" value="true" />  
<param name="showcontrols" value="true" />  
<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>  
</object>
Copy after login

Windows Media Player 7 and above The class ID of the version is: clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6
The class ID in the above example is an old version, but it can still work because of 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.
The following is an example of the new version

<object classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject" height="200" width="300">   
<param name="url" value="test.wmv" />   
<param name="autostart" value="false" />   
<param name="showstatusbar" value="true" />   
<param name="showtracker" value="true" />   
<param name="showcontrols" value="true" />   
<param name="uimode" value="full"/>   
<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>   
</object>
Copy after login

3. Call Real Player for playback


Can be used to play rm, ram and other format files

Playback box :

<object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=285 id=RAOCX name=rmplay width=356>  
<param name="SRC" value="影片地址">  
<param name="CONSOLE" value="Clip1">  
<param name="CONTROLS" value="imagewindow">  
<param name="AUTOSTART" value="true">  
<embed src="影片地址" autostart="true" controls="ImageWindow" console="Clip1" pluginspage="http://www.real.com"/’ width="356" height="285">  
</embed>  
</object>
Copy after login

Control box: can be followed closely by the playback box

<object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=27 id=video1 width=356>   
<param name="_ExtentX" value="7276">   
<param name="_ExtentY" value="1058">   
<param name="AUTOSTART" value="0">   
<param name="SHUFFLE" value="0">   
<param name="PREFETCH" value="0">   
<param name="NOLABELS" value="0">   
<param name="CONTROLS" value="ControlPanel">   
<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="#ffffff">   
<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">   
</embed>   
</object>
Copy after login


The above is the detailed content of Common html web player codes. For more information, please follow other related articles on the PHP Chinese website!

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 AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

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)

Hot Topics

Java Tutorial
1654
14
PHP Tutorial
1252
29
C# Tutorial
1225
24
Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

See all articles