A javascript variant of the code below is used to play an mpeg on my
home page <http://vic.norton.name>. This code is not valid HTML
4.01 code because the EMBED element is
undefined in HTML 4.01. Nevertheless the code works on every browser I
have tested.
The following audio player was created by a javascript realization of
the invalid HTML code. The javascript hides the EMBED tag from any HTML validator—including
the validator at the bottom of this page. This player should work on
any browser that supports javascript.
Here is the code for the newMpegPlayer
function with examples of its use.
Valid HTML Code 1
The OBJECT code that calls the following audio player (if you can see
an audio player) is valid HTML 4.01 code. It works on Firefox but does
not work on Internet Explorer (Windows). Click on the player (if you
can see it). Does it work on your browser?
The OBJECT code that calls the following audio player (if you can see
an audio player) is valid HTML 4.01 code. It works on Internet
Explorer (Windows) but does not work on Firefox. Click on the player
(if you can see it). Does it work on your browser?
The EMBED element is not defined in HTML
4.01. The OBJECT element is supposed to
replace EMBED. However, it seems to be
impossible to use OBJECT without EMBED to represent an audio player that works on
all browsers.
Safari
and
iCab are the only
browsers I know of that can represent and play both examples of
“valid” HTML code above.