Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 14 of 14
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Help! HTML code line works on XP but not on Vista?

    <Center><EMBED SRC="xxx.mp3" HEIGHT=100 WIDTH=300 autostart="false" loop="false"></Center><P>

    On my XP OS computer the code above in included in a webpage on my website. A window is displayed on the webpage and the mp3 sound plays when it is activated.

    On my Vista OS computer only two lines and a red X appear where the audio window should be.

    However the mp3 sound does work on the Vista computer when activated independently.

    Any help?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,777
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    Even if this may not be the cause of the problem (since it should be browser related, not OS related) your code is terribly out of date. Both, the center and the embed element are deprecated (embed wasn’t even part of any W3C standard as far as I’m concerned).

    You should use the object element to include files on your website, for example:
    Last edited by VIPStephan; 01-03-2008 at 07:19 PM.

  • #3
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts
    While I appreciate your help I am an amateur and do not know what W3C is and the same goes for the object definition.
    My computers are side by side and I am using the same server.
    If you could correct the above embed src= to a workable code I would appreciate it.

  • #4
    Regular Coder
    Join Date
    Mar 2005
    Posts
    156
    Thanks
    8
    Thanked 1 Time in 1 Post
    Quote Originally Posted by jerrysp View Post
    While I appreciate your help I am an amateur and do not know what W3C is and the same goes for the object definition.
    My computers are side by side and I am using the same server.
    If you could correct the above embed src= to a workable code I would appreciate it.
    while we appreciate your attempt to have others do your work because you are new to it.... if you follow the link provided by VIPSTEPHAN above, you would find a tutorial that gives you the code. Everyone has to put in the time to read and build. if others give you the code, you will never feel the accomplishment of learning.

    as far as the two pcs, as stephan noted, it is not OS dependant, but browser. You probably have IE6 on the XP machine and IE7 on the Vista one. That will be the culprit for the difference you see.
    Last edited by ziggy1621; 01-04-2008 at 03:13 AM.

  • #5
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Ziggy-
    I did read the object the first time - I tried inserting my mp3 as below:

    <object type="audio/mpeg" data="data/xxx.mp3" width="200" height="20">
    <param name="src" value="data/xxx.mp3">
    <param name="autoplay" value="false">
    <param name="autoStart" value="0">
    alt : <a href="data/xxx.mp3">xxx</a>
    </object>

    It didn't work. Can you tell me what is in error?

  • #6
    Senior Coder ahallicks's Avatar
    Join Date
    May 2006
    Location
    Lancaster, UK
    Posts
    1,134
    Thanks
    1
    Thanked 57 Times in 55 Posts
    Code:
    <object type="audio/mpeg" data="data/xxx.mp3" width="200" height="20">
    <param name="src" value="data/xxx.mp3">
    <param name="autoplay" value="false">
    <param name="autoStart" value="0">
    alt : <a href="data/xxx.mp3">xxx</a>
    </object>
    Unless you have the the mp3 files in a 'data' folder, you do not need to add the data/ to the source of the mp3 file
    "write it for FireFox then hack it for IE."
    Quote Originally Posted by Mhtml View Post
    Domains are like women - all the good ones are taken unless you want one from some foreign country.
    Reputation is your friend

    Development & SEO Tools

  • #7
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I'm not a programmer and do not know what a 'data' folder is. I just do not understand how to write this code.

  • #8
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello jerrysp,

    data folder is just the path used in the example.
    You will need to edit that example to match the path where your .mp3 is.

    Looking at your first post, assuming that path is correct, this should read like ...
    Code:
    <object type="audio/mpeg" data="xxx.mp3" width="200" height="20">
    <param name="src" value="xxx.mp3">
    <param name="autoplay" value="false">
    <param name="autoStart" value="0">
    alt : <a href="xxx.mp3">xxx</a>
    </object>
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #9
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thank you very much for your help. The code you gave me does work for IE7. However it does not work with the computer that has IE6.
    I inserted both codes in the webpage and added text to instruct the user to use the alt if the IE6 audio box does not appear.

    This method seems to be very awkward. Is there a better way?

  • #10
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,777
    Thanks
    6
    Thanked 1,021 Times in 994 Posts
    The object element provides a method of including other files/media types in HTML pages. However, it specifically does not provide any specific application to process/view the file(s). It’s designed to let the user agent (browser) choose the appropriate application on your computer. That means if you include an audio file the browser can/should choose which application to launch to play that file, e.g. Quicktime, Window Media Player, RealPlayer, etc. If you don’t have the application installed that it thinks you need to play it it will not show the object/play the audio file, but it will display the alternative instead.

    Not having the appropriate player installed on that machine is the only reason I can imagine right now as to why it doesn’t work.

    If you want a cross-browser consisitent way to provide audio to play online you have to do it with flash (i.e. embed the audio file in a flash object and put the flash object on the HTML page then).

    And by the way: You don’t have to put text to “instruct the user to use the alt content if the IE 6 audio box does not appear”. If that’s the case the alternative content will appear as if there has never been anything else and the user won’t even notice that there’s supposed to be an audio player that’s not showing up.

    So, instead of alt : <a href="xxx.mp3">xxx</a> as alternative content you can put anything there and let it look like a normal web page. For example instead of:
    Code:
    <object type="audio/mpeg" data="xxx.mp3" width="200" height="20">
    <param name="src" value="xxx.mp3">
    <param name="autoplay" value="false">
    <param name="autoStart" value="0">
    alt : <a href="xxx.mp3">xxx</a>
    </object>
    …you can put:
    Code:
    <object type="audio/mpeg" data="xxx.mp3" width="200" height="20">
    <param name="src" value="xxx.mp3">
    <param name="autoplay" value="false">
    <param name="autoStart" value="0">
    <p>Hello my friend. I’m proud to present my new <a href="xxx.mp3">recording</a> that I recorded in m home studio. Check it out and <a href="contact.htm">let me know</a> what you think.</p>
    </object>
    If the player (object) doesn’t show up it will display the regular paragraph instead and the user won’t even notice that there’s something not showing up. You don’t have to tell anybody anything in advance. A good example of good alterantive content is the site of the Whitney Museum of American Art. If you disable JavaScript in your browser (which is applying the Flash object) then it won’t show the Flash but some alternative content. They could even style it completely so that it wouldn’t make any difference whether or not you have Flash.
    Last edited by VIPStephan; 01-06-2008 at 04:44 PM.

  • #11
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I have tried everything that has been suggested here and more. I can not make what seems like such a simple command as making an mp3 sound clip work in an HTML code.

    This is the webpage where I use the clip. Original and suggested codes have been left in.

    http://home.tampabay.rr.com/jspillman/babe-cs.htm

    There must be a way to make an audio clip play in any browser.

  • #12
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I found this code and it works on both ie6 & ie7 but it plays only when the webpage is loaded. Adding autostart="false" to this line doesn't work nor can I find anyway to control when the mp3 plays.

    <BGSOUND balance=0 src="called shot.mp3" volume=-350 loop=false>

    Any suggestions?

  • #13
    New Coder
    Join Date
    Jan 2008
    Posts
    42
    Thanks
    4
    Thanked 4 Times in 4 Posts
    Here's a suggestion, don't use BGSOUND... it only works in IE anyway. What about Firefox, Opera, Safari etc. etc. users?

  • #14
    New Coder
    Join Date
    Jul 2005
    Posts
    72
    Thanks
    8
    Thanked 0 Times in 0 Posts
    AoR Zeta -
    I desperately need a suggestion on how TO make a code work. Suggesting what NOT TO use is no help.
    Thanks.


  •  

    Posting Permissions

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