adding audio to a html dreamweaver site possible?

Discussion in 'Web Design and Development' started by SkyStudios, Dec 13, 2011.

  1. SkyStudios macrumors member

    SkyStudios

    Joined:
    Mar 11, 2011
    Location:
    Based in Chicago
    #1
    I cant find any MAC tutorials on how to add audio, audio player etc to a html mac based DW site, can anyone explain this in simple English?
     
  2. d88co88 macrumors 6502

    d88co88

    Joined:
    Dec 8, 2009
    Location:
    MN
    #2
    Are you looking for an audio player or background music? Or something else?
     
  3. SkyStudios thread starter macrumors member

    SkyStudios

    Joined:
    Mar 11, 2011
    Location:
    Based in Chicago
    #3
    I guess a audio player is better since people can get annoyed if they can not to the music.
     
  4. d88co88 macrumors 6502

    d88co88

    Joined:
    Dec 8, 2009
    Location:
    MN
    #4
    Would you be okay with an HTML5 based audio player?

    Code:
    <audio controls="controls">
      <source src="song.ogg" type="audio/ogg" />
      <source src="song.mp3" type="audio/mpeg" />
      Your browser does not support the audio element.
    </audio>
    Add this, and use VLC to create an ogg file. I have this on one of my websites and it works great on all the browsers I've tested! If you want to have it play automatically, I believe you add:
    Code:
    autoplay="autoplay"
    after the controls so it'd look like this:
    Code:
    <audio controls="controls" autoplay="autoplay">
      <source src="song.ogg" type="audio/ogg" />
      <source src="song.mp3" type="audio/mpeg" />
      Your browser does not support the audio element.
    </audio>
     
  5. John444 macrumors member

    Joined:
    Feb 10, 2011
    #5
    If you want to go old school html, you could use the embed tag:

    <embed src="music.mp3" hidden="false" loop="true" volume="50"></embed>

    If you want it to be background music, make hidden="true" . If you are not familiar with coding, go into the code view of dreamweaver and insert the above line wherever you want it to display.
     
  6. jwm2 macrumors regular

    Joined:
    Jan 5, 2012
    #6
    Please don't do background music. That was cool in the mid 90s, but these days its just bad ;)
     

Share This Page