Play more than one song code

Source: Internet
Author: User
Tags prefetch shuffle

Accidentally found the good things, put here to the recent friends, so happy Ah, my space has many music to do background slightly.
Add a background music presumably everyone knows how to do it, that is, when the background music module is selected and determined, the background music will be added to your Space home page. It can support the following media formats: MP3, WMA, WMV, MPG, MPEG, AVI, SWF, WAV.
Tip: Background music is normally played on Windows Media Player with MS installed in the operating system.
Click on the "Edit Content" link to fill in the music address, choose the form of playback.
Here's how to add multiple background music:
It looks long, but it's simple, just do it step by step. Note: This method only supports MP3 file formats
1, on the network to find the background music you want to add the network address;
Personal recommendation to use Baidu's MP3 search
2, Save the Found music address in a Notepad, as shown in the figure:
Each music address line, there is no limit to the number of music, but to ensure that the music address is valid Ah, so these music addresses first or local test it. 3, Save the modified Notepad file, such as save for 11.txt 4, modify the file name of the Notepad file just saved, and change the file's extension. mp3, that is, change 11.txt to 11.mp3, then determine 5, the modified MP3 file uploaded to the network, And get uploaded after the network address, such as: Http://www.topjj.com/11.mp3 introduce a good upload space: 999KB random Biography, http://www.999kb.com/, after uploading he will automatically generate file address; 6, edit background music, After uploading the network address input to the background music settings Click OK, done. Then go to your space home to see the effect of it. In the Space home page
Play multiple song Code as:

