(Jsp/html) embedded player on Webpage

Source: Internet
Author: User

This is actually very simple, as long as you add the above Code to HTML, it will be OK, the premise is that you have installed a player on your computer, such as RealPlay.
<Embed src = "C:/mp3/10.19/painter" width = "480" height = "100"
Loop = "false" autostart = "false">
</Embed>

More players and settings are available:
Insert the REAL Player Code to the page:


<Object classid = clsid: CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height = 60 id = video1 style = LEFT: 0px; TOP: 0px width = 209>
<Param name = _ ExtentX value = 5530>
<Param name = _ ExtentY value = 1588>
<Param name = AUTOSTART value = 1>
<Param name = SHUFFLE value = 0>
<Param name = PREFETCH value = 0>
<Param name = NOLABELS value = 0>
<Param name = SRC value = RM. RAM. RA and other absolute addresses of music files>
<Param name = CONTROLS value = StatusBar, ControlPanel>
<Param name = CONSOLE value = RAPLAYER>
<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>

 

Insert Media Player Code to the page:


<OBJECT id = mPlayer1 classid = CLSID: 6BF52A52-394A-11D3-B153-00C04F79FAA6 width = 220

Height = 64 type = 'application/x-oleobject "'>
<Param name = "URL" VALUE = "absolute address of the WMA music file">
<Param name = "rate" VALUE = "1">
<Param name = "balance" VALUE = "0">
<Param name = "currentPosition" VALUE = "0">
<Param name = "defaultFrame" VALUE = "">
<Param name = "playCount" VALUE = "100">
<Param name = "autoStart" VALUE = "-1">
<Param name = "currentMarker" VALUE = "0">
<Param name = "invokeURLs" VALUE = "-1">
<Param name = "baseURL" VALUE = "">
<Param name = "volume" VALUE = "100">
<Param name = "mute" VALUE = "0">
<Param name = "uiMode" VALUE = "full">
<Param name = "stretchToFit" VALUE = "0">
<Param name = "windowlessVideo" VALUE = "0">
<Param name = "enabled" VALUE = "-1">
<Param name = "enableContextMenu" VALUE = "0">
<Param name = "fullScreen" VALUE = "0">
<Param name = "SAMIStyle" VALUE = "">
<Param name = "SAMILang" VALUE = "">
<Param name = "SAMIFilename" VALUE = "">
<Param name = "captioningID" VALUE = "">
</OBJECT>

 


Insert Media Player (video) Player code to the page:


<Object classid = "clsid: 22D6F312-B0F6-11D0-94AB-0080C74C7E95"

Id = "MediaPlayer1" height = 260 width = 320>
<Param name = "Filename" value = "absolute address of an MTV video file">
<Param name = "PlayCount" value = "0">
<Param name = "AutoStart" value = "1">
<Param name = "ClickToPlay" value = "1">
<Param name = "EnableFullScreen Controls" value = "1">
<Param name = "ShowAudio Controls" value = "1">
<Param name = "EnableContext Menu" value = "1">
<Param name = "ShowDisplay" value = "0">
</Object>

 

 

Insert a music player into a BLOG

Go to the control panel, click "homepage content maintenance", and add a blank panel in "Custom blank panel,
Check "source code" and paste the following code:
 
<Embed src = http: // 163.20.114.1 /~ T120/bug.mp3 width = 200 height = 45 type = audio/mpeg
Loop = "false" autostart = "false">

 
Or use this code:
<Object id = nstv classid = 'clsid: 6BF52A52-394A-11d3-B153-00C04F79FAA6 'width = 180 height = 170 codebase = http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701standby=Loading Microsoft? Windows Media? Player components... type = application/x-oleobject>
<Param name = 'url' value = 'HTTP: // bbs.hndt.com/uploadfile/2005-6/dance with the parent. wma__200561817222223885.wma'>
<Param name = 'uimode' value = 'full'> <param name = 'autostart' value = 'true'>
<Param name = 'enabled' value = 'true'>
<Param name = 'enablescontextmenu 'value = 'false'>
<Param name = 'windowlessvideo' value = 'true'> </object>
 
The above is long but practical. It can automatically tune online plug-ins, and almost all music and videos are played.
 
 
 
