Solved

Controlling Sound on a Web Page

Posted on 2000-02-17
11
231 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
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!

 

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
 

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

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Does anyone know how I can make this header sticky on this theme and keep it responsive 15 62
output in HTML in Powershell 5 56
Check input text, Number 7 54
Boolean 13 47
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

737 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