Hugh Morris

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromHugh Morris
ToMe
SubjectSound and Javascript
Date18 March 05 22:38
Hi Mark

I'm just starting with javascript and I'm finding your site very useful,
but there's one subject that seems to be ominously not present: sound. I
know sound is frowned on in webpages, I hate it myself, but it does have
some applications. I would like to make a cross-browser online metronome
in javascript, like this flash version: [sample address]
Is this a feasible project? Is there any chance of you adding a sound
section to your javascript tutorials in the future?

Best wishes

Hugh Morris
FromMe
ToHugh Morris
SubjectRe: Sound and Javascript
Date21 March 2005 09:53
Hugh,

> I know sound is frowned on in webpages, I hate it myself

yep. sound in web pages sucks, and not just because it is irritating.

sounds are an embedded object, and use a plugin to play them. depending on
the different operating systems and installed plugins, the controls that
are available to script are different (and some browsers will also require
that Java is enabled to allow JavaScript to communicate with the plugin).
The most common ones are
'document.embedname.play()'
'document.embedname.stop()'
but depending on the installed plugin and platform, these might not work
either (for example, it does not work in any of the major browsers on the
computer I am using right now). This whole area is a big mess, caused in
part by the fact that people don't really like sounds, so no-one has
written a decent standard for sound controls.

Mark Huckvale has got a fairly nice page on it, complete with all the
various techniques and their compatibility (assuming the right plugins are
installed). That is probably the best place to start:
http://www.phon.ucl.ac.uk/home/mark/audio/play.htm

> Is there any chance of you adding a sound
> section to your javascript tutorials in the future?

probably not, for the same reasons as stated above :)
but this email will be included on my emails page in the hopes that other
people can use that to find information (your email address will not be
displayed).
http://www.howtocreate.co.uk/emails/


Hope this helps you find what you wanted

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/

PS. my ISP's email server is broken at the moment, so I will probably not get any replies that you send me.
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.