How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Coder4Life Your Own Question

Coder4Life
Coder4Life, Computer Software Engineer
Category: Programming
Satisfied Customers: 84
Experience:  20+yrs. C++/C programming, 18 yrs. SQL, 10+ yrs. OOA/D, 7 yrs. PHP/Javascript, 9 yrs. XHTML/CSS.
8141216
Type Your Programming Question Here...
Coder4Life is online now
A new question is answered every 9 seconds

I have built two websites, one with a midi file and one with

This answer was rated:

I have built two websites, one with a midi file and one with a wav file. Neither will play from the Google Chrome browser. Play fine in IE.
Both have the audio on the index page only.
The sites are:
http://www.irishdayattheraces.com
http://www.shhs56.com
Thanks,
Mike
The reason is because use of the bgsound tag only works in ie. It is deprecated and may actually only work in a site that has frontpage extensions enabled.
Following is the code you need to use:

<object type="audio/x-wav" data="call.wav">
<param name="src" value="call.wav">
<param name="autoStart" value="1">
</object>

You can get more information on it here: http://joliclic.free.fr/html/object-tag/en/ or here :
http://www.w3schools.com/media/media_object.asp

 

Customer: replied 6 years ago.
I installed the code. When previewed in Chrome I now have a Quick Time play bar at the top of the page and if I click on it it plays the wav. Obviously this is not what it is supposed to do.
What have I done wrong?
Customer: replied 6 years ago.
This is the code as I entered it



Add the following in the params section:

<PARAM NAME="autostart" VALUE="True">
<PARAM NAME="ShowControls" VALUE="True">
<PARAM NAME="ShowAudioControls" VALUE="True">
<PARAM NAME="DisplayMode" VALUE="1">

And change the value of the "autoStart" parameter to "True".

This should help.
Customer: replied 6 years ago.
I added the code. I Chrome preview the wav now plays as it should, however the QuickTime audio bar is still displayed at the top of the page. Sorry to keep at you on this.
This is now what the code looks like-








Also can I use this same coding on the other site where a midi file will not play?
Mike
Customer: replied 6 years ago.
I have loaded the page to the server so if you have Chrome you can see the way it looks and acts.
Mike
Customer: replied 6 years ago.
By the way - the wav no longer plays in IE
Try these params:

name="src" value="call.wav"
name="autoStart" value="True"
name="autoplay" value="True"
name="ShowControls" value="False"
name="ShowAudioControls" value="False"
name="DisplayMode" value="1"


Customer: replied 6 years ago.
When viewing in Chrome I get the exact situation as when I added the last params
Here is the code as it is now entered

name="src" value="call.wav"
name="autoStart" value="True"
name="autoplay" value=True"
name="ShowControls" value="False"
name="ShowAudioControls" value="False"
name="DisplayMode" value="1"
I am sorry. My fault. I wasn't clear. I was having problems loading the complete code here.

But i finally figured it out. Here is what the code should look like:

< o b j e c t type="audio/x-wav" data="call.wav">
< param name="src" value="call.wav">
< param name="autoStart" value="True">
< param name="autoplay" value="True">
< param name="ShowControls" value="False">
< param name="ShowAudioControls" value="False">
< param name="DisplayMode" value="1">
< /o b j e c t>

Remove the space after the < sign. And the spaces in the word object.
Customer: replied 6 years ago.
We appear to be back at square 1- The site looks good now but the wav does not play in Chrome or IE.
Here is the code as entered now








I loaded the page on the server:
http://www.irishdayattheraces.com
There should be a space between the word "object" and the word "type".
Customer: replied 6 years ago.
Well that got the wav back - however the QuickTime audio window is now visible again on the index page.
Customer: replied 6 years ago.
I really feel bad about the time this is taking from you. Perhaps we should just write it off as a bad task. What do you think?
Please don't feel bad. I love what I do. And I NEVER give up, until the problem is solved. I will take a look.
Ok.
I have the latest firefox and the latest chrome.
The wav file is playing in both, but it is not playing in IE 6. The Quicktime controls only appear in Chrome.
For the midi file, you need to just use the midi file, instead of the wav file.

This one works. I tried it in the latest Chrome, the latest Firefox, and IE 6. It needs to go in the "Body" section of your code, not the "Head" code.

< embed src="call.wav" hidden="true" autostart="true">

Take out the space between the < sign and the word "embed"
Coder4Life and other Programming Specialists are ready to help you
Customer: replied 6 years ago.
Yay team! It now works fine in both chrome and IE.
I really appreciate the time and effort you put into this.
I feel as you, once I confront a situation I need to resolve it.
Thanks again,
Mike