<script language= "JavaScript" >
<!--
var sound1= "http://song address"
var sound2= "http://song address"
var sound3= "http://song address"
var sound4= "http://song address"
var sound5= "http://song address"
var sound6= "http://song address"
var sound7= "http://song address"
var sound8= "http://song address"
var sound9= "http://song address"
var sound10= "http://song address"
var x=math.round (Math.random () *10)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) X=sound3
else if (x==3) X=sound4
else if (x==4) X=sound5
else if (x==5) X=sound6
else if (x==6) X=sound7
else if (x==7) X=sound8
else if (x==8) x=sound9
else X=SOUND10
if (navigator.appname== "Microsoft Internet Explorer"
document.write (' <bgsound src= ' + ' "' +x+ '" ' + ' loop= ' infinite "> ')
Else
document.write (' <embed src= ' + ' "' +x+ '" ' + ' hidden= ' true ' autostart= ' true ' loop= ' true ' > ')
-->
</SCRIPT>
"Song Address" indicates the music address
Please note: This is not a player but lets the background music play automatically every time you refresh it



Method Two
Or you can use the following methods
The first step, add the player's code (no other people do JS player), I as long as the simplest.
In fact, to say the most simplified code to play background music, the following code is the simplest
<embed src= "background music website" >

Oh, I use is:
<embed src= "background music url" autostart= "true" loop= "-1" controls= "ControlPanel" width= "0" height= "0" >
loop= "-1" means unlimited loop playback, can set the number of playback, with specific numbers can be replaced, such as I want it to play two times, then loop= "2"
Controls= "ControlPanel" This control option can be omitted
Width= "0" height= "0" indicates hidden playback. To set the size of the player, set the value, such as width= "height=" "25"
I put it in the article, so directly to the article switch to code mode pasted on just the code on it.
The second step, the realization of continuous playback of more than one song

The player will get it, use Baidu or search to find the address of the song, replace the code "background music URL" can play songs. But this can only be a song AH. It doesn't matter, remember when you used to listen to Winamp or thousands of times when there is a play list. Yes, in M3U format. Create a new Notepad document with the following code saved as "any name. M3u":
<ASX Version = "3.0" >
<Entry>
<ref href = "Mid.wma.mp3, etc. end of the music web site 1"/>
</Entry>
<Entry>
<ref href = "Mid.wma.mp3, etc. end of the music web site 2"/>
</Entry>
<Entry>
<ref href = "Mid.wma.mp3, etc. end of the music web site 3"/>
</Entry>
Need more songs to repeat "<Entry>......</Entry>" code
</ASX>

Well, then. Upload your saved files (such as musci.m3u) to your home page or anywhere else (I'm uploading to googlepage). Then put the m3u IE address in the first step of the "background music address" place can achieve the purpose of continuous playback. Don't believe, try it.

Because when you open a blog, although not automatically play, but the player first to load the first song, when you encounter the wrong address of the song will automatically jump to the second song and play the second song.

But here is to note that the second song address can not have Chinese characters, or jump to the second song when it will not automatically play, the third, the fourth song after the limit, as long as the song address right on the line.

Method Three

Method Three (simple and easy)

How to realize space multiple music automatic continuous playback

Recently a lot of people ask how to use power toy that WMP to play multiple music continuously, but there is no answer, now a wise man thought of the way.

1. First find the address of the song you need, how to find the online song address please see

It is advisable to search inside http://www.sogua.com/and mp3.baidu.com (but it is easy to expire.) )

2. After you find a new text file in your computer, put the address of these songs on a different line, such as:

Http://gouy2k.castpost.com/cp-yellow.mp3
Http://gouy2k.castpost.com/gz.mp3
Http://gouy2k.castpost.com/D-FM-04.mp3


Remember to put the address of different songs on a different line

3. Save this text file as a file with the extension. mp3

4. Upload this file to cyberspace and add the address to the URL of the WMP setting.

5. Replace the WMP display mode with full, so you can move forward and back to select the song.

When you're done, you can go to the pre-range test to find out if you can play different songs consecutively.

Method Four (professional formal)


Objective
MSN Spaces launched PowerToy media playback module, more and more MSN Spaces users are no longer satisfied with a single video
or audio playback, very much want to be able to play multiple video or music files continuously. This tutorial will help users achieve that goal and be able to
Windows Media Player Displays the name of the music that is playing, the name of the singer, and even the personalized logo of your MSN Spaces.
If you find it too complicated, use method one.

[User Group]
The user must have a home page or networked storage space that can be called externally, to hold the consecutive playback file address [The file has only hundreds of bytes
Size, up to a few K]. These spaces please help each other to introduce and solve, here will not be described in detail.

[Use premise]
The user will change the file name extension. The default computer does not display the extension, please turn on my Computer [my computer]-> tool [tools]->
Folder Options [Folders options]-> Click View tab-> Remove hidden extensions for known file types [hide extensions
For known file types]-> click Apply [apply]-> click OK [OK].

The extension of all files is displayed.

[Use steps]
1. Open Notepad [Notepad.exe] Program
2. According to your requirements, enter the following a B C one of the code


A. The easiest code to play video/audio continuously

<ASX Version = "3.0" >

<Entry>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 1"/>
</Entry>

<Entry>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 2"/>
</Entry>

<Entry>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 3"/>
</Entry>


Add the same number of video audio you want below

</ASX>


B. A continuous play video/audio code that can display the name of the song/actor


<ASX Version = "3.0" >

<Entry>
<Title> here Add title 1 video/music name and so on </Title>
<Author> actor/singer name 1</author>
<Copyright> Copyright Ownership 1</copyright>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 1"/>
</Entry>


<Entry>
<Title> here Add Title 2 video/music name and so on </Title>
<Author> actor/singer name 2</author>
<Copyright> Copyright Ownership 2</copyright>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 2"/>
</Entry>


<Entry>
<Title> here Add title 3 video/music name and so on </Title>
<Author> actor/singer name 3</author>
<Copyright> Copyright Ownership 3</copyright>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 3"/>
</Entry>


Add the same number of video audio you want below

</ASX>

C. Can display your own logo or advertising and song name/actor name of the continuous play video/audio code

<ASX Version = "3.0" >


<Entry>
<Title> here Add title 1 video/music name and so on </Title>
<Author> actor/singer name 1</author>
<Copyright> Copyright Ownership 1</copyright>
<banner href = "Your personalized picture in the network address 1" >
</Banner>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 1"/>
</Entry>


<Entry>
<Title> here Add Title 2 video/music name and so on </Title>
<Author> actor/singer name 2</author>
<Copyright> Copyright Ownership 2</copyright>
<banner href = "Your personalized picture in the network Address 2" >
</Banner>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 2"/>
</Entry>


<Entry>
<Title> here add title video/music name and so on </Title>
<Author> actor/singer name </Author>
<Copyright> Copyright </Copyright>
<banner href = "Your personalized picture in the network address 3" >
</Banner>
<ref href = "video audio address at the beginning of HTTP or MMS with Mp3/wma/wmv/wav/midi/mpg/mpeg/avi end 3"/>
</Entry>


Add the same number of video audio you want below

</ASX>

3. Save the file as a [save as] file name. wma format, encoding is stored in the default format.

4. Upload file name. wma to your personal home page space or directly read the network storage space.

5. In the URL of the PowerToy media playback module, fill in the address of the created file on the network, for example:
Http://www.dgzxhome.net/belem/music.wma

6. Display mode [] Select Full, you can choose to play automatically [auto Start]

7. Press Save button

8. Preview your spaces, at this point, the Windows Media Player module in spaces has been able to continuously play video and audio, in accordance with
You fill in the order of the file address of the media format is different, even play music after playing video!

[Considerations]

1. Please be assured that your video/music address is indeed available and in strict accordance with "http or MMS start with mp3/wma/wmv/wav/midi/mpg/
Mpeg/avi end of the video audio address "condition, otherwise there will be no playback problems." Also, please make sure that the address you can get after uploading is
"Video audio address beginning with HTTP or MMS at end of Mp3/wma/wmv/wav/midi/mpg/mpeg/avi", otherwise the 7th step
Empty the address in.

2. In order to mix video and audio, I recommend Notepad to change the storage format to. wma, in fact, other eligible conditions can also be. wmv or. mp3
, and so on. Because it is deceptive WMP, the player will eventually play according to the actual media format inside the file.

3. Personal Space/Network storage problem, please see the end of the file interface.

4. Regarding the advertisement article/own logo, the suggestion uses the certain aspect ratio the static picture or the animation.

5. There are users who often ask why they do not support Rm/rmvb/mov and other formats, as real networks and Apple's competitors, Microsoft
Simply cannot be so generous, so can support public standards of audio and video files such as Mpeg1-4 is good, real/quicktime, etc.
To expect. As for Adobe[macromedia] 's flash because of <embed> and <boject> label is not safe, does not support extenuating circumstances.

Demo Address:
http://spaces.msn.com/members/mylover2001/
Method

Single Song broadcast

Can be played continuously, directly into the profile on it.
<embed Src=http://player.toodou.com/dl//www.toodou.com-4813-908-xiangqi.mp3 width=220 height=60 type=audio/mpeg Loop= "true" autostart= "true" >
This music is Han "think", this address can be changed.



This is a music code that can broadcast 1000 songs in a row.
<div id=di></iframe> ' ">


Real Player Code
Video code
<object classid= ' CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA ' height=288 id=video1 width=305
<param name= ' _extentx ' value= ' 5503 ' >
<param name= ' _extenty ' value= ' 1588 ' >
<param name= ' AUTOSTART ' value= ' 0 ' >
<param name= ' SHUFFLE ' value= ' 0 ' >
<param name= ' PREFETCH ' value= ' 0 ' >
<param name= ' nolabels ' value= ' 0 ' >
<param name= ' SRC ' value= ' video address ' >
<param name= ' CONTROLS ' value= ' Imagewindow,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>
Or
<div align=center>
<object Id=player height=400 width=500
CLASSID=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA viewastext><param name= "_ExtentX" VALUE= "13229" >< PARAM name= "_extenty" value= "10583" ><param name= "AUTOSTART" value= "0" ><param name= "SHUFFLE" value= "0" ><param name= "PREFETCH" value= "0" ><param name= "nolabels" value= "0" ><param name= "CONTROLS" value= " Imagewindow "><param name=" CONSOLE "value=" _master "><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><BR>
<object Id=player2 height=32 width=500
CLASSID=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA viewastext><param name= "_ExtentX" VALUE= "13229" >< PARAM name= "_extenty" value= "847" ><param name= "AUTOSTART" value= "-1" ><param name= "SHUFFLE" value= "0" > <param name= "PREFETCH" value= "0" ><param name= "nolabels" value= "0" ><param name= "SRC" value= "video Address" > <param name= "CONTROLS" value= "ControlPanel" ><param name= "CONSOLE" value= "_master" ><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><BR>
<script language=javascript>function fullscreen () {document. Player.setfullscreen ();} </SCRIPT>
<input Onclick=javascript:fullscreen () Type=button value= full screen playback ></DIV>
Style:

Code for Real Music

' <object id= ' video2 ' width= ' height= ' classid= ' CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA ' >
<param name= ' _extentx ' value= ' 9657 ' >
<param name= ' _extenty ' value= ' 847 ' >
<param name= ' AUTOSTART ' value= '-1 ' >
<param name= ' SHUFFLE ' value= ' 0 ' >
<param name= ' PREFETCH ' value= ' 0 ' >
<param name= ' nolabels ' value= ' 0 ' >
<param name= ' SRC ' value= ' song address ' >
<param name= ' CONTROLS ' value= ' Statusbar,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= ' #000000 ' >
</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.