I did a search on the newsgroup comp.lang.javascript. I was searching
for "how to play a sound with Javascript". I'm somewhat suprised that
the majority of entries are from the 1990s, and there are almost no
posts from the last 3 years.
That is about right. The last time I had tried to make an universal
_reliable_ Javascript player is dated circa 2003-2004, after that I
(as the majority of Web developers) dropped this dirty business.
The problem lyes in the fact that somewhere by the end of the last
century the major players got the idea that the future of the Web is
in the media players/buyers/downloaders - so respectively whoever has
his proprietary player ruling - he is also "ruling the future".
Respectively the main task was to enforce any media not just to be
played, but to be player in _one particular_ player plus to ensure
that the consumer will be always aware of - grace to what software he
is happily watching/listening the given media. This way the main job
was to:
1) any media file attached to a particular playing software.
2) any media is played in visually recognizable particular software.
That is obviously against of the main aim of any Web developer with
1) play the media on whatever is available in the given environment.
2) play the media over an uniformed software-independent interface.
This situation inevitable lead to a real "programming war" between Web
developers and browser producers with RealPlayer, QuickTime and
MediaPlayer doing all their best to enforce "either me - or not game":
and numerous "interface wrappers" some of which - like Yahoo! one -
are still remaining samples of sophisticated workarounds for
intentional incompatibility. Still even the most sophisticated ones
remained nothing but hucks over software producer intentions with all
expected reliability impacts. Whoever was surfing the Web that time
may recall at least a couple of times when prompted to download
10-15Mb plugin/ActiveX to listen 10Kb MIDI bgsound file.
This way the community got sick tired of this crap and then Adobe/
Macromedia/YouTube came with an obvious idea to use what is already
installed on 99% of computers, Macromedia Flash. As the result FLV
players took the market by the storm. I personally do not recall a
single instance over the last 6-8 months when my browser launched any
of former rivals (RealPlayer, QuickTime, MediaPlayer) on visited
pages. As long as one has Flash installed, the things are fine. Just
another splendid sample of how careful anyone has to be with the
competition: if no compromise made with your even worst rival, the
chances are high to be eventually smashed out by a 3rd force.