• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Controlling Sound on a Web Page

I have a midi file embedded that plays music while on my web page.
Would like to be able to have a .WAV file play first before the music file begins playing.
When I have had both on the web page, they play at the same time.
Must be a way to delay the midi file from playing until the .WAV file is finished.
The midi file plays auto. I have choose not to have controls available to start and stop the music file (midi).

I use Netscape Communicator in building my Web Page.

Thanks for time in helping with this question
0
nailo
Asked:
nailo
  • 6
  • 4
1 Solution
 
itssookCommented:
for your .wav file do:

<embed src="blah.wav" autostart=true loop=false>

for your .mid file do:

<embed src="blah2.mid" autostart=false loop=false>

that should work....

0
 
nailoAuthor Commented:
Thanks but.......two things happened after changing according to your suggestion.

1. The wav file did play, but was not hidden.

2. The mid (music ) file no longer played.

Need to have the wav file play 1st, be hidden and then the music begin.

Thanks
0
 
DassaCommented:
A gludge but should have the effect, why not have the browser load a page with the wav file autostarting maybe with some text on it saying Please wait loading other elements or something and then have this page redirect using the metatag to the other page with the midi file autostarting.  You could set the timing of the redirect to make sure the wav file plays fully before the redirection occurs.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
nailoAuthor Commented:
Dassa:

OK, what ever ( ha ha ), you are so far above me, that really I don't understand.

What I have done is place a tag near the top of my web page that plays music. <embed src="olboogie.mid" hidden="true">

Would like to be able to place a wav file that I may create using my microphone (for information purposes) once in awhile.

Have been able to do this, but both wav & mid files play at the same time.
At the moment I am not using a wav file.

In fact here is my web page so you can see what's up:

http://members.home.net/nailo/nascar.html

Thanks
0
 
DassaCommented:
Okay, let's see if I can make it clearer.

How about having another page something like this
<html>
<meta http-equiv="refresh" content="10;url=http://members.home.net/nailo/nascar.html">
<head>
<Title>Announcements</Title>
</head>
<body>
<embed src="announcements.wav" hidden="true">
<b> Please listen to the announcement and when it is finished you will be taken to the main page.  Thank you.</b>
</body>
</html>

Where the content="10... will be the time it takes for your wav file to play.  This first page will play the wav file and then will auto load the next page when the sound file has finished, if you time it right.  You could call this page index.html so that it will load if they only enter the directory path into the browser without specifying a page name.  Or you could link it from your index page (home page)

Does that make it a little clearer?
 
0
 
nailoAuthor Commented:
I'll give this a try and get back to you.

Thanks, even a dummy like me can understand this (I think)
0
 
nailoAuthor Commented:
Dassa;
Ok I opened a new page
typed the contents as you instructed but got an error "premature close"
??
0
 
DassaCommented:
I couldn't reproduce this error on my system.  I am using IE 5.01.  Everything works fine for me.  Maybe if you attempt to increase the figure in "content="10" to a higher number.  I would assume the error is due to the wav file not finishing playing/downloading although that doesn't seem right to me.

Do you get to hear the wav file?
0
 
nailoAuthor Commented:
I'm using Netscape. But the problem may be me.

I opened a new page. Then under HTML tag insert I typed the info you gave me. I was unable to close the text box because the error would occur, so I never was given a chance to see if it would work due to the error notice.
perhapes I am not typing the HTML properly. This is all pretty new to me.
0
 
nailoAuthor Commented:
I'm going to end your hard work here. I was able to figure out how to type html on a new page. However the wav file didn't play. but will stop here and award you the points for all the great help and effort. Maybe I'll try again at a later time.
Really wanted to be able to play a wav file the have the music file come in after the wav had completed. All being on the same page. But will give it up for now.
THANKS AGAIN DASSA
0
 
DassaCommented:
If you copied everything from <html> to and including the </html> from the above into notepad and then saved it as index.html after editing the sound file name etc.  It would be okay.  I suspect that you may have copied the above into an existing page which already had some html tags in it.  No matter, if you want to email me at dassa@dhs.org I will send you a working version by return.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now