Thread: Playing music files on web pages
Results 1 to 15 of 21
04-19-2001, 09:37 PM #1
Playing music files on web pages
I want to put a MIDI file on my web page and have it automatically played, but I can't find the html code to do that. Could someone please help?
04-19-2001, 10:26 PM #2
<embed src="titleofmidi.mid" width=145 height=55 autostart=true
loop=true> according to addagirl, Sound Mistress.
04-19-2001, 10:42 PM #3
welcome to the forums
Last edited by HTML; 09-10-2003 at 06:04 PM.
04-20-2001, 05:48 AM #4
I like to use:
<embed src="song.mid" hidden="false" autostart="true" loop="-1" controls="smallconsole" height="25" width="100"></embed><strong> Click on the controls to turn off the music.</strong>
to remind folks that they have control over whether they want to listen to my choice of music. If you don't want looping (midi plays one time through) loop="0". If you don't want a console (and risk people clicking immediately away cuz they don't want the music) hidden="true".
04-20-2001, 11:21 PM #5
Thanks guys. I think my player is messed up, because I can't play it when I tried it out. Check it out at:
Could someone tell me what's wrong?
04-21-2001, 12:08 AM #6
It looks as if you have the code twice and they each intermingle. I is calling for a .ram file which is probably not supported on geocities.
04-21-2001, 03:56 AM #7
Had a quick look. Player does not seem to have anything to play. is the *.mid file in the same directory as the page? I s the filename correct?
04-22-2001, 02:02 PM #8
Yes, the fact is, everything was correct. I'm totally sure. But it just doesn't work. I asked a friend and he said this should work:
<BGSOUND = "URL of your midi" LOOP = -1>
That's where I got a little confused. Just what is embed for and what is bgsound for? I didn't try the bgsound idea yet
04-22-2001, 02:38 PM #9
BGSOUND only works in Internet Explorer, to the best of my knowledge.
I tell ya, I will have 'Only works in Internet Explorer' on my gravestone...
04-22-2001, 02:55 PM #10
Also, I copied the exact code form your source, and tried it at home. It works.
So maybe Something to do with GeoCities? Do they let you play *.mid files?
maybe your filename it Btit.mid or BTIT.mid.
04-22-2001, 03:03 PM #11
try this code:
<EMBED SRC="btit.mid" LOOP="true" HIDDEN="false" AUTOSTART="TRUE">
This should work in both NS and explorer
[This message has been edited by Dave (edited 04-22-2001).]
04-22-2001, 04:04 PM #12
Dean may be right... about the geocities thing. I'll try the codes on another site. Thanks guys!
04-22-2001, 05:30 PM #13
Let us know how you get on, Wendy.
04-27-2001, 09:25 PM #14
Thank you, I tried it out at Tripod.com and it worked just well at http://gwyn89.tripod.com/
I might move my site there. Geocities must have a problem.
What does the embed tag, bgsound and no embed tag mean?
04-28-2001, 06:22 AM #15
Glad you got it working!
The EMBED tage is a generic Netscape tag that does literally what it says. It embeds media files into a webpage, like music, video, Flash files
The EMBED tag is not supported by Internet EXplorer. But the NOEMBED is.
The trick dave used basically means -
Okay Netscape, play this song please. But if thats you Internet Explorer, then please use BGSOUND instead. Cheers, browsers.
As EMBED is Netscape, and BGSOUND is Internet Explorer, then the code works in both. It's a good way to code.