Play Sounds Demo

The problem

The problem was to find a way to have a web page generated with many links to play (short) sounds.  Embedding the sounds meant pre-loading a lot of media, most of which is never needed.  Traditional JavaScript methods pop-up a medial player each time a link is clicked on, which is annoying and time-consuming.

The current solution

The solution here is to creat my own media player in Java, using an invisible applet on the page with a "play()" method that can be invoked from JavaScript.  (View Source to see the JavaScript used.)

This works fine, except for a 0-10 second delay before the first sound can be played, depending on your browser version. No doubt the various media classes take time to load.  Will continue to work on this!

The Demo

(The first sound played may take several seconds to load!)

A horse says neigh.

A dog says arrrf.

A tiger says roar.

A cow says moo.

A terminator says hasta la vista, baby.

A Sergeant Shultz says I know nothing...nothing!.

A Histology says Histology.


View JavaDocs API for PlaySnd Java class.

View source code.

View build.bat DOS commands to build this site.

View PlaySnd-MF.txt PlaySnd.jar manifest file.

Download PlaySnd.jar.