Solved

Controlling Sound on a Web Page

Posted on 2000-02-17
11
222 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Increase the size of the modal in Bootstrap 5 43
Hide Table in merge 3 34
100% tall div not scrollable on iPhone 3 21
HTML Anchor Link Problem 3 39
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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…

821 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