RE: Sound files

by "Sophia Kapterian (E-mail)" <digitek(at)cytanet.com.cy>

 Date:  Mon, 29 Nov 2004 17:33:24 +0200
 To:  <hwg-basics(at)hwg.org>
 In-Reply-To:  MainGateway
  todo: View Thread, Original
You're quite right. I recently had to embed an .swf file into a page and in
order to make it compliant and accessible at the same time, I had to resort
to two nested object elements and use conditional comments to have it
work in both browsers providing the user with an image if no plugins were
available.

Therefore a little modification to the original code, to put the two
together:

The first object is for IE and the conditional for Gecko browsers.

<object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
	id="mediaplayer1" height="40" width="120">
    <param name="Filename" value="webwav/WelcomeMessage.wav">
    <param name="AutoStart" value="False">
    <param name="ShowControls" value="True">
    <param name="ShowStatusBar" value="False">
    <param name="ShowDisplay" value="False">
    <param name="AutoRewind" value="True">

    <!--[if !IE]>
    <-->
    <object data="webwav/WelcomeMessage.wav" height="40" width="120"
	   type="audio/x-mpeg">
     ...
    </object>
    <!-->
    <![endif]-->
</object>

Regards
Sophia

-----Original Message-----
From: owner-hwg-basics(at)hwg.org [mailto:owner-hwg-basics(at)hwg.org]On Behalf Of
Keith D Sellars
Sent: Monday, November 29, 2004 3:34 PM
To: hwg-basics(at)hwg.org
Subject: Re: Sound files


As a little bit of added information on your suggestion (which was right on
target), the "clsid" part of the tag instructs the user's computer to use
Windows Media Player.  The tag only works in Internet Explorer UNLESS a
plugin is specified (there IS one for Mozilla that will allow this to work).

The more correct standards compliant way to do this is:

<object type="audio/x-mpeg" data="soundfilename.mp3"></object>

... although I'm not sure if Internet Explorer will support it properly yet.

In the above code snippet, "type" specifies the MIME type, and is usually
one of the following:

 .au (almost all browsers will play this type of file) - MIME type:
audio/basic
.wav - MIME type: audio/wav OR audio/x-wav
 .ra - Real Audio - MIME type: x-pn-realaudio
 . mid - MIDI files - MIME type: audio/midi or audio/x-midi
 . mp3 - MPEG-1 Audio Layer 3 - MIME type: audio/mpeg or audio/x-mpeg

In the above explanation, use of the "x-" prefix before the audio type is
used when the MIME type is registered with the Standards organizations (like
the W3C).

Embedding sound is, in my opinion, one of the most unclear issues involved
in designing a web page if you want to do so in a way that is compliant AND
that works at the same time.

Sincerely,
Keith D Sellars
WebGraffix
Ph: 229-243-7088
www.webgraffix.com

"Making the Internet Easy"
----- Original Message -----
From: "Sophia Kapterian (E-mail)" <digitek(at)cytanet.com.cy>
To: <hwg-basics(at)hwg.org>
Sent: Monday, November 29, 2004 1:45 AM
Subject: Sound files


