Código Javascript:
Ver original
var thr; function radioPlayer_destroy() { $('#hidden_player').html(''); } function fixfirefox(obj) { thr = document.getElementById(obj['id']); }; //initiate radio function tuhabboPlayer() { //create flash object http://67.212.165.162:7090 var thradio = new SWFObject('http://tuhabbo.com/v5/contenidos/stats_radio/flash-player/player.swf', 'player', '0', '0', '9.0.124'); thradio.addVariable('file', 'http://67.212.165.162:7090/;stream.nsv'); thradio.addVariable('type', 'sound'); thradio.addVariable('duration', '99999'); thradio.addVariable('volume', '24'); thradio.addVariable('autostart', 'true'); thradio.addVariable('playerready', 'fixfirefox'); thradio.write('hidden_player'); } //make slider, run radio if not disabled $(document).ready(function(){ $("#volume").slider({ orientation: 'vertical', create: function(event, ui) { $(this).slider("value", 0 ) }, slide: function(event, ui) { thr.sendEvent('volume', $(this).slider('value')); }, stop: function(event, ui) { thr.sendEvent('volume', $(this).slider('value'));} }); tuhabboPlayer(); });
y el HTML:
Código HTML:
<div id='radio_player'> <div style='position: absolute; top: -10px;' id="hidden_player" class="hidden_player"></div> <div id='radio_left'> <div id='volume_controls'> <div id='volume_up'></div> <div id='volume_container'> <div id='volume' style='height: 37px;'></div> </div> <div id='volume_down'></div> </div> </div> <div id='radio_controls'> <span onclick="radioPlayer();"> Play </span> <span onclick="radioPlayer_destroy();"> Pause </span> </div> </div> </div>
Código Javascript:
Ver original
create: function(event, ui) { $(this).slider("value", 0 ) }, slide: function(event, ui) { thr.sendEvent('volume', $(this).slider('value')); }, stop: function(event, ui) { thr.sendEvent('volume', $(this).slider('value'));}
Espero que puedan ayudarme, gracias