(JSP / HTML) embedded player on Web page

Time:2021-2-24

This is actually very simple, as long as you add the above code to the HTML, it is OK, provided that your computer has installed a player, such as realplay.

Copy codeThe code is as follows:
< embedded SRC = “C] / MP3 / 10.19/heart painting. Mp3” width = “480” height = “100” 02. Loop = “false” autostart = “false” >
</embed>

There are more players and settings to choose from:
Page insert real player code:

Copy codeThe code is as follows:
<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 so on
<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>

Page insert media player code:

Copy codeThe code is as follows:
<OBJECT id=mPlayer1 classid=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6 width=220 height=64 type=’application/x-oleobject”‘>
< param name = “URL” value = “wma music file absolute address” >
<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>

Page insert media player (video) player code:

Copy codeThe code is as follows:
<object classid=”clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95″ height=260 width=320>
< param name = “filename” value = “MTV video file absolute address” >
<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 music player into blog

Enter the control panel, click “home page content maintenance”, and add a blank panel in “custom blank panel”,
After checking “source code”, paste the following code:

Copy codeThe code is as follows:
<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:

Copy codeThe code is as follows:
<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 my father.wma___ 200561817222223885.wma’>
<PARAM NAME=’UIMode’ value=’full’><PARAM NAME=’AutoStart’ value=’true’>
<PARAM NAME=’Enabled’ value=’true’>
<PARAM NAME=’enableContextMenu’ value=’false’>
<param name=’WindowlessVideo’ value=’true’></object>

The above one is long, but more practical. It can automatically tune plug-ins on the Internet, and almost all music videos can be played

Note: the URL address of the song is after http: / /. I write it casually here. You can change it to your favorite music,
But it must be URL, that is, right click to see its properties after searching for music. Paste the properties
Width and height of player width = 200, height = 50, you can set it according to your needs, if width and height are set to 0,
It becomes background music. Visitors can’t see the player and can’t turn it on or off at will.
(after setting, the player will appear. You can change your favorite music freely. Just change the link address.)
Loop = “true” for continuous loop playback, loop = “false” for non loop playback. You can control it freely
Autostart = “true” is auto play, autostart = “false” is not auto play. You can control it freely
Loop = “2” means that the music is played twice in a loop. 3, 4, 5 — and so on
Supported music format: wma MP3 RM RA ram ASF mid
After saving, click “customize my home page” — “add module” — on the left to check the blank panel you just saved—
OK, log in and you can hear the music
Try a few times and get used to it
By the way, there should be a space between the URL address and width = 200, height = 50, otherwise the song will not play

How to paste RM, RA, ram type music, the code is as follows:

Copy codeThe 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”;>

How to paste MIDI, ASF, wma, ASX music, the code is as follows:

Copy codeThe code is as follows:
<embed autostart=”true” loop=”-1″ controls=”ControlPanel” width=”0″ height=”0″ src=”http://guest.anyp.cn/uploads/01.mid”;>

Just copy the whole code to the article (when editing the article, please click the HTML code mode first, and then paste the code, otherwise the code will be displayed in text form and cannot be executed), and replace the music address code displayed in white with the URL of the music file you like and can use.

Most of the reasons why music cannot be played successfully are as follows:
A: Music file error, it is possible that this file itself is not a music file, just an ordinary HTML page.
B: The address of the music file is wrong. This music file does not exist at all.
C: No playback software is installed.

Test method: Please input the address of the music file in the IE column. If you are prompted to save, the saved file type is RM, ram, MIDI and so on. If the file is opened to automatically play music or display other content, it is not.

Add a flash with music, and then enter your Flash address in the pop-up window. Note that the postmark name is: http://xxxxx.xxxx.swf , the size can be adjusted to, 1 * 1, so that you can play music without displaying false. But remember to play music automatically, don’t look for flash that needs to press start

Add an online music playing code, recommended: < iframe marginheight = 0 Src=“ http://www.yqchina.com/play.htm “; frameBorder = 0 noResize width = 540 scrolling = no height = 25 > put this code in a suitable place on the website and play songs 24 hours a day. The secondary code is provided by Qingfeng network radio

The following is a simple code: first, open my article, enter the editing state, select HTML format, and then you can input it. Let’s look at the code. First, look at the first, which is relatively simple:

<bgsound src=”url” loop=-1>

“URL” is still the pathname, loop means the number of loops, and – 1 means always loop

