Grow your CSS skills. Land your dream job.

Music

  • # November 8, 2011 at 1:04 am

    I am brand new to CSS and I was wondering if there was a way to insert music into a website. What I’m looking for is the type of music you hear right away and continuously when you go to a movie website. It plays when you enter the website and it just loops until you close the website. Like this website (once you get past the trailer) http://wwws.warnerbros.es/crazystupidlove/index.html. Thanks to anyone who can help me!

    # November 8, 2011 at 4:02 am

    Autoplaying music is one of the worst features of the web.

    There is no way to do this with just CSS either, you need a combination of HTML and most likely Flash or JavaScript.

    # November 8, 2011 at 7:25 am

    I agree with @TT_Mark, it’s very annoying. You could have a look at a HTML5 audio player.

    Rob
    # November 8, 2011 at 8:53 am

    I would also voice my opinion on this – don’t do it. Add a player people can interact with for sure, but having music start up when browsing is a huge no no. I would close the site immediately.

    Remember lots of people listen to their own music while browsing…

    # November 8, 2011 at 12:45 pm

    Adding my $0.02, I’d like to say “don’t do it” as well. Having autoplay audio is an instant tab killer for me, unless I absolutely have to use the site. Having the option might be nice, like Robskiwarrior said, but don’t make it play by default. If, for some reason you absolutely must put autoplay music on the site, make sure that your users can easily see (and kill) the player. I listen to music while browsing, and I find it absolutely infuriating when I open up a couple tabs and have music start playing in one of them, and not be able to easily tell by looking at the pages which one the music’s coming from. Making the player hidden and inaccessible, and you’ve earned my eternal enmity.

    The only reason I could see making audio autoplay is if it’s something like a podcast episode’s page, and you make sure that the user knows the autoplay is coming, and they can still disable it easily. That’s about it, however, and I personally would still prefer to start the audio manually.

    # November 8, 2011 at 10:32 pm

    Super sneak preview: http://css-tricks.com/examples/GroovesharkPlayer/

    (No guarantees how long that will be there or if it will stay the same)

    And yea. autoplay = generally bad. option to play music = sometimes cool.

    # November 9, 2011 at 1:00 pm

    Unfortunately I had a client (Afghan Restaurant web site) just yesterday who demanded music be installed on his site, and have it auto-playing. There was nothing I could do, except give him my insight on why it is a bad idea, but he didn’t care. I searched high and dry yesterday looking for a nice html5 audio player “skinned” plugin (cross browser compatible) without any luck. I ended up using “jplayer” and used the audio he referenced. I will try custom skinning the player later today.

    I can only hope this customer will receive many complaints on this audio auto-playing audio feature so I can remove it in the future lol.

    # November 10, 2011 at 6:51 am

    I totally agree with them crashgordon2390. Music can sometimes be annoying. We choose the music we want to hear.

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".