> Hi Roger,
>
> As far as I know, the bgsound was never part of the specification.
>
> So try the following valid code to see if it works.
>
> <object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
> id="mediaplayer1" height="40" width="120">
> <param name="Filename" value="webwav/WelcomeMessage.wav">
> <param name="AutoStart" value="False">
> <param name="ShowControls" value="True">
> <param name="ShowStatusBar" value="False">
> <param name="ShowDisplay" value="False">
> <param name="AutoRewind" value="True">
> </object>
>
> And for more information on the object element and its attributes, you may
> like to go through
> the following tutorial:  http://tutorials.beginn   ers.co.ukreadid315
>
>
> HTH
> Sophia
>
> -----Original Message-----
> From: owner-hwg-basics(at)hwg.org [mailto:owner-hwg-basics(at)hwg.org]On Behalf
Of
> PC-Bug Fixer
> Sent: Monday, November 29, 2004 4:42 AM
> To: hwg-basics(at)hwg.org
> Subject: RE: I GIVE UP !!!!Re: test
>
>
> OK, seems that the list is starting to work again and the posting
> I made to the list is on the list the same day (AU EST)
>
> In some way a list such as this may be a good community type
> involvement on an International level and you get to talk and
> respond to thing that otherwise you might not.
>
> For those that do not want to be involved where they get
> everything from a community type e-mail list such as this, there
> is of course the Forum that GIO started, which has it's merits,
> in that you only get involved when you log in and only reply to
> things that are of specific interest to you.
>
> So after all this, I still do not have an answer to my Sound code
> problem on my main page and would like some help. The error is
> with any of the 2 codes I have embedded which the W3C validation
> service keeps knocking back with the following 11 ( 3 on line 20
> for 1st code and 8 on line 444 for the second code, which is the
> code as per instructions for their type) error messages;-
>
> START OF ERROR REPORT >>>
> This page is not Valid HTML 4.01 Transitional!
> Below are the results of attempting to parse this document with
> an SGML parser.
>
> Line 20, column 15: there is no attribute "SRC"
> <BGSOUND src="webwav/WelcomeMessage.wav" loop="1">
>
> You have used the attribute named above in your document, but the
> document type you are using does not support that attribute for
> this element. This error is often caused by incorrect use of the
> "Strict" document type with a document that uses frames (e.g. you
> must use the "Transitional" document type to get the "target"
> attribute), or by using vendor proprietary extensions such as
> "marginheight" (this is usually fixed by using CSS to achieve the
> desired effect instead).
>
> This error may also result if the element itself is not supported
> in the document type you are using, as an undefined element will
> have no supported attributes; in this case, see the
> element-undefined error message for further information.
>
> How to fix: check the spelling and case of the element and
> attribute, (Remember XHTML is all lower-case) and/or check that
> they are both allowed in the chosen document type, and/or use CSS
> instead of this attribute.
>
> ?
> Line 20, column 48: there is no attribute "LOOP"
> <BGSOUND src="webwav/WelcomeMessage.wav" loop="1">
>
> ?
> Line 20, column 51: element "BGSOUND" undefined
> <BGSOUND src="webwav/WelcomeMessage.wav" loop="1">
>
> You have used the element named above in your document, but the
> document type you are using does not define an element of that
> name. This error is often caused by incorrect use of the "Strict"
> document type with a document that uses frames (e.g. you must use
> the "Frameset" document type to get the "<frameset>" element), or
> by using vendor proprietary extensions such as "<spacer>" or
> "<marquee>" (this is usually fixed by using CSS to achieve the
> desired effect instead).
>
> ?
> Line 444, column 312: there is no attribute "SRC"
> ...">Downloads</A></FONT></P><EMBED
> src="webwav/WelcomeMessage.wav" hidden="YES"
>
> ?
> Line 444, column 347: there is no attribute "HIDDEN"
> ...c="webwav/WelcomeMessage.wav" hidden="YES" autostart="TRUE"
> loop="FALSE" widt
>
> ?
> Line 444, column 363: there is no attribute "AUTOSTART"
> ...eMessage.wav" hidden="YES" autostart="TRUE" loop="FALSE"
> width="0" height="0"
>
> ?
> Line 444, column 375: there is no attribute "LOOP"
> ..." hidden="YES" autostart="TRUE" loop="FALSE" width="0"
> height="0" align="cent
>
> ?
> Line 444, column 389: there is no attribute "WIDTH"
> ... autostart="TRUE" loop="FALSE" width="0" height="0"
> align="center">
>
> ?
> Line 444, column 400: there is no attribute "HEIGHT"
> ..."TRUE" loop="FALSE" width="0" height="0" align="center">
>
> ?
> Line 444, column 410: there is no attribute "ALIGN"
> ...p="FALSE" width="0" height="0" align="center">
>
> ?
> Line 444, column 418: element "EMBED" undefined
> ..." width="0" height="0" align="center">
> <<< END OF ERROR REPORT
>
> So does anyone know the correct embedded code, or does W3C not
> think that sound is an acceptable code.
>
> Regards
> Roger H.
>
>
> -----Original Message-----
> From: owner-hwg-basics(at)hwg.org
> [mailto:owner-hwg-basics(at)hwg.org]On
> Behalf Of PC-Bug Fixer
> Sent: Monday, November 29, 2004 8:29 AM
> To: hwg-basics(at)hwg.org
> Subject: RE: I GIVE UP !!!!Re: test
>
>
> Interesting Bill,
> I will do as you suggest,
> Reply All and delete You from the To Field and monitor the
> result.
> However, we still have missing e-mail posts on the list
> Regards
> Roger
>
>
>

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA