当前位置: 首页 > 网络学院 > 网页制作基础教程 > Internet > 播放QuickTime电影

Internet
w3c技术架构介绍

Internet 中的 播放QuickTime电影


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 867 ::
收藏到网摘: n/a

The <object> element can play QuickTime movies.
<object>元素可以播放Quick Time 电影。


The QuickTime Format
QuickTime 电影格式

The QuickTime format is developed by Apple. Videos stored in the QuickTime format have the extension .mov.
QuickTime格式是由苹果公司开发的。以QuickTime格式存储的视频文件的扩展名是:.mov。

QuickTime is a common format on the Internet, but QuickTime movies cannot be played on a Windows computer without an extra (free) component installed.
QuickTime是互连网的通用格式,但是QuickTime电影不能在Windows计算机中播放影片,除了安装额外的插件。

With the object element, code that will play a QuickTime movie can easily be added to a web page. The object can be set to automatically install a QuickTime player if it is not already installed on the users computer.
通过对象元素,用于播放QuickTime影片的代码很容易被添加到网页中。如果用户没有在计算机中安装QucikTime播放器,那么,该对象可以设置为自动安装QuickTime播放器。


The Solution
解决方法

This is the code required to play a QuickTime movie:
下面列举了在网页中使用QuickTime播放器来播放影片的代码:

<object width="160" height="144"
classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="sample.mov">
<param name="autoplay" value="true">
<param name="controller" value="false">
<embed src="sample.mov" width="160" height="144"
autoplay="true" controller="false"
pluginspage="http://www.apple.com/quicktime/download/">
</embed>
</object>


The <object> Element
<object>元素

The width and height attributes of the object element should match the size of the movie in pixels.
该对象的width [宽度]height [高度]属性是以像素为单位的,并且应该符合电影的尺寸大小。

The classid attribute uniquely identifies the player software to use. It must be set to "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B". This unique code identifies an ActiveX control that must be installed on the users PC before the movie can be played. If the user does not have the ActiveX control installed, the browser can automatically download and install it.
classid 属性独立地确认了所使用的播放器软件。它必须设置为“clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B”。这段独立的代码用于鉴别ActiveX控件,帮助用户在播放影片之前安装这个所需要的控件程序。

The codebase attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes. When absent, its default value is the base URI of the current document. Note: Internet Explorer uses this attribute to specify a location from where the player can be downloaded. It must be set to "http://www.apple.com/qtactivex/qtplugin.cab". This location will always contain the latest version of the QuickTime player.
codebase 属性指定了基本路径,它用于解决由classid、data [数据] 和 archive [档案]所指定的相对URIs。如果缺少这个值,那么默认值是当前文档的基准URI。注意:IE使用这个属性来指定来指定所可以下载的播放器的地址。它必须设置为“http://www.apple.com/qtactivex/qtplugin.cab”。这个地址通常包含了QuickTime播放器的最新版本。

The src parameter should point to the movie file.
src参数应该指向电影文件。

The autoplay parameter should have the value "true" if you want the movie to play automatically.
如果你希望自动播放影片,那么autoplay 参数应该设置为“True”。

The controller parameter should have the value "false" if you don't want the control buttons to show.
如果不希望显示控件按钮,那么,controller [控件] 参数应该设置为“False”。


The <embed> Element
<embed>元素

The embed element is added to support browsers that don't support the object element. A browser that understands the object element will ignore the embed element. The object element will be used by new browsers that support ActiveX controls (Internet Explorer 5 and 6). Older browsers (Netscape 4 and 5) will use the embed element.
embed [嵌套] 元素可以添加到那些不支持object [对象] 元素的浏览器中。浏览器会识别对象元素,但它会忽略嵌套元素。对象元素将在支持ActiveX控件的全新浏览器(IE5 和 IE6)中使用。其它的将使用嵌套元素。

The width and height attributes of the embed element should match the size of the movie in pixels.
该对象的width [宽度]height [高度]属性是以像素为单位的,并且应该符合电影的尺寸大小。

The autoplay and controller attributes of the embed element should be set to the same values as for the parameters in the object element.
embed [嵌套] 属性中的autoplay 参数和controller 属性就对象元素的参数来说应该设置为同样的值。

The pluginspage attribute defines the players download path. It must be set to "http://www.apple.com/quicktime/download/".
pluginspage属性用于定义浏览器的下载路径。它必须设置为“http://www.apple.com/quicktime/download/”

评论 (0) All

登陆 | 还没注册?