treehouse : what would you like to learn today?
Web Design Web Development iOS Development

play-sound-on-hover does not work on host PC

  • Hi,

    I followed and implemented the sound trick explained here:

    http://css-tricks.com/play-sound-on-hover/

    and got it to work nicely on my laptop. However, when scp'ing the files etc to the internet server, the trick does not work anymore, even though I use the same browser.

    I guess this must be related to Apache on the server. If so, is there anything I can do on my end to fix it? Maybe a config line?

    thanks
  • Have you got a link to this on your server?
    It could be possible that the server is sending the wrong mime type for the file
  • thanks for the keyword... I added this to my htaccess

    AddType video/ogg .ogv
    AddType video/mp4 .mp4
    AddType audio/mpeg .mp3
    AddType audio/x-mpegurl .m3u
    AddType audio/x-ms-wma .wma
    AddType audio/x-ms-wax .wax
    AddType video/x-ms-asf .asf
    AddType video/x-ms-asx .asx
    AddType video/x-ms-wmv .wmv
    AddType video/x-ms-wvx .wvx
    AddType video/x-ms-wmx .wmx
    AddType application/ogg .ogm
    AddType application/ogg .ogg

    and now this "bug" is fixed, along with other problems.