Grow your CSS skills. Land your dream job.

Playing audio on page + mouse tracking

  • # August 29, 2013 at 3:46 am

    Hi there,

    I’m not sure where to start with this so I was hoping someone could point me in the right direction.

    I was just playing about with a parallax image and I thought it would be interesting to look at playing audio on the page.

    Playing an mp3 would be easy enough (i assume), but I wondered about having 2 different audio files. One which plays when your mouse is on the left side of the screen and another which plays when your mouse is on the right side of the screen. With the two fading in the middle, kinda like a range.

    Has anyone experienced anything like this or have any ideas on where to start?

    Thanks,
    Steve

    # August 29, 2013 at 3:51 am

    It’s an old debate but in my experience most users really dislike music playing BY DEFAULT on websites.

    That’s not to say sound does not have it’s place but only when the user requests it.

    Anyway, my 2c

    As for two files running at the same time (essentially), it guess it shouldn’t be that hard but controlling the volume of BOTH based on mouse position…sounds like it would be a memory hog.

    # August 29, 2013 at 4:07 am

    Hi @Paulie_D, totally agree with you.

    Luckily I have a little bit of down time at work so I’m just doing a bit of R&D – and pushing things a bit! Its not for a project as such, just trying to learn some new stuffz.

    Do you think it would be achieved using javascript or canvas?

    Thanks,
    Steve

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

You must be logged in to reply to this topic.

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