Forum Moderators: open

Message Too Old, No Replies

<EMBED> tag and Midi files

         

Gene

9:39 pm on Jul 31, 2002 (gmt 0)

10+ Year Member



Here's a strange situation. . .

I'm using an <EMBED> tag for playing a Midi file as background music:
<EMBED src="music.mid" autostart="true" hidden="true">

Using Netscape 4.79 it works fine on a personal website set up at prohosting.com (unknown server type).

However, when uploading the same files to my company site (running on Win 2000 server), nothing happens!

Although if I use Explorer 5.0, I CAN hear the music on BOTH sites, whereas NN 4.79 only works on ONE of the sites!

So it seems to be partly a server problem and partly a browser problem.

Any ideas? I'm going nuts over this!

--Gene

P.S. The results are the same even with hidden="false"

tedster

10:44 pm on Jul 31, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It does seem odd that only one browser has problems. Does clearing Netscape's cache help?

<added>I'm thinking it might be a combination of how the MIME types are set on the server plus NN4's very sticky cache - as you said, a little server a little browser.</added>

[edited by: tedster at 11:09 pm (utc) on July 31, 2002]

Gene

11:08 pm on Jul 31, 2002 (gmt 0)

10+ Year Member



I cleared the cache. No Luck.

Any other ideas?

keyplyr

12:03 am on Aug 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



> I'm using an <EMBED> tag for playing a Midi file

I would seriously rethink this. Some users consider this a very rude practice. Using a hidden <embed> tag forces the user to automatically download a file that they did not choose to download. Also, choice of music is astetic; meaning not everyone likes the same thing.

As far as your issues with NN, pluggin technology was very different in the day they released NN4.79 and the <embed> tag was never intended for this type of use anyway, hence the problems you are seeing. The number of users who still use NN4.79 is decreasing at a consistant rate and, depending on the website, is usually only about 6% to 8%... which is not a real significant number.

Why not code a simple hyperlink to turn on the MIDI file, if in fact the user chooses. This would be one solution to several problems: no unwanted downloads, no browser compatability issues and no unwanted music.

<a href="music.mid"> Click for Music! </a>

or use a graphic as an "ON" button,

<a href="music.mid"> <img src="images/music_on.gif" border="0" width="?" height="?" alt="Music On"> </a>

Gene

1:51 am on Aug 1, 2002 (gmt 0)

10+ Year Member



TO: Keyplyr

Thanks for the suggestions. Unfortunately though, this webpage is displaying photos of a Cabaret Musical play, so the background music is appropriate. I have also considered using the link tag you suggested, but had some trouble in that when clicking a link to the music, it interrupted the downloading of the jpegs to such an extent that the browser had a FIT and stopped loading anymore jpegs! This happened with just a little 10k midi.

Besides, I've got the background midi set up to play from a random list of midis, which is another reason I'd like to keep it the way it is. I suppose as a last resort, I could make an intro page giving the user a choice of midis to play. Still, I'd like to get to the bottom of the <embed> problem.

*******************************************

TO: Tedster

After reading your comments about the MIME types, I did some searching and found this:

[liveupdate.com...]

It sounds like the server needs to be configured for Netscape MIDI plugins. But I'm not sure if I have the ability to do that.

Any suggestions?

P.S. I'm so desperate, that I'm willing to fork out some cold cash to anyone that can resolve this for me. (Am I allowed to make such offers in the Forums; if not, I apologize.)

keyplyr

6:40 am on Aug 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Well, as I said... the <embed> tag was never intended for your application. Use the <object> tag instead. Fully supported by NN, in fact they introduced it. :)


<added> I understand your reluctance to "let go" of the automatically started music. I also have a similiar themed site and for years I used hidden, embedded MIDI files. I received complaint after complaint from users citing various reasons: that they listened to other music while surfing the net, that they were unprepared to have music start and their volume was turned too high, that MIDI was a poor form of music reproduction and it sounded bad... I was even blamed for giving one user a computer virus because of the hidden download - think about it, a hidden download is rather serious.

tedster

7:30 am on Aug 1, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's something else you can easily try - use the full, absolute URL of the midi file the src attribute. Sometimes that helps, I've heard.

It's also an excellent suggestion to use the <object> tag - that is the HTML 4 spec, and <embed> has been deprecated for several years. You might as well be ready for whatever the future brings when you finally get this page working.

Going at this from a different angle, I have one music site as a client and they use RealAudio for background music. I've also heard of good success using Flash just for embedding sound files. Both these methods support streaming, so the entire file doesn't need to be downloaded before the music is heard. AND the fidelity can be a lot better.

Gene

2:02 pm on Aug 1, 2002 (gmt 0)

10+ Year Member



TO: Keyplyr

Tried unsuccessfully with the <object> tag. It's looks like a problem with the server, Netscape Midi plugins, and MIME types.

Thanks again for your admonitions about using background music. It hasn't fallen on deaf hears. I agree with much of what you said.

****************************************************

TO: Tedster

Tried the absolute URL with no luck.

HOWEVER, I'm happy to say I DID come up with something!

When surfing on the "problem site", I made the URL of the midis so as to grab them from the "other site" (the one that always worked for NN). Not a total solution, but it gets the job done!

Now my only gripe is the javascript that's serving the random MIDIS fails to work about 10% of the time (no music), and it ONLY happens when using Netscape! If I'm using IE, the script serves up a song EVERY time I load.

Boy, isn't that weird? Have you ever had a script behave like that?
Netscape sure is a pain in the neck!

Thanks again to everyone for your help!

--Gene