Object ID embed and validation??

Discussion in 'HTML' started by Christopher Richards, Jan 18, 2005.

  1. Christopher Richards, Jan 18, 2005
    #1
    1. Advertising

  2. Christopher Richards

    Mark Parnell Guest

    Mark Parnell, Jan 18, 2005
    #2
    1. Advertising

  3. Christopher Richards wrote:

    > Is it possible to correctly validate an xhtml page with the object ID and
    > embed necessary to implant a windows media player in an html page?
    > Here is the code suggested by http://www.streamalot.com/embed.shtml. This
    > validator http://validator.w3.org/file-upload.html doesn't like it at all.


    ================================================================
    <!-- BEGIN GENERIC ALL BROWSER FRIENDLY HTML FOR WINDOWS MEDIA PLAYER -->

    <object id="MediaPlayer1" width=180 height=200
    classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"

    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
    standby="Loading Microsoft® Windows® Media Player components..."
    type="application/x-oleobject" align="middle">
    <param name="FileName" value="Server/file">
    <param name="ShowStatusBar" value="True">
    <param name="DefaultFrame" value="mainFrame">
    <embed type="application/x-mplayer2"
    pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/"
    src="Server/File" align="middle"
    width=176
    height=144
    defaultframe="rightFrame"
    showstatusbar=true>
    </embed>
    </object> <!-- END GENERIC ALL BROWSER FRIENDLY HTML FOR WINDOWS MEDIA
    PLAYER --><br>
    <a href="Server/file"><font size="2">Click
    here for standalone player</font></a><br>

    <a
    href="http://www.microsoft.com/windows/windowsmedia/en/default.asp"><font
    size="1">Download Windows Media Player Here</font></a></p>
    ================================================================

    Without trying the validation, I can already spot some tags that do not
    close, e.g. replace <br> with <br />.

    The code above was probably intended for HTML, not XHTML.

    Roy

    --
    Roy Schestowitz
    http://schestowitz.com
     
    Roy Schestowitz, Jan 18, 2005
    #3
  4. Christopher Richards

    Jim Roberts Guest

    "Christopher Richards" <>
    wrote in news:CG%Gd.12704$:

    > Is it possible to correctly validate an xhtml page with the object ID
    > and embed necessary to implant a windows media player in an html page?
    > Here is the code suggested by http://www.streamalot.com/embed.shtml.
    > This validator http://validator.w3.org/file-upload.html doesn't like
    > it at all.
    >
    >


    Some of the attributes, such as "align" and "pluginspage" aren't valid
    attributes. About the best I could do using xhtml is the following:

    <p><object id="mediaplayer1" width="180" height="200"
    classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2
    inf.cab#Version=5,1,52,701"
    standby="Loading Microsoft Windows Media Player components..."
    type="application/x-oleobject" >
    <param name="FileName" value="Server/file" />
    <param name="ShowStatusBar" value="true" />
    <param name="DefaultFrame" value="mainFrame" />
    <!-- For other browsers * Windows Media Player -->
    <!--[if !IE]> <-->
    <object width="180" height="200" type="application/x-mplayer2">
    <param name="FileName" value="Server/file" />
    <param name="ShowStatusBar" value="true" />
    <param name="DefaultFrame" value="mainFrame" />
    </object>
    <!--> <![endif]-->
    </object></p>

    It works for IE and Gecko based browsers and does validate as xhtml
    strict. Not sure about others, but I don't think Opera supports the
    object element. There's probably a better method. You
    might consider using an html doctype.

    --
    regards,
    Jim Roberts
     
    Jim Roberts, Jan 18, 2005
    #4
  5. Christopher Richards

    Toby Inkster Guest

    Christopher Richards wrote:

    > Is it possible to correctly validate an xhtml page with the object ID and
    > embed necessary to implant a windows media player in an html page?


    What's wrong with:

    <object data="myfilm.avi" height="120" width="180" type="video/x-msvideo">
    <p>Your browser doesn't appear to support emebedded AVI video files, so
    please download <a href="myfilm.avi">my film</a> and view it in your
    favourite media player.</p>
    <p>Here is a still image from the film to whet your appetite:<br/>
    <img src="mystill.png" style="height:120px;width:180px"/></p>
    </object>

    ???

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jan 18, 2005
    #5
  6. Toby Inkster wrote:
    > What's wrong with:
    >
    > <object data="myfilm.avi" height="120" width="180" type="video/x-msvideo">
    > <p>Your browser doesn't appear to support emebedded AVI video files, so
    > please download <a href="myfilm.avi">my film</a> and view it in your
    > favourite media player.</p>
    > <p>Here is a still image from the film to whet your appetite:<br/>
    > <img src="mystill.png" style="height:120px;width:180px"/></p>
    > </object>


    Missing alt attribute? Using CSS for specifying an image's height and
    width instead of the HTML height and width attributes?
     
    Leif K-Brooks, Jan 18, 2005
    #6
  7. "Toby Inkster" <> wrote in message
    news:p...
    > Christopher Richards wrote:
    >
    >> Is it possible to correctly validate an xhtml page with the object ID and
    >> embed necessary to implant a windows media player in an html page?

    >
    > What's wrong with:
    >
    > <object data="myfilm.avi" height="120" width="180" type="video/x-msvideo">
    > <p>Your browser doesn't appear to support emebedded AVI video files, so
    > please download <a href="myfilm.avi">my film</a> and view it in your
    > favourite media player.</p>
    > <p>Here is a still image from the film to whet your appetite:<br/>
    > <img src="mystill.png" style="height:120px;width:180px"/></p>
    > </object>

    Thanks for the response Toby. First, I wouldn't try streaming an AVI or
    downloading video. AVI is just no good for the web. It is great format for
    editing but not final web output. I wouldn't want the user to take any
    action apart from clicking and viewing. The other problem, as I see it, that
    Mozilla/Netscape needs that embed tag.
     
    Christopher Richards, Jan 18, 2005
    #7
  8. Christopher Richards

    Steve Pugh Guest

    "Christopher Richards" <>
    wrote:
    >"Toby Inkster" <> wrote in message
    >news:p...
    >>
    >> <object data="myfilm.avi" height="120" width="180" type="video/x-msvideo">
    >> <p>Your browser doesn't appear to support emebedded AVI video files, so
    >> please download <a href="myfilm.avi">my film</a> and view it in your
    >> favourite media player.</p>
    >> <p>Here is a still image from the film to whet your appetite:<br/>
    >> <img src="mystill.png" style="height:120px;width:180px"/></p>
    >> </object>

    >
    >Thanks for the response Toby. First, I wouldn't try streaming an AVI or
    >downloading video. AVI is just no good for the web. It is great format for
    >editing but not final web output. I wouldn't want the user to take any
    >action apart from clicking and viewing.


    Then use another format, the above technique will work with other
    formats.

    >The other problem, as I see it, that
    >Mozilla/Netscape needs that embed tag.


    Netscape 4 does, but Mozilla/Netscape 6+ certainly do not. You
    probably once tried the MS mangled version of <object> rather than the
    standards compliant version used above.

    Steve
     
    Steve Pugh, Jan 18, 2005
    #8
  9. Christopher Richards

    Toby Inkster Guest

    Leif K-Brooks wrote:
    > Toby Inkster wrote:
    >> What's wrong with:
    >>
    >> <object data="myfilm.avi" height="120" width="180" type="video/x-msvideo">
    >> <p>Your browser doesn't appear to support emebedded AVI video files, so
    >> please download <a href="myfilm.avi">my film</a> and view it in your
    >> favourite media player.</p>
    >> <p>Here is a still image from the film to whet your appetite:<br/>
    >> <img src="mystill.png" style="height:120px;width:180px"/></p>
    >> </object>

    >
    > Missing alt attribute?


    Correct.

    > Using CSS for specifying an image's height and width instead of the
    > HTML height and width attributes?


    Presentational crap best handled by CSS.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jan 18, 2005
    #9
  10. Christopher Richards

    Spartanicus Guest

    "Christopher Richards" <>
    wrote:

    >First, I wouldn't try streaming an AVI or
    >downloading video. AVI is just no good for the web. It is great format for
    >editing but not final web output.


    AVI is a "wrapper" format, as such it can contain any known compression
    format. You may be thinking of uncompressed AVI.

    --
    Spartanicus
     
    Spartanicus, Jan 18, 2005
    #10
  11. Toby Inkster wrote:
    > Leif K-Brooks wrote:
    >
    >>Using CSS for specifying an image's height and width instead of the
    >>HTML height and width attributes?

    >
    > Presentational crap best handled by CSS.


    Unless you're trying to resize the image with HTML -- and that's a bad
    idea anyway -- the width and height attributes aren't presentational.
    They're specifying intrinsic data about the image's content, just like
    the src attribute does.
     
    Leif K-Brooks, Jan 18, 2005
    #11
  12. "Jim Roberts" <> wrote in message
    news:Xns95E213494D4B846karU4EtHapruK@130.133.1.4...
    > "Christopher Richards" <>
    > wrote in news:CG%Gd.12704$:
    >
    >> Is it possible to correctly validate an xhtml page with the object ID
    >> and embed necessary to implant a windows media player in an html page?
    >> Here is the code suggested by http://www.streamalot.com/embed.shtml.
    >> This validator http://validator.w3.org/file-upload.html doesn't like
    >> it at all.
    >>
    >>

    >
    > Some of the attributes, such as "align" and "pluginspage" aren't valid
    > attributes. About the best I could do using xhtml is the following:
    >
    > <p><object id="mediaplayer1" width="180" height="200"
    > classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
    > codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2
    > inf.cab#Version=5,1,52,701"
    > standby="Loading Microsoft Windows Media Player components..."
    > type="application/x-oleobject" >
    > <param name="FileName" value="Server/file" />
    > <param name="ShowStatusBar" value="true" />
    > <param name="DefaultFrame" value="mainFrame" />
    > <!-- For other browsers * Windows Media Player -->
    > <!--[if !IE]> <-->
    > <object width="180" height="200" type="application/x-mplayer2">
    > <param name="FileName" value="Server/file" />
    > <param name="ShowStatusBar" value="true" />
    > <param name="DefaultFrame" value="mainFrame" />
    > </object>
    > <!--> <![endif]-->
    > </object></p>
    >
    > It works for IE and Gecko based browsers and does validate as xhtml
    > strict. Not sure about others, but I don't think Opera supports the
    > object element. There's probably a better method. You
    > might consider using an html doctype.
    >
    > --
    > regards,
    > Jim Roberts

    Jim, I'd like to follow up on your suggestion of using an html doctype. Do
    you have a link to where I can read more?
     
    Christopher Richards, Jan 19, 2005
    #12
  13. Christopher Richards

    Jim Roberts Guest

    "Christopher Richards" <>
    wrote in news:3MjHd.12967$:

    > Jim, I'd like to follow up on your suggestion of using an html
    > doctype. Do you have a link to where I can read more?
    >


    It seems I misspoke. Apparently, the embed element is not valid with any
    document type.

    > Note: The <embed> element is supported by both Internet Explorer and
    > Netscape, but it is not a standard HTML or XHTML element.
    > The World Wide Web Consortium (W3C) recommend using the <object>
    > element instead.
    > http://www.w3schools.com/media/media_browservideos.asp


    If you want your code to validate, you won't be able to use <embed>.
    --
    regards,
    Jim Roberts
     
    Jim Roberts, Jan 19, 2005
    #13
  14. Christopher Richards

    Jim Roberts Guest

    Jim Roberts, Jan 19, 2005
    #14
  15. Christopher Richards

    Toby Inkster Guest

    Are height and width attributes on images presentational? [Re: Object ID embed and validation??]

    Leif K-Brooks wrote:

    > They're specifying intrinsic data about the image's content, just like
    > the src attribute does.


    What about with vector graphics?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Jan 19, 2005
    #15
  16. Re: Are height and width attributes on images presentational? [Re:Object ID embed and validation??]

    Toby Inkster wrote:
    > Leif K-Brooks wrote:
    >
    >
    >> [The width and height attributes of an image] specifying intrinsic
    >> data about the image's content, just like the src attribute does.

    >
    > What about with vector graphics?


    It's a tough question, but I would lean towards calling size
    specifications content even with vector. Most vector formats specify a
    default size, just like raster graphics do; the HTML document is just
    saying that "the vector graphic I'm referring to here has size X and
    height Y; I'm simply duplicating that same information here for
    efficiency's sake." It's kind of similar to how <a href="sample.css">a
    stylesheet that makes things red</a> is content, even though it talks
    about the presentation of another document.
     
    Leif K-Brooks, Jan 20, 2005
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The Doormouse

    SVG, Embed and validation issues

    The Doormouse, May 5, 2004, in forum: HTML
    Replies:
    4
    Views:
    1,397
    The Doormouse
    May 5, 2004
  2. Andy Tang
    Replies:
    3
    Views:
    32,141
    Toby Inkster
    May 11, 2006
  3. code_wrong

    object to object -- embed instead

    code_wrong, May 21, 2006, in forum: HTML
    Replies:
    4
    Views:
    466
    code_wrong
    May 23, 2006
  4. ray
    Replies:
    0
    Views:
    126
  5. about embed and object tag

    , Apr 14, 2007, in forum: Javascript
    Replies:
    1
    Views:
    121
Loading...

Share This Page