Welcome to WebmasterWorld Guest from 54.146.5.196

Forum Moderators: incrediBILL

Message Too Old, No Replies

Midi in Firefox using embed?

     
2:36 am on Jul 11, 2006 (gmt 0)

New User

10+ Year Member

joined:Mar 26, 2005
posts:18
votes: 0


Is the embed tag the best option for playing embedded midi files within a page, assuming the user has quicktime installed? I've been having a lot of trouble getting this to work. A basic embed tag seems to work (just <embed src="music.mid">), although some friends are still saying the midi doesn't play. If I fill out the embed tag with some other attributes, I think just things like loop etc, it seems to stop working. I can't test it on my PC at the moment as quicktime is screwing around.

I have the javascript set up to correctly use different code for browsers like IE. I'm not using player controls for this, it needs to be embedded. If there're other attributes I can add to the embed tag, or if there is a different tag I can be using, that should work on Firefox, I'd appreciate some sample code and if it still doesn't work on my friends' machines, then I'll just have to assume they haven't got their plugins installed properly or something?

Jason

10:07 am on July 12, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 24, 2005
posts:528
votes: 0


I'm using the following piece of script:

<script>
<!--
var musicsrc="midi.mid"
if (navigator.appName=="Microsoft Internet Explorer")
document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="1">')
else
document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="0" height="2" autostart="true" loop="false">')
//-->
</script>

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members