Let’s look at the second one
<EMBED src=”music.mid” autostart=”bool” loop=”n” width=”m” height=”k”>
The meanings of each attribute are as follows:

SRC: music file path
(optional below) autostart: the music file will play automatically after uploading, true is play, false is No
Loop: set the loop to true for automatic loop, false for no loop, and the number of times
Width and height are the width and height of the playback control panel,
The remaining attributes are:
Volume: the value range is “0-100”. Set the volume. The default is the volume of the system itself
Starttime: “minutes: seconds”, set the time when the song starts to play, for example, starttime = “00:10”, starting from the 10th second
Endtime: “minutes: seconds” to set the end time of the song
Controls: appearance of control panel

·Console normal size panel
·Smallconsole small panel
·PlayButton displays the play button
·PauseButton displays the pause button
·STOPButton displays the stop button
·Volumeliver displays the volume adjustment button
Hidden: when true, the panel can be hidden

Background music code simplification
1. < embedded SRC = “background music website” hidden = “true” autostart = “true” loop = “true” >

——–Hidden = “true” means to hide the playback, that is, the appearance of the player will not be displayed. If you want to display it, you can replace “true” with “false”, which means to minimize the playback by default. If you also want to display the size of the player, you can add “height value” and “width value”.

——-Autostart = “true” means that the current page will play automatically when it is loaded. If you do not want to play, it will be changed to autostart = “false”
Then

——If you don’t want to play the music in a loop, replace it with loop = false

2. < embedded SRC = “background music website” autostart = “true” loop = – 1 “controls =” controlpanel “width =” 0 “height =” 0 “>

———–Loop = – 1 “means to play in an infinite number of cycles. You can set the number of times to play and replace it with a specific number. For example, if I want it to play twice, then loop = – 2”

———The control options can be omitted

——–Width = “0” height = “0” means hide playback, just like the previous one.
If you want to set the appearance of the player, you can replace it with a specific value, such as width = 123 height = 100

————————————————–
In fact, if you want to say the most simplified code for playing background music, the following code is the simplest — >

< embedded SRC = “background music website” >
—————————————————–

In addition: bgSound SRC = “background music path” loop = – 1 “>

This only supports IE browser, and it starts to play after downloading completely. Unlike the format mentioned above, it can play while buffering. This is generally used for mid music or smaller MP3, wav format music. If the file is larger, use the format mentioned above~~
< bgSound SRC = “background music path” loop = – 1 > > this will play when the browser is opened. When the window is minimized, it will stop playing, and when the window is maximized, it will start playing again.
However, < embedded SRC = “background music website” autostart = “true” loop = – 1 “controls =” controlpanel “width =” 0 “height =” 0 “> is commonly used in mid, WAV and MP3 music types

This will play regardless of whether the window is minimized or not until the current window is closed~~

Supported music file types: only MP player supported music formats, such as MP3, ASF, wma, ASX, etc
RM, RAM… Is not supported

The insertion method of the video file is the same as the above, and the appropriate settings are set

Music code interpretation
<embed autostart=”true” loop=”-1″ controls=”ControlPanel” width=”0″ height=”0″ src=”http://guest.anyp.cn/uploads/01.mid”>
Explain:

AUTOSTART=”TRUE / FALSE”
Whether to play music automatically after the music file is transferred. True is to be true
False means no, the internal setting is No.

Loop = “true / false / integer”
Set whether to play automatically repeatedly. Loop = 2 means to repeat twice. If you want to repeat infinitely, 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 appearance of the control panel. The default value is console

Console normal panel
Smallconsole smaller panel
PlayButton displays only the play button
PauseButton displays only the pause button
STOPButton only displays the stop button
The volume lever only displays the volume adjustment button

The MTV code
< embed SRC = “MTV’s address” width = “305” height = “250”
type=”video/x-msvideo” autostart=”true” loop=”false” align=”left”>

Music code can be unlimited without player
<iframe name=”I1″ src=”http://biz.cnhoo.com/wz/test/Edikongjian_yinyue.htm”
width=”1″ height=”1″>

Background music code (written in diary title)
Display player code:
< embedded SRC = http: / / your music address >
Do not display player code:
(due to the word limit of diary title, please choose a shorter music address, otherwise the background music will be invalid)
< embedded SRC = http: / / your music address width = 0 “height = 0” loop = 999 “>
The music address in the code is the web address ending with. MP3 /. MIDI /. Wma /. WMV

Video MTV code (written in the diary)
< embedded 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 web address ending with. RM. The size of the player can be adjusted by itself in the code
Just change height = height, width = width

