It is currently Sat Dec 02, 2017 4:16 pm Advanced search
<audio> and <video> are for embedding audio and video on Web pages, or for games or special effects. <embed> is allowed because browser interoperability is better than with <object>, and it's simpler to use. Also because many authors use <embed> and it works fine; why should the validator complain about it?campax wrote:My question is quite simple: why do we have "audio", "video" and "embed" tags?
No, not really -- the media elements have audio and video specific DOM APIs that <object> does not.campax wrote:Everything you can do with those, can be done using the more general "object"
You mean XHTML2?campax wrote:XHTML1.1 went in the direction of making "any media content" an object, and I agree with that (altough you can't deprecate img)
<embed> came before <object> in browsers. I believe one reason HTML4 didn't include <embed> was that DTDs couldn't express "any attribute is allowed". <audio> and <video> are new, yes.campax wrote:But with embed (that was not part of html 4 altough supported by netscape based browser) and audio - video, that are completely new?
Params are plugin-specific, and you can't know which plugins the user has. <audio> and <video> are plugin agnostic (indeed they might be implemented natively in the browser).campax wrote:Ok, you may reply that video has many video-specific attributes (loop-autoplay-controls). Object actually has infinite attributes, just use appropriate params.
Do you mean that it should be possible to say to any plugin "play video" or "pause video", etc? What should happen if the plugin doesn't do video?campax wrote:Ok, you may say that video provide video-specific ecmascript interfaces, and they're really useful, I agree. But we need is not video or audio specific bindings, what we really need is a consisten javascript framework to interact with any plugin.
Those attributes weren't for "download the plugin" in HTML4, and browsers do different things with those attributes.campax wrote:Moreover, I was wondering where are code / codebase / classid attributes, part of HTML 4, which allowed the user agent to easily download the plugin instead of simply notify the user. And don't forget that code doesn't need to be binary code, it could be just javascript (and it will make a sandboxed version of xbl)
You're free to use <object> instead of <img alt>.campax wrote:Object are more general, are more extensible and most important provide a fantastic (altough not very semantic) way to provide fallback content, much better than img alt attribute.
zcorpan wrote:<audio> and <video> are for embedding audio and video on Web pages, or for games or special effects. <embed> is allowed because browser interoperability is better than with <object>, and it's simpler to use. Also because many authors use <embed> and it works fine; why should the validator complain about it?
zcorpan wrote:No, not really -- the media elements have audio and video specific DOM APIs that <object> does not.
Params are plugin-specific, and you can't know which plugins the user has. <audio> and <video> are plugin agnostic (indeed they might be implemented natively in the browser).
Do you mean that it should be possible to say to any plugin "play video" or "pause video", etc? What should happen if the plugin doesn't do video?
zcorpan wrote:<object> has many interoperability problems in browsers, and this is because it is so complex and overloaded to do lots of different things -- the lesson learnt is that we shouldn't extend it to do even more things. Hence, new elements.
zcorpan wrote:Those attributes weren't for "download the plugin" in HTML4, and browsers do different things with those attributes.
zcorpan wrote:How is <object> more extensible than <video>? I would say the opposite -- <object> is such a mess today that browser vendors really don't want to extend it at all. <video> however has been extended with new features many times, and I expect it to be further extended in the future.
zcorpan wrote:I agree <object> is more general than <video> -- that's the whole point. You should use <object> when there isn't a more specific element for the task at hand.
Browsers are not going to remove support for <embed>.campax wrote:it's not a matter of validation, it's a matter of semantics
...
I'm not asking to extend object, I'm asking to remove embed, which does exactly the same thing, and it does it worse.
Same reason some image formats should be more important than others...campax wrote:If a browser implemented video/audio natively:
1) it would need to implement all codecs available (why some should be more important than others?)
But the message would be plugin-specific just like <param>s?campax wrote:I mean that it should be possible to send message to a plugin, eg. through postMessage or execCommand, passing the appropriate message, instead of using specific video/audio/whatever apis.
I would argue that contentEditable is handled by the browser and not an external plugin.campax wrote:We already do that with integrated rich edit controls (that are handled by external, although shipped togheter, plugins), to whom we communicate using execCommand instead of using a native API.
Well you're free to use <object> to your heart's content, so I'm not sure what the problem is here.campax wrote:You see, the incredible extensibility of object it's a quality, not a fault
Wrong. HTML4 forbid it and still UAs implemented it. Why would UAs not implement it if HTML5 forbid it?campax wrote:1) if you forbid embed, like html4 did, then new user agent won't implement it (and maybe neither will do new version of current useragents)
I still don't see your point.campax wrote:2) there are no image formats more important than others, simply there are only few formats widely distributed (jpg - gif - png - svg) - and some of them are supported through plugins (eg. svg in IE7)
maybe for ogg codecs it will be possible to implement it natively, but i don't think it would be possible for proprietary codecs (i think Microsoft would complain about a native implementation of WindowsMedia in Firefox, and so would do RealMedia or DivX) - the only exception is QuickTime, whose copyrigth is owned by Apple, which in turn distributes WebKit (yes, it is under GPL, but is mainly maintained by Apple developers)
Ok. I guess this could be a nice thing to have but it's probably a lot harder to do than it sounds.campax wrote:3) they would be content specific but element (and thus plugin) agnostic
for example I could say
'stop'
and the behaviour would be dependent on which plugin is loaded (eg. for a video it would stop the video, for a java applet it would call JApplet.stop )
So?campax wrote:4) in Firefox it is handled by Midas (https://developer.mozilla.org/En/Midas), which is shipped as a part of Gecko but is developed separately
in IE it is completely separated (it is a COM component)
We can't change history and now we're stuck with two elements. We can get both to work cross-browser (so you can use either) but dropping one of them is not possible at this point.campax wrote:5) the problem is that I don't see why we should have two element (embed and object) implement badly and therefore need to write both to get cross-browser compatibility, instead of just one
zcorpan wrote:The Web requires <embed> to be supported, and hence, UAs will support it, spec or no spec. If there's no spec, interop suffers. We're here to get better interop.
zcorpan wrote:I still don't see your point.
zcorpan wrote:Ok. I guess this could be a nice thing to have but it's probably a lot harder to do than it sounds.
zcorpan wrote:So?
zcorpan wrote:We can't change history and now we're stuck with two elements. We can get both to work cross-browser (so you can use either) but dropping one of them is not possible at this point.
Indeed.campax wrote:Spec are not only for user agents, they're also for web developer.
embed has never been allowed in any HTML spec prior to HTML5, and yet it has been widely used. So I don't think authors will stop using it in the next few years regardless of what HTML5 says.campax wrote:Say that embed is supported for backward compatibility and web dev won't use it any more (and in a few years it will disappear)
Ok. I agree with that.campax wrote:You just can't implement video natively (not all video, at least)
Because for <video> and <audio>, there are somewhere between 0 and 3 "plugins" (GStreamer, QuickTime and DirectShow) you have to talk to, and they all have pretty similar APIs, whereas with your idea (if I understand it correctly) you would have to talk to all various plugins (like Flash, QuickTime, Java, etc) that have very different APIs. You'd need to maintain a mapping spec between message and plugin API for all the plugins you want it to work with.campax wrote:Why? Just, when loading the plugin shared library, instead of querying IVideo (imaginary interface exposing play() - stop() - setCurrentTime() etc.), query for the more general IPlugin, that expose a MessagePort like that used for inter views communication.
Ok.campax wrote:So rich editing control are separate modules.
Right, this brings me back to the question:campax wrote:You deprecated body and applet, while providing a cross-browser spec for that. Why can't you do the same with embed?
In the case of <body bgcolor> etc, they're attributes that were deprecated in HTML4 and authors should use CSS instead. In the case of <applet> it's because Hixie argues HTML shouldn't support plugin-specific elements (we don't have <flash> or <silverlight> either), so if you want to use Java applets you should use the plugin-agnostic <embed> or <object> elements.zcorpan wrote: why should the validator complain about it?
Why?joedw wrote:With the current spec, would it make long term sense to:
1. Obsolete using <embed>, especially as a fallback for <object>.
It seems this is fixed already. Are you reading the Editor's draft or an older version?joedw wrote:"4.9.6 Page load processing model for content that uses plugins
...
When a resource that requires an external resource to be rendered is to be loaded in a browsing context, the user agent should create a Document object, mark it as being an HTML document, append an html element to the Document, append a head element and a body element to the html element, append an embed to the body element, and set the src attribute of the img
element to the address of the image.
These words should be tuned to allow any embedded content instead of just image
Why?joedw wrote:and I think embed could be dropped and use object instead for this.
I don't follow.joedw wrote:Suggest content type resource defined same as <object> using served MIME or inspection.
Why?joedw wrote:Suggest address of the 'img element' should be absolute URL of external content resource.
With the current spec, would it make long term sense to:
1. Obsolete using <embed>, especially as a fallback for <object>.
Why?
"4.9.6 Page load processing model for content that uses plugins
...
When a resource that requires an external resource...
It seems this is fixed already. Are you reading the Editor's draft or an older version?
and I think embed could be dropped and use object instead for this.
Why?
It's not clear to me that it would be useful to discourage it's use.joedw wrote:joedw wrote:With the current spec, would it make long term sense to:
1. Obsolete using <embed>, especially as a fallback for <object>.
zcorpan wrote:Why?
Sorry slow getting back here, but so many whys ...
<embed> should be obsoleted because this step would present an excellent way to discourage its use, especially as a fallback content container in an <object> element.
joedw wrote:The only possible case for using <embed> is for old browsers that failed to implement <object> in a reasonable way.
It's only obsolete if we say that it is obsolete. Per the current spec, it is not obsolete.joedw wrote:joedw wrote:and I think embed could be dropped and use object instead for this.
zcorpan wrote:Why?
Because <embed> is really obsolete.
Actually, a lone <embed> works better cross-browser than a lone <object>.joedw wrote:If an author is told about the actual very limited subset of browsers that are out there that need <embed> then the author would probably not use it.
I don't follow.joedw wrote:I think another great reason to obsolet <embed> is that it is the last remnant of the long string of pairs that sometimes are involved in <embed>. The other use was in the feature string of .open and that has now been dropped, and in fact ignored, as I last saw it. While ignoring this string is probably not the best idea for <embed> it is simple to recode using <param>s instead.
<img> can also be handled by a straightforward restyling to <object> syntax. It doesn't follow that <img> or <embed> should be obsoleted.joedw wrote:Finally, any use of embed can be handled by a straighforward restyling to <object> syntax with <param>s.
.It's not clear to me that it would be useful to discourage it's use
No. Another possible case for using <embed> is for including, say, Flash on a page, for all browsers.
It's only obsolete if we say that it is obsolete. Per the current spec, it is not obsolete.
Actually, a lone <embed> works better cross-browser than a lone <object>.
I think another great reason to obsolete <embed> is that it is the last remnant of the long string of pairs that sometimes are involved in <embed>.
I don't follow.
<img> can also be handled by a straightforward restyling to <object> syntax. It doesn't follow that <img> or <embed> should be obsoleted.
Ok.joedw wrote:I see that. It is useful to discourage its use because it is an archaic structure that uses syntax not found anywhere else. See, <object> 'fixed' <embed> by giinvg an orderly authoring interface.
Which great string are you referring to?joedw wrote:Like I said, Flash was one of the first and <embed> got tuned for it. However, of course even Flash will run from <object>. I just know authors love the great string sometimes used to set up the plugin.
I guess because it's at least equally well supported, and because it's less verbose in syntax, and doesn't seem to have any bad effects.joedw wrote:Hi, I get that. I just don't understand why.
It's great that object works better now than a few years ago.joedw wrote:If so, that is too bad. True at some point in the past, but not in my current experience from what I see now, I think I probably have a better chance of getting <object> going anywhere.
I agree that this is outdated advice.joedw wrote:Besides, the recommendation for Flash is currently <object> with fallback to <embed>. The reason for the fallback? In case the host doesn't do <object>. That reason is appropriate for authors that target some really old hosts, so is now useless as a tactic unless one of your buddies has NS4. Then you either need it or you gotta tell your buddy to update. I really don't think there are many of those folks around.
joedw wrote:Then you are writing <embed> elements for very simple things that don't need any commands or parameters. Remember that long string of commands you may need to send? In <object> they are <param>s. In <embed> they are a quoted string li>ke the old .open. Just mostly uneditable or at least difficult to deal with, that is all.
Ok.joedw wrote:Here we are discussing a live, scriptable object that may wish to use services via the DOM. "Dead' elements don't count. Really, I don't think <img> has a place in this conversation. I brought it in because the old spec test mentioned it (now changed).
Did I?joedw wrote:You hinted that there might be some plugins that wouldn't want to use <object>.
It was certainly the case a few years ago (around 2005). If object works better now, then that's great.joedw wrote:You also hinted at better cross-browser operation with <embed>. My examples don't show that, but the landscape changes with each update so I will check more.
Ok.joedw wrote:I try to keep track because any W3C browser that has trouble with <object> has to be off the main list of usable tools. Fortunately I don't find them anymore
Likewise for any plugin that 'needed' <embed>. But I don't think there are any of those.
Not that I know of.joedw wrote:Are small footprint mobile browsers limited to <embed>?
Return to Feedback on the Specs
Users browsing this forum: No registered users and 0 guests