Having problem embedding music file in web page

Discussion in 'HTML Basics' started by WhitePhantom, Jan 26, 2011.

  1. WhitePhantom

    WhitePhantom New Member

    Hi,

    A client has asked me about embedding a music clip in a webpage, to play automatically. I'm going to advise him against it, but in the meantime I've been playing around with it, having a look to see how to do it. And I can't get it to work. :(

    I've created a blank page, and tried to embed both a .mid and a .wav file that I donwloaded - I have alternatively tried embed and bgsound as shown below, also alternating between .mid and .wav files.

    On FF it tells me that I need to install a missing plugin. When I click 'Install missing plugins', it says 'The following plugins are available' and lists Apple Quicktime, but then when I click to intall it, it just says 'No plugins were installed', and 'Apple Quicktime not available'.

    On IE it said "This website wants to run the following add-on: 'Windows Media Player', etc." When I did that it played fine, both the .mid and the .wav files.

    HTML:
    <!DOCTYPE html PUBLIC  "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html  xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta  http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Page  with music</title>
    <!-- <embed autostart="true"  src="eagle.mid"></embed> -->
    <!-- <bgsound  src="eagle.mid" /> -->
    <embed autostart="true"  src="hotstuff.wav"></embed>
    <!-- <bgsound  src="hotstuff.wav" /> -->
    </head>
    
    <body>
    Autoplay  Music...
    </body>
    </html>
    
    
    What do I need to do? I thought this would be so easy, but it's really got me puzzled.


    Thanks,
    J.
     
  2. Forbairt

    Forbairt Portfolio Building

    Is your client actually a musician / band ? if so it might be semi acceptable if not tell them to go ....

    Seriously nothing worse than music auto starting on a website

    I'd probably recommend getting a flash player to play the audio (if it were me) still not 100% sure to get things playing but a lot better than relying on a midi file / wav file to play nice across all browsers
     
  3. jol

    jol New Member

  4. WhitePhantom

    WhitePhantom New Member

    Thanks a mil guys, it's so easy when you know how!!

    Forbairt, to answer your question, it's not a music website - it's a wine wholesaler! I am going to strongly recommend that he not do this, and tell him why, but if he insists that he wants it... well he's the client.

    Your help is much appreciated. :D
     
  5. Felipe

    Felipe New Member

    Hey, you can use Flash player to embed in your site page and then you can create a playlist if your are going to play more than one music files... Search on Google for Flash MP3 player embed codes for site and then to create Music playlist to embed on web page... You will definitely find some ways to do this simple task..


    Chandler Homes for Sale
     

Share This Page