Control Compatibility Modes

The Media Player control is designed to be a universal player for all types of multimedia data. It works equally well rendering NetShow's streaming media types and Active Movie's local playback media types. The Media Player control incorporates many of the attributes supported by the NetShow version 2.0 Player and ActiveMovie controls, along with new methods, properties, and events. In addition, the Media Player control can operate in one of the following three modes to provide compatibility with the NetShow version 2.0 Player and ActiveMovie controls:

All three modes provide the enhanced streaming and playback capabilities of the Media Player; however, each mode supports its own set of attributes.

The class ID used to instantiate the control determines the mode of operation. Using the class IDs previously reserved for the NetShow Player control or the ActiveMovie control will instantiate the MediaPlayer control in that alternate mode. This means that applications and Web pages created with the NetShow Player or ActiveMovie controls can utilize the improved performance of the MediaPlayer control with little or no changes to their code. In many cases, a Web page can be updated by simply changing the Codebase attribute to specify the .cab file containing the MediaPlayer control.

Installing the NetShow Player control or ActiveMovie control on your development platform after installing the MediaPlayer control will cause unexpected results.

Forward Compatibility

In addition to the attributes supported when the control is instantiated in NSPlay or ActiveMovie mode, a new property named MediaPlayer is exposed. This property provides access to the methods and properties supported in MediaPlayer mode. The following syntax is used to access MediaPlayer attributes when the control is operating in NSPlay or ActiveMovie mode:

AlternateMode.MediaPlayer.Atribute

Where AlternateMode is the player control object ID instantiated using the NSPlay or ActiveMovie class ID, and Attribute is any method or property exposed by the control in MediaPlayer mode. For example, to access the Volume property from code written for existing the NetShow version 2.0 Player control, use the following:

NSPlay1.MediaPlayer.Volume

Backward Compatibility

In addition to forward compatibility, the control also provides access to NetShow version 2.0 Player and ActiveMovie attributes in MediaPlayer mode. Two properties, NSPlay and ActiveMovie, are exposed when the control is instantiated normally. The following syntax is used to access NetShow Player or ActiveMovie properties and methods when the control is operating in MediaPlayer mode:

NormalMode.NSPlay.Attribute

Or

NormalMode.ActiveMovie.Attribute

Where NormalMode is the player control instantiated with the Media Player class ID and Attribute is any method or property exposed by the control in an alternate mode. For example, to access the Author property of the NetShow version 2.0 Player control from code written for the Media Player control, use the following:

MediaPlayer1.NSPlay.Author

Compatibility Considerations

Operating in forward and backward compatibility modes have the following restrictions:

Control Class IDs

Following is a list of the class IDs used to instantiate the control in each mode:

Control Mode Class ID
Media Player 22d6f312-b0f6-11d0-94ab-0080c74c7e95
NSPlay 2179C5D3-EBFF-11cf-B6FD-00AA00B4E220
ActiveMovie 05589FA1-C356-11CE-BF01-00AA0055595A

© 1996-1998 Microsoft Corporation. All rights reserved.