Busco la canción que quiero añadir a mi lista, Nothing else matters - Metallica
- http://www.goear.com/listen.php?v=bf5be72

Con las siguientes canciones lo mismo Runaway - Linkin Park
- http://www.goear.com/listen.php?v=fd70135
De los enlaces, guardo el código del fichero: [bf5be72, fd70135]
Estos códigos lo añado a una pequeña lista de reproducción; así de simple.
- Fichero MyGoearPlayer.html
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content=" hack.spartak"> <title>My Goear Player</title> <style type='text/css'> INPUT.actionButtonBlog { background-color: #99aadd; font-size: 7pt; font-family: "verdana"; border-style: groove; border-width: thin; border-color: #e1771e; cursor: pointer; color: #000000; } A.actionLink { background-color: #ffffff; font-size: 7pt; color: #000000; } P.note { background-color: #ffffff; font-size: 7pt; font-family: "verdana"; color: #000000; } </style> <script LANGUAGE="JavaScript">
// variable temporal para cargar el objeto flash con una canción
var tmpSong = 'bf5be72';
// añade de forma dinámica las canciones al reproductor
function _addPlayerGoearSong(song) {
var objGoear = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase=' http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cabversion=6,0,29,0' width='366' height='75'><param name='movie' value=' http://www.goear.com/files/localplayer.swf'/><param name='FlashVars' value='file=" + song + "' /><param name='quality' value='high' /><embed src=' http://www.goear.com/files/localplayer.swf' flashvars='file=" + song + "' quality='high' pluginspage=' http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='366' height='75'></embed></object>";
var p1 = document.getElementById('p_player');
if (p1 != null) p1.parentNode.removeChild(p1);
var d1 = document.getElementById("_playerGoear");
var nc = document.createElement("p");
nc.setAttribute('id','p_player');
nc.innerHTML = objGoear;
d1.appendChild(nc);
tmpSong = song;
}
// Visualiza capa del reproductor
function _showPlayer(song) {
var sh = document.getElementById('_playerLayer').style.display;
if (sh == 'none') {
document.getElementById('_playerLayer').style.display = 'inline';
if (song == '') song = tmpSong;
_addPlayerGoearSong(song);
}
}
// Oculta capa del reproductor
function _hidePlayer() {
document.getElementById('_playerLayer').style.display = 'none';
}
// Estilo del botón
function colorOver(obj) {
obj.style.background = '#e1771e';
obj.style.color = '#000000';
}
// Estilo del botón
function colorOut(obj) {
obj.style.background = '#99aadd';
obj.style.color = '#000000';
}
</script>
</head>
<body bgcolor="#000000">
<input class="actionButtonBlog" type="button" value="Canciones del Blog" onClick="javascript:_showPlayer('');" onmouseover="javascript:colorOver(this);" onmouseout="javascript:colorOut(this);" />
<div id="_playerLayer" style='display:none; float: left; font-family: verdana; color: #e1771e; background: #ffffff; width:400px; height:auto; z-index:0; border: solid 1px #e1771e;overflow: auto'>
<div id="_playerGoear">
</div>
<div id='_playerList' style='font-family: verdana; color: #e1771e; background: #ffffff; width:auto; height:90px;overflow: auto;z-index:5;'>
<ul>
<li>
<a class='actionLink' href='javascript:_addPlayerGoearSong("bf5be72");'>Nothing else matters - Metallica</a>
</li>
<li>
<a class='actionLink' href='javascript:_addPlayerGoearSong("fd70135");'>Runaway - Linkin Park</a>
</li>
</ul>
</div>
<center>
<p>
<input class="actionButtonBlog" type="button" value="Cerrar" onClick="javascript:_hidePlayer();" onmouseover="javascript:colorOver(this);" onmouseout="javascript:colorOut(this);" />
</p>
<p class="note" align="right">
player by hack.spartak
</p>
</center>
</div>
</body>
</html>

-------
_genial, el único problema es cuando cambien el reproductor, el tipo de código de los ficheros o el servidor. Seguiré investigando... a disfrutar... ;-)
-------
No hay comentarios:
Publicar un comentario