Song on new page will not play using...

User 192897 Photo


Registered User
325 posts

The song plays using IE 11. In the header section I have this code: <BGSOUND SRC="ex-eric.mid" LOOP=2>. I can't get it to play using Google Chrome or Firefox, any ideas or is this a known problem? http://juliekushner.com/bellamy.html.

Thanks in advance for any suggestions
There is no distinctly native American criminal class except Congress. MARK TWAIN

www.juliekushner.com
www.beercoastermania.com
www.phi-scsc.com
User 187934 Photo


Senior Advisor
20,181 posts

Try this. You may need to change your file to an mp3 or other to get cross browser compatibility.
<audio src="ex-eric.mid" loop="true" autoplay>
<p>If you are reading this, it is because your browser does not support the audio element.</p>
</audio>


I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 192897 Photo


Registered User
325 posts

Eric Rohloff wrote:
Try this. You may need to change your file to an mp3 or other to get cross browser compatibility.
<audio src="ex-eric.mid" loop="true" autoplay>
<p>If you are reading this, it is because your browser does not support the audio element.</p>
</audio>



Thanks Eric, that didn't work either, I will try the mp3 approach
There is no distinctly native American criminal class except Congress. MARK TWAIN

www.juliekushner.com
www.beercoastermania.com
www.phi-scsc.com
User 192897 Photo


Registered User
325 posts

george barone wrote:
Eric Rohloff wrote:
Try this. You may need to change your file to an mp3 or other to get cross browser compatibility.
<audio src="ex-eric.mid" loop="true" autoplay>
<p>If you are reading this, it is because your browser does not support the audio element.</p>
</audio>



Thanks Eric, that didn't work either, I will try the mp3 approach


MP3 didn't work across browser's either, although it should work on Chrome and Safari. So it might be me. Here is a good write up on it http://html5doctor.com/html5-audio-the-state-of-play/

I will have to spend some time on it but thanks for your help
There is no distinctly native American criminal class except Congress. MARK TWAIN

www.juliekushner.com
www.beercoastermania.com
www.phi-scsc.com
User 187934 Photo


Senior Advisor
20,181 posts

Where did you place the code?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 1948478 Photo


Senior Advisor
1,850 posts

george barone wrote:
MP3 didn't work across browser's either, although it should work on Chrome and Safari. So it might be me. Here is a good write up on it http://html5doctor.com/html5-audio-the-state-of-play/
I will have to spend some time on it but thanks for your help

George,
If you continue experimenting with this, I would suggest you keep these points in mind:

1. Don't even bother with the <bgsound> tag and the midi audio format. The <bgsound> tag was an IE tag that, to my knowledge, was never really accepted by browsers apart from IE. The midi format has never been a widely accepted audio format for the web.

2. Eric's suggestion, using the <audio> tag and the mp3 audio format, should work for all (or almost all) modern browsers. To make the player visible and to broaden the browser support to some older browsers, you could modify the code by adding the "controls" attribute and the ogg audio format like this:

<audio controls loop>
<source src="ex-eric.mp3" type="audio/mpeg">
<source src="ex-eric.ogg" type="audio/ogg">
Your browser does not support the audio tag.
</audio>

3. Although <audio> is new for HTML5, it has worked for me in the past under HTML4.01.

4. The browser support for mp3 is now pretty much universal. Your referenced link is a few years old and things have changed. Take a look at this instead:
http://www.w3schools.com/tags/tag_audio.asp

5. Remember to test (listen to) the audio files after conversion to mp3 and ogg, before uploading! ;)
User 192897 Photo


Registered User
325 posts

Eric Rohloff wrote:
Where did you place the code?


In the Header section of the specific page
There is no distinctly native American criminal class except Congress. MARK TWAIN

www.juliekushner.com
www.beercoastermania.com
www.phi-scsc.com
User 192897 Photo


Registered User
325 posts

Thanks Per, much appreciated
There is no distinctly native American criminal class except Congress. MARK TWAIN

www.juliekushner.com
www.beercoastermania.com
www.phi-scsc.com
User 187934 Photo


Senior Advisor
20,181 posts

george barone wrote:
Eric Rohloff wrote:
Where did you place the code?


In the Header section of the specific page

Place it in your html
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 192897 Photo


Registered User
325 posts

Eric Rohloff wrote:
george barone wrote:
Eric Rohloff wrote:
Where did you place the code?


In the Header section of the specific page

Place it in your html


Thanks Per and Eric, it worked. I used the below code in the body of the page instead of the header. I also changed the controls to autoplay. It now works in IE, Chrome & Firefox. :):D:lol:

<audio autoplay loop>
<source src="ex-eric.mp3" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
There is no distinctly native American criminal class except Congress. MARK TWAIN

www.juliekushner.com
www.beercoastermania.com
www.phi-scsc.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.