Posts Subscribe to This BlogComments

Follow Us

New Articles

1 2 3 4 5

Minggu, 29 Mei 2011

Membuat Background Mp3 di Blog

Nih sahabat blogger ada script untuk Membuat Background Mp3 di Blog kalian, jika kalian ingin mncobahnya mudah kok cara memasangnya. Cara ini sudah saya praktekan langsung, diblog ini dan hasilnya memuaskan. Tapi saya tidak memasangnya dikarnakan blog saya menjadi berat karna adanya Background Mp3 ini jika kalian ingin mencobanya silakan lihat cara membuatnya dibawah ini:
1. Login dulu diBlogger kalian
2. Klik Rancangan --> Elemen Laman --> Tambah Gadget
3. Pilih HTML/JavaScrip dan Copy Scrip dibawah ini, Pastekan didalamnya!!!

<script type="text/javascript">
<!--
function get_mimeType(filepath) {
var theExtension = filepath.substr(filepath.lastIndexOf('.')+1, 3);
switch(theExtension.toLowerCase())
{

case "m3u":
mimeType = "audio/mpegurl";
///mimeType = "audio/x-mpegurl";
break;
case "mp3":
mimeType = "audio/mpeg";
break;
default:
mimeType = "application/x-mplayer2";
}
return mimeType;
}

var visitorOS;
// Get Operating System
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1
if (isWin) {
visitorOS="Windows";
} else {
visitorOS="Other";
}
var filepath = "http://www36.indowebster.com/419e5a1ce600bbf1b92d67ce9a4f3ecc.mp3";
var width = "0";
var height = "0";
var bgcolor="#000000";
var autostart ="1";
var autoplay="true";
var loop = "true";
var PlayCount = "1000";
var volume = "100";

var mimeType = "audio/mpeg";
var objTypeTag = "application/x-mplayer2";
mimeType = get_mimeType(filepath);
if (visitorOS != "Windows") {
objTypeTag = mimeType;
};
var htmlPlayer = "";
htmlPlayer = htmlPlayer + "<object width='" + width + "' height='" + height + "'>";
htmlPlayer = htmlPlayer + "<param name='src' value='" + filepath + "'>
";
htmlPlayer = htmlPlayer + "<param name='type' value='" + objTypeTag + "'>
";
htmlPlayer = htmlPlayer + "<param name='autostart' value='" + autostart + "'>
";
htmlPlayer = htmlPlayer + "<param name='showcontrols' value='1'>
";
htmlPlayer = htmlPlayer + "<param name='showstatusbar' value='1'>
";
htmlPlayer = htmlPlayer + "<param name='loop' value='" + loop + "'>
";
htmlPlayer = htmlPlayer + "<param name='volume' value='" + volume + "'>
";
htmlPlayer = htmlPlayer + "<embed src ='" + filepath + "' type='" + objTypeTag + "' autoplay='" + autoplay + "' autostart='" + autostart + "' width='" + width + "' height='" + height + "' controller='1' showstatusbar='1' PlayCount ='" + PlayCount + "' volume='" + volume + "' loop='" + loop + "' bgcolor='" + bgcolor + "' kioskmode='true'>";
htmlPlayer = htmlPlayer + "</embed></object>";
document.writeln (htmlPlayer);
// -->
</script>
4. Simpan Template kalian dan selesai coba lihat hasilnya dibog kalian!!!

Catatan :
Tulisan yang berwarna PUTIH bisa kalian ganti dengan alamat Url mp3 kalian!!! hehehe,...

Related Post



0 komentar:

Posting Komentar

Translate

New Tutorial

Masukan Email Anda Untuk Berlangganan

Delivered by FeedBurner