...

View Full Version : Help! HTML code line works on XP but not on Vista?



jerrysp
01-03-2008, 07:45 PM
<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?

VIPStephan
01-03-2008, 08:14 PM
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 (http://joliclic.free.fr/html/object-tag/en/index.php) element to include files on your website, for example:

jerrysp
01-04-2008, 03:05 AM
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.

ziggy1621
01-04-2008, 04:10 AM
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.

jerrysp
01-04-2008, 04:53 AM
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?

ahallicks
01-04-2008, 10:32 AM
<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

jerrysp
01-05-2008, 12:45 AM
I'm not a programmer and do not know what a 'data' folder is. I just do not understand how to write this code.

Excavator
01-05-2008, 01:01 AM
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 ...
<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>

jerrysp
01-06-2008, 03:53 PM
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?

VIPStephan
01-06-2008, 05:42 PM
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:


<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:


<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 (http://whitney.org/). 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.

jerrysp
01-09-2008, 03:10 AM
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.

jerrysp
01-17-2008, 02:47 AM
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?

AoR Zeta
01-18-2008, 02:14 AM
Here's a suggestion, don't use BGSOUND... it only works in IE anyway. What about Firefox, Opera, Safari etc. etc. users?

jerrysp
01-20-2008, 09:12 PM
AoR Zeta -
I desperately need a suggestion on how TO make a code work. Suggesting what NOT TO use is no help.
Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum