Start your musical journey by discovering amazing songs and artists
Loading devices…
No output devices found. Use a supported browser (e.g. Chrome) for device selection.
Names may show as "Output 1", "Output 2" unless this site has microphone access.
Okay
some of you might have noticed already, some not.
After a month of testing on the beta server, electrobel- 2.1 (codenamed 'Harpic') is online.
New Features : *** Ajax-Style page updating.**
For those that know of web2 technologies; Ajax is an Asynchronous xml based javascript protocol. Which basically allows the webpage to be modified after it has been loaded. Most well-known sites using this is google-maps :)
But i am not using ajax. 1/ Browser incompatibilites (having to use an xml activeX in explorer, and something else in firefox, etc....) 2/ I had already developped something similar ages ago 3/ i like to control things
So instead of using a polling javascript using an xml channel ... i'm using a vframe, basic write-to-div javascript command, and a meta refresh. Advantages : 100% compatible Disadvantages: The browser shows when it's reloading, and IE makes that awfull TICK sound (unless you disabled that sound).
In a couple of days you'll have an option to activate or not that feature. (you don't always need to see what is happening on the site)
*** Flash Player 3.1beta**
Main new feature, .... enqueuing straight from the muzik page.
go to muzik page, click on LISTEN so far nothing special, the flash player opens, loads, plays ... finishes loading the song ... now keep that flash player open, and click on another LISTEN (to another song).... nothing happens ?? you sure ? the flashplayer popups back up, and adds that new song to it's playlist. now it'll enqueue and go to the next one when this one is finished.
this doesn't sound like much of a technological challenge ...
but i don't know of ANY website that managed to pull a stunt like this ... the difficulty being that to re-use an existing window opened in javascript, you must know it's handle, and when you go from one page to another, that handle is lost ... but i found a way to go around that problem ... making it possible to go back and forth and enqueue songs from different pages.
so ..
to summarize.
1/ no more need to refresh the frontpage to see if a reply has been posted on forum/wall/comments .. or to see who is online ... they will update automatically after X seconds (so far been set to 20sec).
2/ you can now enqueue songs in the flash player, so if you wish to listen to multiple songs, just click on them one at a time to add them to the flash-playlist
How did you manage to keep the handle? Through a session?
Good job anyway.
Had to laugh at the Harpic codename :)
no
because it's not a handle like an ascii name, it's more like an address pointer ...
and you just can't seem to save that..
What i do, is use a kind of 'bug/feature' in javascript open window :)
when you do a window.open you give a window handle. if that window already exists, it's re-used (and the handle is returned). But then the window changes url .. which is no good .. but now, if you window.open with an empty url ... the url is not changed, and the handle is returned !!!
now the rest of the code just figures out if the window existst or not and is indeed showing the flashplayer, and then once handle is available sends the enqueue command to the flash :)
var newwindow = '';
function dothis()
{
win = popitup('');
var wurl = ''+win.location;
if(wurl.indexOf('mp3') == -1)
{
win.location ='/flash_mp3.php?song=<?=$_GET["song"]?>';
}
else
win.check_enqueue('<?=$_GET["song"]?>');
return false;
}
function popitup(url) {
if (!newwindow.closed && newwindow.location)
{
newwindow.SendDataToFlashMovie('<?=$_GET["song"]?>');
}
else
{
newwindow=window.open(url,'flash_player','height=250,width=600');
if (!newwindow.opener) newwindow.opener = self;
}
if (window.focus)
{
newwindow.focus()
}
return newwindow;
}
Yes the code is not the best in the world .. popitup should be defined inside dothis() :) etc etc.... and the var wurl = ''+win.location; it's the only way i found to convert win.location to a string value ... somehow the (string) win.location didn't work ...
so i'm using a string addition to force the intepreter to do a type change ... yuck yeah i'm showing the code for those who wanna see it ..
it's javascript .. it's not hard to find in the webpage code :)
an early version of the 'song enqueue' existed more or less ...
but it consisted of polling ... (the flash asked the server every X seconds if a new song was to be added in playlist) and songs where added using server-side session variables
But in most cases this would just add load to the server, as 99% of those requests would be useless (in rare cases a track would be enqueued). So i had to use an 'interrupt' type call :)
so first challenge was communication from JS to Flash then communicating from another page then communicating from another page when that parent page changed ..
last point was the toughest, and took a while to figure out and a lot of googling, to finally find no one on google with a solution ^^
He-Man!
Zark is the MASTER OF THE UNVERSE!
Respect... these changes definately kick ass!!!
Not only Skeletors by mine too! ;)
Beta — data may be reset. Beta