1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Background Music

Discussion in 'HTML & Website Design' started by RAFIQULLAH0102, Jul 16, 2012.

  1. #1
    How I background music use in my web site.please help me.
     
    RAFIQULLAH0102, Jul 16, 2012 IP
  2. 3dy.ro

    3dy.ro Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    45
    #2
    I'm not going to argue about why you shouldn't do this and not going to tell you how much everybody hates singing websites, so here is the code you have to put in the <head> section of your website.

    <embed src="LocationOfYourSong.wav" autostart="true" loop="false">
    Code (markup):
    Good luck, mate.
     
    3dy.ro, Jul 16, 2012 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    I also suggest not mentioning how it's on every top-ten list of how not to build a website, or how it's more likely to make people navigate away from the page the second it starts playing since they can't be bothered to hunt for where to turn it off... assuming you even provide one.
     
    deathshadow, Jul 16, 2012 IP
  4. RAFIQULLAH0102

    RAFIQULLAH0102 Greenhorn

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #4
    Thank you for your reply.But a problem. When I use this code.A message show "a plug in is needed". How I solve this problem.Please help me.
     
    RAFIQULLAH0102, Jul 17, 2012 IP
  5. RAFIQULLAH0102

    RAFIQULLAH0102 Greenhorn

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #5
    Mr,
    When i use this code a message show"a plug in is needed" please help me.
     
    RAFIQULLAH0102, Jul 17, 2012 IP
  6. huseyinyilmaz

    huseyinyilmaz Greenhorn

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #6
    I'm sorry I do not know :( good luck
     
    huseyinyilmaz, Jul 17, 2012 IP
  7. 3dy.ro

    3dy.ro Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    45
    #7
    Then your browser can't play MP3 / WAV / whatever file type it is, which I think it's a smart way for browser's developers to prevent this kind of practice.

    Joking aside, try this, hide it (#jquery_jplayer_1 {visibility: hidden;}) and set it on autoplay. This is kind of the only way it's guaranteed to work on most web browsers.

    Good luck.
     
    3dy.ro, Jul 17, 2012 IP
  8. WebFerret

    WebFerret Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Please be aware there is not much that makes users leave a web site faster than automatic background music.

    It's an enormous web design no-no.

    Good luck though!
     
    WebFerret, Jul 17, 2012 IP
  9. cs2hmc

    cs2hmc Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I do not think putting a background music to a webpage is a good idea as well. It's pretty distracting for the users. :(
     
    cs2hmc, Jul 18, 2012 IP
  10. HowardBeck

    HowardBeck Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    If you want to use background music for your website.Use this tag.
    <body>
    <p>HTML background music test</p>
    <embed src="bgsound.mp3" autostart="true">
    </body>
     
    HowardBeck, Jul 18, 2012 IP
  11. DerKoch

    DerKoch Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    You can also try to use the new HTML5 audio tag for this.
    
    <!DOCTYPE html><html>
    <body>
    
    
    <audio controls="controls">
      <source src="song.ogg" type="audio/ogg" />
      <source src="song.mp3" type="audio/mp3" />
      Your browser does not support the audio element.
    </audio>
    
    
    </body>
    </html>
    
    Code (markup):
    Good Luck!
     
    DerKoch, Jul 20, 2012 IP
  12. SirKonstantine

    SirKonstantine Member

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #12
    or you can just put a youtube video and put it on autoplay. This is better than the methods mentioned cuz most ppl have flash and you can also turn the music off.
     
    SirKonstantine, Jul 20, 2012 IP
  13. rayson.gunn

    rayson.gunn Guest

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    You can try this if you are using wordpress HTML5 jQuery Audio Player. It does auto play feature.
     
    rayson.gunn, Jul 21, 2012 IP
  14. Ralph23

    Ralph23 Peon

    Messages:
    493
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #14
    I'm sure there are (probably) reasons to have music embedded on a webpage somewhere... I think.

    Anyway, let me assure you, these reasons, if they exist, are not numerous.

    AKA - please don't emded sound in a webpage.
     
    Ralph23, Jul 21, 2012 IP