Jump to content

embed midi file


sqlnoob

Recommended Posts

the script:

 

<script type="text/javascript">
function breakout()
{
if (window.top!=window.self) 
  {
  window.top.location="logout.php";
  }
}

function playSound(){
document.shugosound.play();
}

function stopSound() {
document.shugosound.stop();
}
</script>

 

the html:

 

<form name=myform><input type=button value="Play Music" onClick="playSound()">
<input type=button value="Stop Music" onClick="stopSound()"></form>
<EMBED src="dentou.mid" name="shugosound" id="shugosound" type="audio/midi" hidden="true" autostart="false" loop="23">

 

the problem:

 

I've tested this in IE6 (yes yes i know don't laugh ok) and it works perfectly fine on 98SE using IE6. However I've got remarks from a visitor who used both IE7 and Firefox that the music doesn't work for him.

No the music doesnt play for me on either firefox or IE. FF tells me I need a quicktime plugin but when i click to get the plugin it says one doesnt exist and IE has no response when I try to play the music.

 

I am puzzled as to why it doesn't work. Google is no help either as to what the problem is, so I'd try here instead.

Link to comment
Share on other sites

  • 1 month later...

he told me, that he recieved a message saying that he needs to install quicktime yes, but when he tries to install it, it says the plugin isn't there.

 

And I also wonder why it tries to install quicktime. On my computer it works perfectly fine with windows media player.

 

This puzzles me and I really want to fix this, so that every visitor is able to play the midi file.

Link to comment
Share on other sites

The <embed> tag was deprecated in favor of the <object></object> years ago (it was originally a "Netscape" element).

 

It will still work in older versions of browsers but may not work at all in newer versions, particularly depending upon the plugin (like quicktime). Unlike simple deprecated tag elements which are strictly Browser version compatible, in the case of <embed> deprecation, the actual entire platform/browser/plugin combination takes an active role in its support or not, Windows/IE6/media player vs Windows/IE6/Quicktime or Windows/IE7/Media Player vs Windows/FF2/Media Player ... etc.

 

By learning and changing to the <object> tag, you will be able to use embed for plugins in all browsers.

 

Here is an article from "a list apart" I first saw in 2006 about cross browser/platform support for embed because I had noticed my embed tags not working in Firefox 1x:

 

A List Apart: Bye Bye Embed

 

Using <object> to enclose your embeds properly will fix your problem in all platforms/browsers.

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.