Note: http: // is followed by the URL of the song. You can change it to your favorite music,
However, it must be a URL, that is, right-click the music and right-click it to view its attributes. paste the attributes and click OK.
Player width and height width = 200 height = 50 if you set the width and height to 0,
As a background music, visitors cannot enable or disable the player without seeing it.
(After the settings are complete, the player will appear. You can change the music you like. Just change the link address)
Loop = "true" indicates continuous loop playback, and loop = "false" indicates non-loop playback. You can control it freely.
Autostart = "true" indicates automatic playback, and autostart = "false" indicates that automatic playback is disabled.
Loop = "2" indicates that the music is played twice in a loop. 3, 4, 5 --- and so on.
Supported music formats: wma mp3 rm ra ram asf mid.
After saving, click "customize my homepage" on the left ---- "add module" --- Select the blank panel you just saved ---
Are you sure you want to log in and see the music.
After a few attempts, the habit is simple.
By the way, there must be a space between the URL address and width = 200 height = 50; otherwise, the song cannot be played.

1. How to paste rm, ra, ram music, the Code is as follows:
<Embed width = "0" height = "0" type = "audio/x-pn-realaudio-plugin" autostart = "true" controls = "ControlPanel" src = "http://guest.anyp.cn/uploads/01.rm" ;>

2. How to paste the midi, asf, wma, and asx types of music, the Code is as follows:
<Embed autostart = "true" loop = "-1" controls = "ControlPanel" width = "0" height = "0" src = "http://guest.anyp.cn/uploads/01.mid";>

You only need to copy the entire code segment to the Article (when editing the article, click the HTML code mode and then paste the Code; otherwise, the code will be displayed in text format and cannot be executed ), you can use the URL of your favorite and available music files to replace the code of the white music address displayed above.

Most of the reasons that cause music to fail to be played:
A: The music file is incorrect. It is possible that this file is not A music file, but A common HTML page.
B: The music file address is incorrect. This music file does not exist.
C: No related playing software is installed.

Test method: Enter the music file address in the IE column. If you are prompted to save the file, the saved file type is rm, ram, midi, and other files, that is, the music file. If the file is opened and the music is automatically played or other content is displayed, no.

Add the flash with music, and then enter your FLASH Address in the pop-up window, note the post stamp Name: http://xxxxx.xxxx.swf, size can be adjusted to, 1*1, in this way, you can play music without displaying FALSH, but remember to play it automatically. do not find the FLASH that needs to start.


Add an online music play code, recommended: <IFRAME marginHeight = 0 src = "http://www.yqchina.com/play.htm "; frameBorder = 0 noResize width = 540 scrolling = no height = 25> place the code in a proper place on the website and play the song 24 hours a day. The code is provided by Qingfeng network radio.

 

The following is a simple code: First open my article, enter the editing status, select the HTML format, and then enter it. Next let's look at the code. First, let's look at the first one, which is relatively simple:


<Bgsound src = "url" loop =-1>


"Url" is still the path name, "loop" indicates the number of loops, and "-1" indicates that the loop is always


Let's look at the second one:

<EMBED src = "music. mid" autostart = "bool" loop = "n" width = "m" height = "k">


The meaning of each attribute is as follows:


SRC: music file path
(Optional) AUTOSTART: automatic playback after the music file is uploaded. TRUE indicates playback, and FALSE indicates no.
LOOP: Set "TRUE" to "Automatic LOOP", "FALSE" to "no LOOP", and "Number" to "count ".
WIDTH and HEIGHT are the WIDTH and HEIGHT of the playback control panel,
Other attributes include:
Volume: The value ranges from 0 to 100. Set the volume. The default value is the volume of the system.
Starttime: "minute: Second", set the start time of the song, for example, starttime = "", starting from 10th seconds
Endtime: "minute: Second", set the end time of the song
Controls: Control Panel exterior controls = "console/smallconsole/playbutton/pausebutton/stopbutton/volumelever"

· Normal console panel size
· Small smallconsole panel
· Playbutton: display the playback button
· Pausebutton: display the pause button
· Stopbutton: displays the stop button.
· Volumelever display volume adjustment button
Hidden: If this parameter is set to true, the Panel can be hidden.


Simplified background music code
1. <embed src = "den =" true "autostart =" true "loop =" true ">

-------- Hidden = "true" indicates hidden playback, that is, the appearance of the player is not displayed. to display the video, replace "true" with "false". By default, playback is minimized, if you want to display the player size, add height = "height" width = "width.

------- Autostart = "true" indicates automatic playback when the current page is loaded. If you do not want to play the video, change it to autostart = "false"
You can...

------ Loop = "true" indicates Infinite loop Playing of music until the current page is closed. If you do not want loop Playing to be replaced by loop = "false", it will be OK.

2. <embed src = "" autostart = "true" loop = "-1" controls = "ControlPanel" width = "0" height = "0">

----------- Loop = "-1" indicates infinite loop playback. You can set the number of playback times and use a specific number instead. For example, if you want it to play twice, loop = "2"

--------- Controls = "ControlPanel" can be omitted

