在 Firefox 中使用 Windows Media Player 插件

修订信息
  • 修订编号: 3462
  • 创建于:
  • 创建者: MXF
  • 备注: locale to Chinese (zh-CN)
  • 已审阅:
  • 可进行本地化:
修订原文
修订内容
Translation in progress.

想要在 Firefox 中播放 Windows 媒体,Firefox 需要安装 Windows Media Player 浏览器插件。该插件有两种不同的版本:

  • 通常包含在 Windows 98 到 Windows XP 家庭版/专业版中的原始版
  • 只能用于 Windows XP 和 Windows Vista 且只能通过下载以获得的新版本

许多 Windows XP 用户的系统里已经有了旧版插件,但仍然推荐您尽量安装新版的插件。

这篇文章描述了如何在 Windows XP/Vista 中检查和安装 Windows Media Player 插件。XP 用户可能已经安装了旧版插件,但是推荐安装新版的插件。

注意:即使您已经安装了 Windows Media Player,你仍可能缺少用于播放嵌入在网页内的 Windows Media 的插件。


检查插件是否安装过

查看您是否安装了插件:

  1. 在 Firefox 菜单栏上, 点击 “工具(T)”菜单,选择“附加组件(A)”,打开附加组件窗口。
  2. 在附加组件窗口内, 选择“插件”面板。这里显示了所有 Firefox 安装的插件详细列表。
  3. 滚动列表, 找到一个名叫
    Microsoft® Windows Media Player Firefox Plugin
    的项目 np-mswmp.dll

    wmp-addonswindow.png
  4. 如果存在该项目, 说明插件已经安装了。
  5. 如果没有该项目, 请转到“安装新插件”一节.


安装插件

如果上述项目没有显示,则说明该插件没有安装。您需要下载该插件。

  1. 前往 “Port25”上的插件下载页面
    • (Port25 页面也包含了更多详细的安装介绍)。
  1. 点击 "Download Now!" 会提示您保存一个文件。
  2. 将该文件保存至您的桌面。
  3. 一旦文件下载完毕,请运行该文件,这样插件就开始安装了。
  4. 当安装完成时,请退出并重启 Firefox :
    1. 在 Firefox 窗口菜单栏上点击 “文件(F)”菜单,选择“退出(X)”。
    2. 当 Firefox 完全关闭后,再次启动 Firefox。


测试插件

下面的链接是链接到一个需要新版 Windows Media Player 插件的测试用播放器。如果该播放器载入并播放了,那么插件就已经安装正确了:http://plugindoc.mozdev.org/testpages/wmp11.html

高级信息

Differences compared to Internet Explorer

File types it will play

Internet Explorer uses the Windows Media Player ActiveX Control to play media, and Internet Explorer will use it to play any media format that Windows Media Player itself can play.

The Windows Media Player plugin will only play the Windows media file types such as wmv and asx, unless the website is very specifically crafted.

This means that where an embedded mp3, for example, would play in Windows Media Player in Internet Explorer, it would play most likely using QuickTime in Firefox. Windows Media Player does not provide any way of changing the file types the Windows Media Player plugin will play.

For many of these file types, such as midi and mpeg, the QuickTime plugin will first need to be configured to play them - this can be done within its user preferences. Otherwise, you will see a missing plugin alert for QuickTime even if you already have QuickTime installed. For more information, see the QuickTime article.

As an alternative, the IE Media Mimic user script (for use with the Greasemonkey extension) can correct this issue in most cases - embedded media that would normally not play with Windows Media Player in Firefox will be made to.

Details (hidden)

  • -Internet Explorer uses ActiveX to embed other applications within itself, whereas most other browsers use the NPAPI plugin system, as Firefox does.

+ +Internet Explorer uses the Windows Media Player ActiveX control to play any file type that Windows Media Player itself can play - this includes wav, mpeg, mp3, etc. + +The NPAPI plugin system is fundamentally different: Each plugin lists the file types it can play, and the browser uses these lists to choose a plugin for a particular file. + +The Windows Media Player plugin only lists the Windows Media formats: asf, asx, wm, wma, wax, wmv, wvx. It does not play wav, mp3, mpeg, or other common formats unless the web page is very specifically crafted. + +QuickTime is the only Windows browser plugin that can be configured to play formats like mp3, mpeg, wav, etc. + +The IE Media Mimic user script modifies how the media is embedded so that it requests the Windows Media Player plugin every time for most file types. In its default configuration, the user must manually trigger it - it will not convert the page automatically.


JavaScript

Some web pages use JavaScript to build custom player control buttons or to retrieve and display information on the player's current status.

The original Windows Media Player plugin (included with Windows XP home/pro and older) did not support this capability. The new plugin (downloadable for use in XP/Vista) does, but most sites using these advanced functions still specifically target Internet Explorer. So, they won't work even with the new plugin until the page is updated to account for it.

Details (hidden)

  • -The original Windows Media Player plugin included with Windows versions up to XP Home/Professional does not support JavaScript controls. Most of these web pages therefore were specifically written to use these features on the Windows Media Player ActiveX Control. ActiveX objects are ignored in Firefox by design, as it does not have ActiveX support.

+ +For it to work in Firefox, either the object must be created differently depending on the browser used, or a second object is needed and the JavaScript controls must be intelligent enough to know which object to use.


Internet Explorer-only coding

Some websites embed media in ways that only work in Internet Explorer - either because those who wrote the site do not know how to write code that works in other browsers, or they don't know they need to, or they don't want to.

The aforementioned IE Media Mimic user script can also correct many kinds of IE-only coding.

ActiveX

ActiveX is the system Internet Explorer uses in place of the NPAPI plugin system that most other browsers use. There was a plugin for Netscape-based browsers that grants the browser partial ActiveX support - this would allow Firefox to use the Windows Media Player ActiveX Control and the majority of its functionality, and so work on many otherwise Internet Explorer-only pages.

However, the most recent version only supports Firefox 1.5 and does not work in Firefox 2 or 3. More detailed information can be found in the ActiveX控件 article.


Windows Media Player used to be available for the Mac platform, but is no longer supported by Microsoft. In its place, Flip4Mac is the replacement of choice - it adds Windows media playback capabilities to Quicktime.

Requirements

Flip4Mac is an add-on for Quicktime, so Quicktime must be installed first. For information on Quicktime, see the Quicktime article.

Installation

Download and install Flip4Mac from the official website: http://www.flip4mac.com/wmv_download.htm
The website includes more detailed installation and usage instructions.

Mplayer is a popular Linux media player that can play back Windows Media files. In order to use Mplayer to play Windows Media stream in Firefox, you must install two packages named gnome-mplayer and gecko-mediaplayer. Your Linux distribution may have these packages readily available to install.

Testing the plugin

The following link is to a test player that requires the new Windows Media Player plugin. If the player loads and plays, then the plugin is installed correctly: http://plugindoc.mozdev.org/testpages/wmp11.html



Based on information from Windows Media Player (mozillaZine KB)