web内置对象_Web多媒体:对象标签

web内置对象

<object> and <embed> have been the traditional means of embedding multimedia in web pages since the inception of HTML4; <audio> and <video> tags, introduced with HTML5, are beginning to threaten their relevance. However, the <object> tag still has its place.

自HTML4诞生以来, <object><embed>一直是在网页中嵌入多媒体的传统方法; HTML5引入的<audio><video>标签开始威胁它们的相关性。 但是, <object>标记仍然存在。

<object>:Web多媒体的原始万能解决方案 (<object>: the original, catch-all solution for web multimedia)

As the web matured, it became obvious that developers wished to include more than text and bitmapped images on web pages. However, it was not reasonable to expect that HTML could be expanded with tags to cover every different form of multimedia such as video, audio, 3D, and interactive content. At the same time, programmers could not be expected to release a new version of a web browser to support every new rich media format as it came along.

随着网络的成熟,很明显,开发人员希望在网页上包含更多文本和位图图像。 但是,期望HTML可以用标签扩展以涵盖各种不同形式的多媒体(例如视频,音频,3D和交互式内容)是不合理的。 同时,不能期望程序员发布新版本的网络浏览器来支持每种新的富媒体格式。

To meet both of these challenges, a catch-all <object> tag was developed. Under this scheme, the browser would continue to handle what it was built for: interpretation of HTML and CSS, and display of text and graphics. If it encountered an <object> tag on a page, the browser, unable to recognize the content inside, would pass the object and its content to an associated helper application, typically referred to as a plugin.

为了应对这两个挑战,开发了一个包罗万象的<object>标签。 在这种方案下,浏览器将继续处理其构建目的:HTML和CSS的解释以及文本和图形的显示。 如果浏览器在页面上遇到<object>标记,则无法识别其中内容的浏览器会将该对象及其内容传递给关联的帮助程序(通常称为插件)。

While this introduced many issues of its own, including the fact that the user would become responsible for downloading, installing, maintaining and upgrading plugins, along with their associated security issues, and (most importantly) the fact that browsers without the appropriate plugin would completely ignore whatever content was inside an associated <object> tag, it did solve the immediate problem of adding rich media to the web.

尽管这本身带来了许多问题,包括用户将负责下载,安装,维护和升级插件,以及与之相关的安全性问题,以及(最重要的是)没有适当插件的浏览器将完全负责这一事实。忽略关联的<object>标记内的任何内容,确实解决了将富媒体添加到Web的直接问题。

As this was still the time of the “browser wars”, there was, of course, an alternative: the <embed> tag, which had been introduced by Netscape before <object>. Both tags fulfilled the exact same functionality. For reasons of backwards compatibility with very old browsers, you will sometimes see the <embed> tag wrapped inside <object>, but technically only <object> needs to be used. Adding to the confusion, we often refer to the process of adding rich media as “embedding” multimedia on a web page. The term “embedding” is used generically, and does not specifically refer to the <embed> tag.

由于这仍然是“浏览器大战”的时间,因此当然还有一个选择: <embed>标记,它是Netscape在<object>之前引入的。 这两个标签都具有完全相同的功能。 出于与旧版浏览器向后兼容的原因,有时会看到<embed>标签包裹在<object>,但是从技术上讲,仅需要使用<object> 。 更令人困惑的是,我们通常将添加富媒体的过程称为在网页上“嵌入”多媒体。 术语“嵌入”通常被使用,并不专门指代<embed>标签。

<object>标签语法 (<object> tag syntax)

The <object> tag is closed and requires several attributes. It also contains <param /> tags within it that provide more information regarding how the embedded media should be treated. For example, a Quicktime .mov file:

<object>标记已关闭,并且需要多个属性。 它还在其中包含<param />标记,这些标记提供了有关如何处理嵌入式媒体的更多信息。 例如,一个Quicktime .mov文件:

<object type="video/quicktime" data="assets/video/diables.mov" style="width: 320px; height: 256px;:>
	<param name="autoplay" value="false">
	<param name="controller" value="true">
</object>

The data attribute value is the source of the media to be presented; you will sometimes see this alternatively presented as the src attribute.

data属性值是要显示的媒体的来源; 您有时会看到它以src属性的形式出现。

翻译自: https://thenewcode.com/123/Web-Multimedia-The-object-Tag

web内置对象

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值