Sebenarnya untuk memasang musik pada blog itu cukup mudah, khususnya pada Platform Blogger. Untuk memasangnya bisa menggunakan format file musik seperti MP3, WMA, MIDI, maupun format musik populer lainnya. Langsung saja, berikut ini langkah - langkahnya.
- Login ke Blogger.com
- Pilih 'Rancangan"
- Pilih "Add Gadget"
- Kemudian klik "HTML/JavaScript" dan masukkan script kodenya dibawah ini
<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 "asx":
mimeType = "video/x-ms-asf";
break;
case "asf":
mimeType = "video/x-ms-asf";
break;
case "wax":
mimeType = "audio/x-ms-wax";
break;
case "wvx":
mimeType = "video/x-ms-wvx";
break;
case "pls":
mimeType = "audio/x-scpls";
break;
case "smil":
mimeType = "application/smil";
break;
case "smi":
mimeType = "application/smil";
break;
case "wav":
mimeType = "audio/x-wav";
break;
case "aif":
mimeType = "audio/x-aiff";
break;
case "wma":
mimeType = "audio/x-ms-wma";
break;
case "mid":
mimeType = "audio/mid";
break;
case "mp3":
mimeType = "audio/mpeg";
break;
case "aac":
mimeType = "audio/aac";
break;
case "m4u":
mimeType = "video/x-mpegurl";
break;
case "mp4":
mimeType = "video/x-mpeg";
break;
case "wmv":
mimeType = "video/x-ms-wmv";
break;
case "ogg":
mimeType = "application/ogg";
break;
case "ra":
mimeType = "audio/x-pn-realaudio-plugin";
break;
case "ram":
mimeType = "audio/x-pn-realaudio-plugin";
break;
case "rm":
mimeType = "audio/x-pn-realaudio-plugin";
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://www.malingsia.com/malingsia2.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>
<!--
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 "asx":
mimeType = "video/x-ms-asf";
break;
case "asf":
mimeType = "video/x-ms-asf";
break;
case "wax":
mimeType = "audio/x-ms-wax";
break;
case "wvx":
mimeType = "video/x-ms-wvx";
break;
case "pls":
mimeType = "audio/x-scpls";
break;
case "smil":
mimeType = "application/smil";
break;
case "smi":
mimeType = "application/smil";
break;
case "wav":
mimeType = "audio/x-wav";
break;
case "aif":
mimeType = "audio/x-aiff";
break;
case "wma":
mimeType = "audio/x-ms-wma";
break;
case "mid":
mimeType = "audio/mid";
break;
case "mp3":
mimeType = "audio/mpeg";
break;
case "aac":
mimeType = "audio/aac";
break;
case "m4u":
mimeType = "video/x-mpegurl";
break;
case "mp4":
mimeType = "video/x-mpeg";
break;
case "wmv":
mimeType = "video/x-ms-wmv";
break;
case "ogg":
mimeType = "application/ogg";
break;
case "ra":
mimeType = "audio/x-pn-realaudio-plugin";
break;
case "ram":
mimeType = "audio/x-pn-realaudio-plugin";
break;
case "rm":
mimeType = "audio/x-pn-realaudio-plugin";
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://www.malingsia.com/malingsia2.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>
Keterangan :
Silahkan ganti kode URL yang berwarna merah dengan alamat URL file musik dari hosting yang Anda punya. Jika sudah, klik tombol simpan dan lihat hasilnya.
Jika memory lagu terlalu besar ikuti tutorialnya di sini Mengkompress Lagu MP3
Semoga bermanfaat!
2 comments:
makasi yah atas infonya .
berguna bnget :)
jangan lupa follback yah .
aku udah follow kamu .
@♥ widt 'wiwid ♥
thx ya, oke oke gw follow back
Posting Komentar
Jika Anda Ingin Berkomentar Mohon Di Cantumkan Nama Anda
Jangan Lupa Komenar Dan Follow ya !!!