Solved

Controlling Sound on a Web Page

Posted on 2000-02-17
11
236 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 

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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

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 …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

705 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