Player Control Features

The Media Player control exposes a wide variety of methods, properties, and events for creating entertaining, customized applications and Web pages. This section groups the control's attributes into categories by functionality. Player control attributes can be grouped into the following categories:

This section also contains information on processing script commands embedded into multimedia streams.

Playback Methods and Properties

The Media Player control provides two techniques for specifying the multimedia content to be played. You can set the FileName property or use the Open method. Setting the FileName property to the URL of the desired title will begin playing that title if the AutoStart property is True. If AutoStart is False, the player control does not start playback until the Play method is called. The Open method starts the stream asynchronously, unlike the Play method, which waits for other processes to complete before starting.

The Media Player control provides the following VCR-like attributes for controlling stream playback:

Some types of multimedia streams support seeking to a given presentation time, or to markers. Markers are pointers to a specific time in a multimedia stream file. The player can seek directly to the time specified by each marker. This enables viewers to skip ahead or skip back to a previous marker to view a portion of the presentation again. Control attributes supported for seeking to a given time and/or seeking to markers include:

Attributes for Customizing the User Interface

The Player control exposes a variety of properties and methods for building a custom user interface. Many of these properties can be set at design time to restrict the setting of user interface properties available at run time. These properties may also determine whether or not a corresponding item can be changed by end users on the context menu that is available when the EnableContextMenu property is True.

The following properties determine the appearance of the control before a title starts playing:

The following properties are exposed for displaying various elements of the built-in user interface:

The border that is displayed around the control is determined by the state of the following properties:

The control exposes the following properties used to change the size of the image being played:

Title Information Properties

Some types of multimedia streams contain metadata detailing show and clip information. The GetMediaInfoString method can be used to retrieve the following information about the clip and show:

GetmediaInfoString also provides information about the current banner and watermark.

The following properties return information about the size and duration of the presentation:

The player also supports Synchronized Accessible Media Interchange (SAMI) for closed captioning. Properties exposed by the Player control for SAMI captioning support include:

Monitoring Stream Status and Network Reception

Stream status properties include:

Bandwidth Supported events include:

NewStream Network reception attributes include:

LostPackets Attributes for monitoring buffering include:

Multicast ASF streams also contain information about the channel being used for the multicast. Channel attributes include:

Each channel has a contact that is responsible for the multicast. Channel contact attributes include:

Capturing Keyboard and Mouse Events

The EnableContextMenu and ClickToPlay properties provide for user input through the image window. If EnableContextMenu is True, the user gets a context menu that gives them access to many of the control's properties. If the ClickToPlay property is True, users can start the player by clicking on the image window.

To receive mouse movement and click events, the SendMouseMoveEvents and SendMouseClickEvents properties must be True. Mouse events include;

To receive keyboard events, SendKeyBoardEvents must be True. Keyboard events include;

Error Handling

The SendErrorEvents and SendWarningEvents properties must be True to receive errors and warnings. Error handling and warning events supported by the Media Player control include:

Warning Error handling properties exposed by the control include:

© 1996-1998 Microsoft Corporation. All rights reserved.