-------- Width = "0" height = "0" indicates hiding the playback, which is the same as the previous one.
To set the appearance of the player, replace it with a specific value, for example, width = "123" height = "100"

--------------------------------------------------
In fact, the following code is the simplest to describe the code for playing background music. --->

<Embed src = "">
-----------------------------------------------------

In addition, bgsound src = "background music path" loop = "-1">

This function only supports Internet Explorer and starts playing after the download is complete. Unlike the preceding format, it can be played while buffering. This is generally used for mid music or small mp3 or wav music. If it is a large file, use the format mentioned above ~~
<Bgsound src = "background music path" loop = "-1"> this function is played as the browser opens. When the window is minimized, the function stops playing. When the window is maximized, the function starts playing again.
However, <embed src = "" autostart = "true" loop = "-1" controls = "ControlPanel" width = "0" height = "0"> commonly used in mid,, wav and mp3 types of music.


This will always be played regardless of whether the window is minimized until the current window is closed ~~

Supported music file types: only supported music formats supported by the MP player, such as mp3, asf, wma, and asx.
Rm, ram ....

The video file insertion method is also the same as described above.

Music code explanation
<Embed autostart = "true" loop = "-1" controls = "ControlPanel" width = "0" height = "0" src = "http://guest.anyp.cn/uploads/01.mid">
Explanations:

AUTOSTART = "TRUE/FALSE"
Whether to automatically play the music after the music file is uploaded. TRUE is required
FALSE indicates no, and the specified value indicates no.


LOOP = "TRUE/FALSE/Integer"
Sets whether to automatically repeat playback. LOOP = 2 indicates repeated playback twice. If you want to repeat playback for an unlimited number of times, you can use LOOP = "TRUE"


WIDTH and HIGH = "integer"
Set the width and height of the Control Panel

CONTROLS = "CONSOLE/SMALLCONSOLE/
PLAYBUTTON/PAUSEBUTTON/STOPBUTTON/
VOLUMELEVER"
Set the control panel. The default value is CONSOLE.

Normal CONSOLE panel
Small SMALLCONSOLE panel
PLAYBUTTON only displays the play button
PAUSEBUTTON: only the pause button is displayed.
STOPBUTTON: only show the stop button
VOLUMELEVER only displays the volume adjustment button

◆ MTV code
<Embed id = "MediaPlayer963" src = "MTV address" width = "305" height = "250"
Type = "video/x-msvideo" autostart = "true" loop = "false" align = "left">

◆ Unlimited song code can be put without a player
<Iframe name = "I1" src = "http://biz.cnhoo.com/wz/test/Edikongjian_yinyue.htm"
Width = "1" height = "1">

◆ Background music code (written in the diary title)
1. display the player code:
<Embed src = http: // your music address>
2. Do not display the player code:
(Because there is a limit on the number of words in the diary title, please select a short music address. Otherwise, the background music will become invalid)
<Embed src = http: // your music address width = "0" height = "0" loop = "999">
The music address in the Code is a URL that ends with audio/. midi/. wma/. wmv.

◆ Video MTV code (written in the diary content)
<Embed src = http: // your video file address type = audio/x-pn-realaudio-plugin
Console = clip1 controls = ImageWindow height = 124 width = 180 autostart = true
Loop = true>
The video file address in the Code is the URL Ending with. rm on the Internet. You can adjust the player size in the code.
You only need to change height = "height", width = "width"

◆ Radio station code (written in the diary content)
<Embed src = http: // your station address type = audio/x-pn-realaudio-plugin
Console = clip1 controls = ImageWindow height = 124 width = 180 autostart = true
Loop = true>
The radio address in the Code is the URL Ending with. asp.

◆ Music playback code
<Iframe src = Music address frameborder = 0 width = 100% height = 34>

◆ All-around player code
Style =/'position: absolute; top: 0; left: 0;/'> <#105; FRAME name = I1
Src =/'HTTP: // tf1000.go2.icpcn.com/mp3/top.htm/'frameborder =/'0 /'
Width =/'2017/'scrolling =/'no/'height =/'21/'> </div> '; ">

◆ A cool embedded Player Code
Style = position: absolute; top: 0; left: 0; width: 925; height: 655;> </div> '; MVPlayer
. & #105; nnerHTML = '<& #105; frame
Src = http://wonzone.go2.icpcn.com/qzone/mvp/mvp.htm?
Mvx = 700 & mvy = 445 & mvw = 225 & mvh = 180 & mvlst = http://wonzone.go2.icpcn.com/qzon
E/test. js & ctrlp = true & lstmd = 1 & dd8h = 445 & ctrlpx = 49 & ctrlpy = 625 & rndp = true
AllowTransparency = true width = 925 height = 655 marginwidth = 0 marginheight = 0
Hspace = 0 vspace = 0 frameborder = 0 scrolling = no name = MVP> </& #105; frame> '"
Style = display: none>
Use NotePad to replace & all in the Code with halfwidth &; otherwise, the code is invalid.

