Problem getting music to play on my website

11 replies
  • WEB DESIGN
  • |
Hi everyone,

Anyone know what I am doing wrong when placing code on my website to play a chiristmas song?

I used ftp to upload the .mid file to my server then I placed the code...

This is the code that I placed in the header:

<embed src="http://childrenschristmassongs.com/music/HollyJolly[1].mid
" autostart="true" loop="true" hidden="false"width="350"height="200">

What did I do wrong?

Thanks for all advice. This is my first time putting music on a website...can you tell
#music #play #problem #website
  • Profile picture of the author Designs1
    Try to change song name to song.mid for example:

    <embed src="http://childrenschristmassongs.com/music/song.mid
    " autostart="true" loop="true" hidden="false"width="350"height="200">

    Not sure if you can use [] there

    And place it between <body> </body>

    ( NOT <head> </head> )

    Hope it helps
    {{ DiscussionBoard.errors[8418139].message }}
    • Profile picture of the author Brandon Tanner
      Is there any particular reason why you want to use a MIDI file, instead of an MP3 file? An MP3 file would be far more compatible, because not all browsers can play embedded MIDI files.

      There are lots of good MP3 players out there, but I like this one the best.
      Signature

      {{ DiscussionBoard.errors[8418242].message }}
  • Profile picture of the author joyfulwraps
    Thanks,

    I took out the [] and uploaded the renamed .mid

    Then I took out the code from the <head>>/head> and was looking for the <body></body> in my editor but cannot find it.

    I don't know where this is located? When I go to "appearance" then "Editor" on the far right my options are:

    Templates
    404 Template
    (404.php)
    ads.php
    Archives
    (archive.php)
    Archives Page Template
    (archives.php)
    Comments
    (comments.php)
    Footer
    (footer.php)
    Theme Functions
    (functions.php)
    Header
    (header.php)
    index-ads.php
    Main Index Template
    (index.php)
    Links Page Template
    (links.php)
    Page Template
    (page.php)
    Search Results
    (search.php)
    Search Form
    (searchform.php)
    Sidebar
    (sidebar.php)
    Single Post
    (single.php)
    Styles
    Stylesheet
    (style.css)
    {{ DiscussionBoard.errors[8418225].message }}
  • Profile picture of the author Designs1
    Oh you are using Wordpress. Try and open header.php and see if there is <body>.
    Place it under that tag. And i agree with Brandon, change it to .mp3 file.

    This should do it: http://solmire.com/
    {{ DiscussionBoard.errors[8418248].message }}
  • Profile picture of the author joyfulwraps
    OK, I found the <body> tag but it doesn't appear to have a </body> tag not sure why?

    In any case there is just a white box now and no music UGH

    You would think this would be simple, but for some reason it isn't working.
    {{ DiscussionBoard.errors[8418270].message }}
    • Profile picture of the author Designs1
      Originally Posted by joyfulwraps View Post

      OK, I found the <body> tag but it doesn't appear to have a </body> tag not sure why?

      In any case there is just a white box now and no music UGH

      You would think this would be simple, but for some reason it isn't working.
      The closing </body> is in footer.php (because all elements are between these header.php (opening your site) and footer.php (closing your site)). Try to change it to mp3 file.

      And if you change this, it doesn't show that player
      <embed src="http://childrenschristmassongs.com/music/song.mid
      " autostart="true" loop="true" hidden="true" width="350" height="200">
      {{ DiscussionBoard.errors[8418295].message }}
  • Profile picture of the author joyfulwraps
    I will change it to a MP3 file (had a phone call interrupt me) but I don't think changing from a .mid to a .mp3 will make it show up? There must be something wrong with my code or something. All I am getting is a white box at the top of my site.

    Going now to upload the mp3 file.
    {{ DiscussionBoard.errors[8418494].message }}
  • Profile picture of the author joyfulwraps
    That didn't work either.

    I think I'm just going to forget about putting music on the website for now, because nothing I do works. I don't think it was .mid or .mp3 that had anything to do with it working or not. I believe my code was right. It must be where I was putting the code.

    At the moment I have .mp3 uploaded to the server so I will keep it there and when I have more time try to figure out where to put the code so it works.

    Thanks so much for your assistance Designs1 and Brandon.
    {{ DiscussionBoard.errors[8418549].message }}
    • Profile picture of the author Brandon Tanner
      Originally Posted by joyfulwraps View Post

      That didn't work either.

      I think I'm just going to forget about putting music on the website for now, because nothing I do works. I don't think it was .mid or .mp3 that had anything to do with it working or not. I believe my code was right. It must be where I was putting the code.

      At the moment I have .mp3 uploaded to the server so I will keep it there and when I have more time try to figure out where to put the code so it works.

      Thanks so much for your assistance Designs1 and Brandon.
      If you want to play back MP3 files on your site, the best way is to install a proper media player script. Like this one...

      jPlayer : HTML5 Audio & Video for jQuery

      There is a little bit of a learning curve if you've never used a script like that before, but the advantages is that it works with virtually every browser out there, and your website visitors get full playback controls, etc.

      A simpler alternative (if you don't care about supporting older versions of Internet Explorer and you don't need fancy playback controls, etc), is to use the HTML5 audio tag...

      http://www.htmlgoodies.com/primers/h...-Audio-Tag.htm
      Signature

      {{ DiscussionBoard.errors[8418842].message }}
  • Profile picture of the author joyfulwraps
    Thanks Brandon,

    I will take a look at the info you provided later, in the middle of a big project right now and no more time to devote to the music. But, your info will definitely come in handy when I do have time to work on this again.
    {{ DiscussionBoard.errors[8419555].message }}
  • Profile picture of the author joyfulwraps
    Yea....its working now. I called Godaddy and the tech was very helpful although I did most of the FTP correctly I had the embed code for a folder called "music" and put the MP3 file in the root folder
    {{ DiscussionBoard.errors[8420331].message }}

Trending Topics