Script for background music
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
-
1
we create such code
<audio autoplay="autoplay" loop="true">
<source src="http://your website/audio/your melody.mp3">
</audio>
2
create a folder
audio
and add a melody there -
-
не проще сделать свое радио - я к примеру сделал подключив свой сервер где загрузил плэй лист программа называется Radioboss заливаем списки в нее и спокойно вещаем именно на сайте ту музыку какую пожелаем можно назначить диджея ))) код радио который работает с Radioboss я написал
php
Display Spoiler
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>▶ MP3 Player</title>
<style type="text/css">
body {
background-image: url(ваш адрес/styles/Aluminoid_PRO/theme/images/background.jpg);
background-attachment: fixed;
}
</style>
</head>
<body style="margin:40px; text-align:center;">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="320" id="mp3player"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" >
<param name="movie" value="http://ваш site/radio/mp3player.swf?config=http://ваш site/radio/config.xml&file=http://terras-nova.com/radio/playlist.xml" />
<param name="wmode" value="transparent" />
<embed src="http://ваш site/radio/mp3player.swf?config=http://terras-nova.com/radio/config.xml&file=http://ваш site/radio/playlist.xml" wmode="transparent" width="300" height="320" name="mp3player"
type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</body>
</html>
xml - плэй лист
Display Spoiler <?xml version="1.0" encoding="UTF-8" ?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<title>Sample XSPF Playlist</title>
<info>jeroenwijering.com/?item=Flash_MP3_Player</info>
<trackList>
<!-- You need one of these blocks of code for each song in your playlist. -->
<!-- You can simply copy-paste one of these blocks to add a song. -->
<!-- <track> -->
<!-- here you insert your song's title -->
<!-- <annotation>The Stroica</annotation> -->
<!-- here you insert the location of your mp3 file -->
<!-- <location>mp3/Thunderstruck.mp3</location> -->
<!-- here you insert a link for this song, or leave it blank for no link -->
<!-- <info>thestroica.ru</info> -->
<!-- here you insert the location of the cover art jpg, or leave it blank -->
<!-- <image>images/stroica.png</image> -->
<!-- </track> -->
<!-- this is the end of the code for one song -->
<!-- // thestroica.ru for pirat.ca // -->
<!--
<track>
<annotation>The Stroica</annotation>
<location>mp3/Thunderstruck.mp3</location>
<info>thestroica.ru</info>
<image>images/stroica.png</image>
</track>
-->
<track>
<annotation>PiratRadio</annotation>
<location>50.7.71.219:7195/;?icy=http</location>
<image>images/pirat.png</image>
</track>
<track>
<annotation>Rock Fm 95.2</annotation>
<location>stream02.media.rambler.ru/rock128.mp3</location>
<image>images/rockfm_95_2.png</image>
</track>
<track>
<annotation>Rock Arsenal</annotation>
<location>online.rockarsenal.ru:8000/rockarsenal</location>
<image>images/rockarsenal.png</image>
</track>
<track>
<annotation>Radio Paradise</annotation>
<location>stream-tx4.radioparadise.com:9000/rp_128.mp3</location>
<image>images/rparadise.png</image>
</track>
<track>
<annotation>Radio ROKS</annotation>
<location>online-radioroks.tavrmedia.ua/RadioROKS</location>
<image>images/radioroks_ua.png</image>
</track>
<track>
<annotation>Eldoradio</annotation>
<location>emgspb.hostingradio.ru/eldoradio128.mp3</location>
<image>images/eldoradio.png</image>
</track>
<track>
<annotation>BSB-Chillout</annotation>
<location>194.58.96.22:8050/radio</location>
<image>images/bsb.png</image>
</track>
<track>
<annotation>Energy</annotation>
<location>ru2.101.ru:8000/v1_1?setst=</location>
<image>images/energy.png</image>
</track>
<track>
<annotation>Maximum</annotation>
<location>maximum.fmtuner.ru/;stream.nsv</location>
<image>images/maximum.png</image>
</track>
<track>
<annotation>Radio Zenit</annotation>
<location>stream.radiozenit.ru:8000/mp3</location>
<image>images/radio_zenit.png</image>
</track>
<track>
<annotation>Dorognoe Radio</annotation>
<location>dorognoe.hostingradio.ru:8000/dorognoe</location>
<image>images/doroga.png</image>
</track>
<track>
<annotation>Radio Chanson</annotation>
<location>icecast.chanson.cdnvideo.ru:8000/chanson_hq_pm.mp3</location>
<image>images/shanson.png</image>
</track>
<track>
<annotation>Super Diskoteka 90-x</annotation>
<location>online.radiorecord.ru:8102/sd90_128</location>
<image>images/superdisko.png</image>
</track>
<track>
<annotation>Zaycev.net</annotation>
<location>radio.zaycev.fm:9002/ZaycevFM(128)</location>
<image>images/zaycev.png</image>
</track>
<track>
<annotation>Unistar 99.5 FM (by)</annotation>
<location>unistar.by:8000/unistar-128kb</location>
<image>images/unistar.png</image>
</track>
<track>
<annotation>Forexexpo FM</annotation>
<location>radio.forexexpo.com:8000/mp3_forex</location>
<image>images/forexexpo.png</image>
</track>
<track>
<annotation>Svyaznoy Radio</annotation>
<location>svyaznoy.hostingradio.ru:8010/svyaznoy_radio</location>
<image>images/svyaznoy.png</image>
</track>
<track>
<annotation>ETVNET Disco USSR</annotation>
<location>icecast.etvnet.com:8000/discoussr128.mp3</location>
<image>images/etvnet.png</image>
</track>
<track>
<annotation>D-FM</annotation>
<location>dfm.fmtuner.ru/;stream.nsv</location>
<image>images/dfm.png</image>
</track>
<track>
<annotation>Avto Radio</annotation>
<location>89.20.132.26:8000/v3_1</location>
<image>images/avtoradio.png</image>
</track>
<track>
<annotation>Horoshee FM</annotation>
<location>radio.horoshee.fm:8000/mp3</location>
<image>images/horoshee.png</image>
</track>
<track>
<annotation>YUM FM</annotation>
<location>yumfm128.streamr.ru</location>
<image>images/yum.png</image>
</track>
<track>
<annotation>STR FM</annotation>
<location>radiostrfm.no-ip.biz:8000/live</location>
<image>images/str.png</image>
</track>
<track>
<annotation>RadioCrazy Classical</annotation>
<location>friends-of-radius.ethz.ch:8000/radiocrazy-classical.mp3</location>
<image>images/radiocrazy.png</image>
</track>
<track>
<annotation>Cherry Fresh Relax</annotation>
<location>online.cherryfresh.ru:8000/live_128</location>
<image>images/cherryfresh.png</image>
</track>
</trackList>
</playlist>
xml - config
Display Spoiler
<mp3config>
<!-- choose here if you want the mp3player to automatically start and shuffle songs (true or false) -->
<autostart>true</autostart>
<shuffle>false</shuffle>
<!-- choose the mp3player repeat mode (none, one, all or list (plays the entire playlist once)) -->
<repeat>none</repeat>
<!-- choose the mp3player volume (0 to 100) -->
<volume>50</volume>
<!-- choose here if you want to show the display and playlist (true or false) -->
<showdisplay>true</showdisplay>
<showplaylist>true</showplaylist>
<!-- choose here in what frame you want links to be opened (_blank, _self, _top or a framename) -->
<linktarget>_blank</linktarget>
<!-- choose the mp3player colors (hexadecimal, from 0x000000 to 0xffffff) -->
<backcolor>0xffffff</backcolor>
<frontcolor>0x333333</frontcolor>
<lightcolor>0xcc0000</lightcolor>
<!-- you can set a JPG as the background here to skin the mp3player (url to the jpg file) -->
<jpgfile>sh.png</jpgfile>
<!-- (for webmasters) URL of a script, called on start and completion of a song -->
<!-- the following vars are sent with POST: title, file, identifier, action ('start' or 'complete') -->
<callback></callback>
</mp3config>
стили вывода оформляем самиThe post was edited 3 times, last by Shandow: в списки так же включаем свой радио канал назначаем его основным тут пример как делается стандратно ().
-
Share
- Facebook 0
- Twitter 0
- Google Plus 0
- Reddit 0
-
Similar Threads