◆ Music player code (multiple formats supported)
Style =/'position: absolute; top: 0; left: 0;/'> <#105; FRAME name = I1
Src = "// 'HTTP: // tf1000.go2.icpcn.com/mp3/top.htm"/'frameborder =/'0 /'
Width =/'2017/'scrolling =/'no/'height =/'21/'> </div> '; ">
All-Around PLAYER: supports rm, mp3, wma, wmv, wav, midi, asf, mpeg, mpg, avi, and other formats

◆ Code can be freely stored in five super-cool MP3 players
<Content> Src = "javascript: document. getElementById ('mlogo '). innerHTML + =' <div
Style =/'position: absolute; top: 0; left: 0;/'> <iFRAME name = I1
Src =/'HTTP: // 218.80.220.26/QQZONE/25514291/files/music/music5.htm /'
FrameBorder =/'0/'width =/'930/'scrolling =/' no /'
Height =/'33/'> </div>'; "> </content>
Top: 0; left: 0 indicates the distance between the top and the left. You can modify the value.

◆ Home theater code
<Div id = "layer25" style = "padding: 0px; LEFT: 2px; OVERFLOW: hidden; WIDTH:
634px; POSITION: absolute; TOP: 0px; HEIGHT: 530px; zindex: 90"
Resiziable = "true">
Src = "http://photoimg24.qq.com/cgi-bin/load_pic?
Verify = qi4PbOWvS % 2FBcyd7oL7ik % 2Fg % 3D % 3D "width =" 707 "align =" middle"
Border = "0"> </div>
<Div id = "layer23" style = "left: 229px; overflow: hidden; width: 262px;
Position: absolute; top: 128px; height: 210px; zindex: 200; padding: 0px"
Resiziable = "true">
<Embed id = "MediaPlayer963" src = "your video address" width = "303" height = "300"
Type = "video/x-msvideo" autostart = "true" loop = "false" align = "left"> </div>

◆ Top MTV code
S = document. createElement ('script'); s. src = 'HTTP: // wonzone.go2.icpcn.com/qzon
E/public/mtv_top.js '; document. body. appendChild (s );"
Style = display: none> </img>

◆ Code of a cool FLASH rolling player (recommended by myself)
<EMBED src = http://www.zhuiluren.com/MusicBYSEA.swf width = 460 height = 650
Type = application/x-shockwave-flash> <DIV> </DIV>

◆ Insert video code (generated by the Code Generator)
1... only play the video playback code that needs to be opened manually once
</Textarea> <embed src = video address type = audio/x-pn-realaudio-plugin
Console = clip1 controls = ImageWindow height = 420 width = 640 autostart = False
Loop = False>
2 .. loop playback code
</Textarea> <embed src = video address type = audio/x-pn-realaudio-plugin
Console = clip1 controls = ImageWindow height = 420 width = 640 autostart = False
Loop = True>
3 .. video playback code for automatic playback
</Textarea> <embed src = video address type = audio/x-pn-realaudio-plugin
Console = clip1 controls = ImageWindow height = 420 width = 640 autostart = False
Loop = False>
4 .. automatic playback + loop playback code
</Textarea> <embed src = video address type = audio/x-pn-realaudio-plugin
Console = clip1 controls = ImageWindow height = 420 width = 640 autostart = True
Loop = True>

◆ Insert music code (generated by the Code Generator)
1... only play the code of the music that needs to be opened manually once
</Textarea> <embed src = Music address width = 2 height = 2 autostart = False loop = False>
2 .. loop playback code
</Textarea> <embed src = Music address width = 2 height = 2 autostart = True loop = False>
3 .. loop playback + automatic music playback code
</Textarea> <embed src = Music address width = 2 height = 2 autostart = True loop = True>
4 .. loop playback + automatic music playback + hide Player Code
</Textarea> <embed src = Music address width = 0 height = 0 autostart = True loop = True>
5 .. automatic music playback code
</Textarea> <embed src = Music address width = 2 height = 2 autostart = False loop = True>
6 .. hide the Player Code
</Textarea> <embed src = Music address width = 0 height = 0 autostart = False loop = False>
7 .. loop playback + automatic playback + Player Code
Style =/'position: absolute; top:; left:;/'> <& #105; FRAME name = I1 src =/' music address
/'Frameborder =/'0/'width =/'/'scrolling =/' no/'height =/'> </div>'; ">

 

Related Article

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.