www.webdeveloper.com
Results 1 to 3 of 3

Thread: Need help in playing music at the background of my banner

  1. #1
    Join Date
    Dec 2007
    Posts
    4

    Need help in playing music at the background of my banner

    Hi
    I wanna build a banner for me where I need to play a background music. I need help in adding background music. I want to play my music file automatically while I start my html file. I tried adding this line in the body: <embed src="Artcell.mp3" hidden="true" loop="true" autostart="true"></embed>

    But this is not working. Help me pls, by giving your good suggestion.

    Thanks
    Alimozzaman

  2. #2
    Join Date
    Dec 2007
    Location
    Eastern USA
    Posts
    1
    Hi, Alimozzaman, this works for me:

    <!-- Start of QuickTime Code -->
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="16" width="250">
    <param name="src" value="music_file.mp3">
    <param name="autoplay" value="true">
    <param name="controller" value="true">
    <param name="loop" value="true">
    <param name="hidden" value="true">
    <embed height="16" width="250" src="music_file.mp3" pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" controller="true" hidden="true" autoplay="true" loop="true">
    </object>
    <!-- End of QuickTime Code -->

    Italic text is optional. If <param name="hidden" value="true"> and hidden ="true" are removed, a small horizontal player bar will appear in the upper left corner of the browser. Including them will hide the player bar in Firefox, Netscape and Opera. But if you include these lines, on the line that begins with codebase=, change both height and width to "0" or a horizontal space will appear in place of the player bar in IE. <param name="loop" value="true" and loop="true" causes the audio file to repeat endlessly. Delete these lines and it will play once.

    Hope this helps. Try it out. Experiment with it.

    —Uncle Bob

  3. #3
    Join Date
    Dec 2007
    Posts
    4
    Hi Bob,
    Thank you so much. I think it will work for any web site but I need something for off-line because I am not doing anything for web site. I am just building a banner using my photo where I wanna play music at the background. I tried it out but not working for me. So please help me.

    Thanks once again.

    Bye
    Rony

    So here is the body part of my html and javascript code(including your one).

    <body onLoad="rotate()">


    <center>
    <img name="adBanner" alt="Ad Banner" width="800" height="720" />

    </center>

    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="16" width="250">
    <param name="src" value="Artcell.mp3">
    <param name="autoplay" value="true">
    <param name="controller" value="true">
    <param name="loop" value="true">
    <param name="hidden" value="true">
    <embed height="16" width="250" src="Artcell.mp3" pluginspage="http://www.apple.com/quicktime/download/" type="video/quicktime" controller="true" hidden="true" autoplay="true" loop="true">
    </object>
    </body>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles