Treehouse: Grow your CSS skills. Land your dream job.

Non stop mp3 player

  • # May 3, 2010 at 6:16 am

    [link deleted]

    I want the mp3 flash player in the top of the site never stop playing the music while browsing other pages (inside the page). What’s the best way to do this? Iframe? Ajax?


    # May 3, 2010 at 7:12 am

    The "best" way to do it is have a small pop up window that your user can open then use the player in it.

    Iframes and aJax – I would go with ajax before an iframe but both are pants really.

    As a word of advice on a user interaction front – most people when browsing the web are listening to music – so do not autoplay your site’s music when the user loads the window – because if it clashes with their music it will sound terrible and their first reaction is to close your window. This is especially relevant for a site promoting music, as the visitors would most definitely be "muso’s" (english slang for music lovers…) listening to something :)

    # May 3, 2010 at 7:45 am

    Yeah, i think popup is the best way. Already implemented!

    Thanks for your help. :)

    # May 3, 2010 at 10:03 am

    awesome :-)

    # May 4, 2010 at 11:21 am

    Another question..


    It will open the poup window every time that body is loaded, so i want to implement a function that:
    – verifies if the popup is already opened (to not reload)
    – and load-it only 1 time in one session (for the people that closed it)


    # May 4, 2010 at 12:43 pm

    I would personally let the user open the window… it can be seen as a little rude if you force it on people :)

    # May 4, 2010 at 12:52 pm

    Yeah, I agreed with you, but it was a feature request by the client.

    I write a little code to my question above.

    < ?php $firstVisit = 'false'; if(!isset($_COOKIE['welcome']) && empty($_COOKIE['welcome'])){ setcookie("welcome", "true", time()+1000); $firstVisit = 'true'; } ?>

    } else {

    echo “>”; }?>

    Its working, thanks.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.