Midi Music on web pages

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

wolfworx

Thread Starter
Joined
Oct 2, 2001
Messages
1,227
Recently noticed a problem with some of my website pages playing midi music. These are urls that have played the selections properly in the past. There has been no change in the html coding. I have been using lines similar to the following.

<embed src="addams2.mid" loop="-1" width="72" height="54" hidden>

I have discovered the problem on several computers using both Firefox and ie. Sometime the page will play and other times not.

On one url three pages play and one does not, but on another computer all four play and on a third none play.

Yes I have checked the sound output on all three computers.

Could this problem be the server at my site provider?

To repeat: This music played in the past and I have not modified the code.
 
Joined
Aug 1, 2003
Messages
51,988
Probably not much help, but if the HTML hasn't changed, then maybe something else has, like security updates in the browser or the firewall settings.

I have noticed, for example, that images may fail to load on some web pages when changes are made in the connection settings, like the MTU or receive window. Anything like that changed lately?
 

wolfworx

Thread Starter
Joined
Oct 2, 2001
Messages
1,227
No such change that I am aware of. Also I have just tried on a fourth computer. It produced the music at the site in the past but now, nada.
 
Joined
May 20, 2010
Messages
4,040
Agree with others. Apart from that, modern browsers have more support to HTML 5 AUDIO tag, rather than this.
 

wolfworx

Thread Starter
Joined
Oct 2, 2001
Messages
1,227
Problem is standards and consistency. When you create a web page you need that features work for a reasonable percentage of the visitors. I had to go back and eliminate hover buttons on my web site because not all visitors could use them.

regarding this code:

<style type="text/css">


.image-swap-1 {
width: 256px;
height: 256px;
position: relative;
padding: 0;
margin: 0;
line-height: 256px;
vertical-align: middle;
text-align: center;
}

.image-swap-1 em {
display: block;
width: 256px;
height: 256px;
position: absolute;
top: 0;
left: 0;
background: url('mouseover-images/thumbs.png');
background-position: left;
}

.image-swap-1 a:hover em {
background: url('mouseover-images/thumbs.png');
background-position: right;
}


This code did not make hover buttons available to all users so I might have well as use simple graphics for button links.
 

wolfworx

Thread Starter
Joined
Oct 2, 2001
Messages
1,227
Hmmm. Thanks for sticking with me on this. But the problem becomes more and more puzzling.

Firstly, I cannot get the audio tag to work.

Keeping with the embed tags on all pages

Computer #1 Vista with Firefox 8.0 : Music works on all pages
Computer #2 Win XP Home Firefox 7.0.1 Music works on all pages
Computer #3 Win XP Prof. Firefox 7.0.1 No music on any page
computer #4 Win XP Prof. Firefox 8.0 (wireless) No music on any page

All four computers access the internet through the same router to the same cable modem using the same internet provider.
I can play midi music file directly (off line) on all four computers
Internet sites with video and sound clips (YouTube, etc.) play sound OK on all four.

Evil gnomes at work???:rolleyes:

My Halloween url is
http://www.wolfworx.com/hwn2005/
 
Joined
Aug 28, 2011
Messages
22
I usually use javascript to handle my audio....

I find it easier to work with....
Code:
<script language="javascript" type="text/javascript">
function playSound(soundfile) {
document.getElementById("music").innerHTML= "<OBJECT ID=\"MediaPlayer1\" CLASSID=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" CODEBASE=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701\" STANDBY=\"Loading Microsoft Windows® Media Player components...\" TYPE=\"application/x-oleobject\" width=\"1\" height=\"1\"><param name=\"fileName\" value=\""+soundfile+"\"><param name=\"animationatStart\" value=\"true\"><param name=\"transparentatStart\" value=\"true\"><param name=\"autoStart\" value=\"true\"><param name=\"showControls\" value=\"true\"><param name=\"Volume\" value=\"-300\"><embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\" src=\""+soundfile+"\" name=\"MediaPlayer1\" width=1 height=1 autostart=1 showcontrols=1 volume=-300></OBJECT>";
}
</script>
Then just add an empty element inside your body tag like:
HTML:
<span id="music"></span>
And now just link to the sound clips like so:
HTML:
<a href="javascript:playSound(‘SOUNDCLIP.mid’);">
If that's hard to follow an OP summed it up excellently here: How to make WMP invisible while playing audio
 

wolfworx

Thread Starter
Joined
Oct 2, 2001
Messages
1,227
I am beginning to think the problem is not with the html code at the server, but some tweek of the OS or Firefox.
Note that Midi Music plays on
Computer #1 Vista with Firefox 8.0
Computer #2 Win XP Home Firefox 7.0.1
but does not work on
Computer #3 Win XP Prof. Firefox 7.0.1
Computer #4 Win XP Prof. Firefox 8.0

All four connect to the internet through the same router.

Have not Yet checked with IE.
 

wolfworx

Thread Starter
Joined
Oct 2, 2001
Messages
1,227
Note that computers 3 and 4 have SP3 and #2 has SP2
Computer #1 Vista with Firefox 8.0 : Music works on all pages
Computer #2 Win XP Home (SP2) Firefox 7.0.1 Music works on all pages
Computer #3 Win XP Prof. (SP3) Firefox 7.0.1 No music on any page
computer #4 Win XP Prof. (SP3) Firefox 8.0 (wireless) No music on any page

I tried IE 6 on #3. Music played, but not consistently on all pages tried.

I tried a 5th computer Win XP Home (SP2) Firefox 7.0.1 Music works on all pages

:confused:Could upgrading XP to SP 3 be the problem?
 
Joined
Aug 28, 2011
Messages
22
It could all depend on what you are using to play the audio file....

Browsers use different resources to play the audio. For example: Chrome has a built in Flash/Java that could be playing it....

IMO the overall issue is the use of just the embed tag... It is not very well supported anymore and frequently causes problems....

If its just one file try using Object/Param/Embed instead... Although it may look messier it is supported much better across all platforms.
 

wolfworx

Thread Starter
Joined
Oct 2, 2001
Messages
1,227
Of course I also tried the AUDIO tag. That does not work on #3 and #4 either.

Ditto using Chrome browser. No music on #3 and #4.

"If its just one file try using Object/Param/Embed instead... Although it may look messier it is supported much better across all platforms."

"One file" ? meaning one page or instance of midi music? No, have about a dozen pages with midi reference tags.

Still, the puzzle is why computers #1 and #2 play the midi music and others do not. Could it involve Java or something changed with SP3?

I wish that a change of tags in the HTML code would provide more universal performance, but so far, that is not the case.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top