Solved

Controlling Sound on a Web Page

Posted on 2000-02-17
11
195 Views
Last Modified: 2010-04-09
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
Comment
Question by:nailo
  • 6
  • 4
11 Comments
 

Expert Comment

by:itssook
ID: 2533488
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
 

Author Comment

by:nailo
ID: 2537499
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
 
LVL 3

Expert Comment

by:Dassa
ID: 2537733
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
 

Author Comment

by:nailo
ID: 2538057
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
 
LVL 3

Expert Comment

by:Dassa
ID: 2538885
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:nailo
ID: 2538900
I'll give this a try and get back to you.

Thanks, even a dummy like me can understand this (I think)
0
 

Author Comment

by:nailo
ID: 2539025
Dassa;
Ok I opened a new page
typed the contents as you instructed but got an error "premature close"
??
0
 
LVL 3

Accepted Solution

by:
Dassa earned 50 total points
ID: 2539055
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
 

Author Comment

by:nailo
ID: 2539137
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
 

Author Comment

by:nailo
ID: 2539195
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
 
LVL 3

Expert Comment

by:Dassa
ID: 2539241
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now