?
Solved

How to play .WAV file with HTML?

Posted on 1998-11-15
10
Medium Priority
?
3,968 Views
Last Modified: 2008-03-17
I want to make a HTML which play a .WAV file.

However, the .WAV was required to play when the HTML was opened for a while (about 30 seconds), not immediately. After another 30 seconds, it will play again.

Is is possible to write a HTML like this?

Thanks a lots.
0
Comment
Question by:st
10 Comments
 
LVL 4

Expert Comment

by:rafistern
ID: 1839691
This is not an easy thing to do as the javascript functions that do this are plugin specific. Take a look at my question on this subject:
http://www.experts-exchange.com/topics/comp/lang/javascript/Q.10096903

It all depends in the end which default wav player you have.
0
 
LVL 4

Expert Comment

by:ruperts
ID: 1839692
One way would be to record a 1 minute long wav file, then just make it repeat!

<head>
<title>New Page 2</title>
<bgsound src="sound.wav" loop="-1">
</head>

Or to make it loop just twice change "-1" to "2"

If you want javascript it will only work on Netscape, IE4+ with the right plug - in.
0
 
LVL 1

Author Comment

by:st
ID: 1839693
ruperts, thanks but I don't want the .WAV file too large. Any other way?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 12

Expert Comment

by:Otta
ID: 1839694
Yes, it is possible.

For an example, see the web-page for the sci-fi movie 'Contact'
(starring Jodie Foster), at:
http://www.contact-themovie.com/sound.html

which contains the HTML:

<EMBED SRC="message.au" WIDTH="2" HEIGHT="2"
AUTOSTART="true" HIDDEN="true" LOOP="true" VOLUME="77">


0
 
LVL 19

Expert Comment

by:cheekycj
ID: 1839695
like  rafistern said you will need to use JS.

you will probably need to execute a function that plays it on a using the
js time delay function.

CJ
0
 
LVL 12

Expert Comment

by:Otta
ID: 1839696
ST, my previous answer was correct -- and it works!
ST, please explain why you "rejected" that answer.
Thanks.
0
 
LVL 1

Author Comment

by:st
ID: 1839697
Otta: It is required a silence delay before the playing the .WAV file.
0
 
LVL 12

Expert Comment

by:Otta
ID: 1839698
Record some "delay" in the WAV (or AU) file.
0
 
LVL 1

Author Comment

by:st
ID: 1839699
otta, I wanted to use this method before I post this question. I wanted make this with HTML only, because I don't want to make change to my .wav fileS. Thanks.
0
 
LVL 12

Accepted Solution

by:
Otta earned 40 total points
ID: 1839700
Check "Luna's Hints - Eine Kleine Web Musik (A Little Web Music)", at:
http://www.sailormoon.org/luna/hint8.html

for details about <EMBED>.

The page at: http://www.auditorial.com/create/15.html
includes the information:

latency -- Specifies how many seconds of the streaming audio file to buffer before play begins.

So, if you specify a large latency, then there will be a dealy
before the sounds can be heard.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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…
Suggested Courses

807 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