次の方法で共有


Using Script in a Web Page Displayed by Firefox

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Script on a webpage can use the Player object model to control the Player as the user interacts with the page. For example, the following INPUT element has script that sets the Player volume.

<INPUT type="button" value="Vol" OnClick="ChangeVolume()"/>
 
<SCRIPT>
  function ChangeVolume()
  {
    Player.settings.volume = 90;
  }
</SCRIPT>

Many of the objects in the Windows Media Player object model are supported by Internet Explorer and by the Firefox plug-in. However, there are some objects that are not supported by the Firefox plug-in. The following table lists all of the objects in the Player object model and shows which objects are supported by the Firefox plug-in.

Object Firefox support
Cdrom no
CdromCollection no
ClosedCaption yes
Controls no
DVD no
Error yes
ErrorItem yes
Media yes
MediaCollection no
MetadataPicture no
MetadataText no
Network yes
Player yes
PlayerApplication no
Playlist yes
PlaylistArray no
PlaylistCollection no
Query no
Settings yes
StringCollection no

 

The Firefox plug-in supports the Player object, but certain properties of the Player object return NULL in a Firefox browser. For example, the cdromCollection property of the Player object returns NULL because the Firefox plug-in does not support the Cdrom object. Similarly, the dvd, mediaCollection, playerApplication, and playlistCollection properties of the Player object return NULL in a Firefox browser.

The Player.pluginVersionInfo property is supported by the Firefox plug-in but not by Internet Explorer. This property returns the version of the Firefox plug-in.

The Firefox plug-in supports the Media object, including the getItemInfoByType property. However, in a Firefox browser, the getItemInfoByType property does not support the MetadataText and MetadataPicture return types.

The Firefox plug-in supports the Settings object except for the setMode method and the requestMediaAccessRights property. In a Firefox browser, the requestMediaAccessRight property always returns false.

Using the Windows Media Player Control with Firefox