Radio code (written in diary)
< embedded SRC = http: / / your radio address type = audio / x-pn-realaudio-plugin
console=clip1 controls=ImageWindow height=124 width=180 autostart=true
loop=true>
The radio station address in the code is the web address ending with. ASP

Music playing code
< iframe SRC = music address frameBorder = 0 width = 100% height = 34 >

All around player code
<img src=”javascript:document.getElementById(‘Mlogo’).innerHTML+='<div
style=/’position:absolute;top:0;left:0;/’><iFRAME name=I1
src=/’http://tf1000.go2.icpcn.com/mp3/top.htm/’ frameBorder=/’0/’
width=/’975/’ scrolling=/’no/’ height=/’21/’></div>’;”>

A cool embedded player code
<img src=”javascript :Mlogo.&#105;nnerHTML+='<div id=MVPlayer
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 half angle & or it will be invalid

Music player code (support multiple formats)
<img src=”javascript:document.getElementById(‘Mlogo’).innerHTML+='<div
style=/’position:absolute;top:0;left:0;/’><iFRAME name=I1
src=”//’http://tf1000.go2.icpcn.com/mp3/top.htm”/’ frameBorder=/’0/’
width=/’975/’ scrolling=/’no/’ height=/’21/’></div>’;”>
Versatile player: support RM, MP3, wma, WMV, WAV, MIDI, ASF, MPEG, mpg, AVI and other formats

5 kinds of super cool MP3 players can play code at will
<content><img
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 represents the distance above and to the left, which can be modified

Home theater code
<div style=”padding:0px; LEFT: 2px; OVERFLOW: hidden; WIDTH:
634px; POSITION: absolute; TOP: 0px; HEIGHT: 530px; zindex: 90″
resiziable=”true”>
<img oncontextmenu=”return false” title=”” height=”529″
src=”http://photoimg24.qq.com/cgi-bin/load_pic?
verify=qi4PbOWvS%2FBcyd7oL7ik%2Fg%3D%3D” width=”707″ align=”middle”
border=”0″></div>
<div style=”left: 229px; overflow: hidden; width: 262px;
position: absolute; top: 128px; height: 210px; zindex: 200; padding: 0px”
resiziable=”true”>
< embed SRC = “your video address” width = 303 “height = 300”
type=”video/x-msvideo” autostart=”true” loop=”false” align=”left”></div>

Top MTV code
<img src=”javascript:var
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>

A cool flash scrolling player code (I recommend it)
<EMBED src=http://www.zhuiluren.com/MusicBYSEA.swf width=460 height=650
type=application/x-shockwave-flash><DIV></DIV>

To insert video code (generated by code generator)
. only play the video playback code that needs to be opened manually once
< / textarea > < embedded SRC = video address type = audio / x-pn-realaudio-plugin
console=clip1 controls=ImageWindow height=420 width=640 autostart=False
loop=False>
… loop video playback code
< / textarea > < embedded SRC = video address type = audio / x-pn-realaudio-plugin
console=clip1 controls=ImageWindow height=420 width=640 autostart=False
loop=True>
… automatic video playback code
< / textarea > < embedded SRC = video address type = audio / x-pn-realaudio-plugin
console=clip1 controls=ImageWindow height=420 width=640 autostart=False
loop=False>
… auto play + loop code
< / textarea > < embedded 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 code generator)
Only play the music playing code that needs to be opened manually once
< / textarea > < embedded SRC = music address width = 2 height = 2 autostart = false loop = false >
… loop music playing code
< / textarea > < embedded SRC = music address width = 2 height = 2 autostart = true loop = false >
… loop + automatic music playing code
< / textarea > < embedded SRC = music address width = 2 height = 2 autostart = true loop = true >
… loop + auto music + hide player code
< / textarea > < embedded SRC = music address width = 0 height = 0 autostart = true loop = true >
… automatic music playing code
< / textarea > < embedded SRC = music address width = 2 height = 2 autostart = false loop = true >
… hide player code
< / textarea > < embedded SRC = music address width = 0 height = 0 autostart = false loop = false >
… loop + auto + player code
<img src=”javascript:document.getElementById(‘Mlogo’).innerHTML+='<div
style=/’ position:absolute;top :; left:; / ‘< & #105; frame name = I1 SRC = /’music address
/’ frameBorder=/’0/’ width=/’/’ scrolling=/’no/’ height=/’/’></div>’;”>