Windows Media Player Control SDK Banner Art
*Contents *Index  *Topic Contents
*Previous Topic: Playback Methods and Properties
*Next Topic: Using Playlists

Customizing the User Interface

You can control the way the Microsoft® Windows Media™ Player control looks when it is embedded in a Web page. You can make it look just like the Windows Media Player application, complete with standard control buttons, a trackbar, and text display for the media file information. You can enable just the video display panel and control buttons of the Windows Media Player, so that the video playback takes up the least amount of space on a page. For audio-only playback, you can even disable all display of the Windows Media Player control, and create your own control buttons and text displays in HTML.

The display element of the Windows Media Player control is determined by a number of properties that are set when the control is created on the Web page. This article is a guide of how the value of those properties affect the way the Windows Media Player control is displayed.

This article contains the following sections.

User Interface Elements

The Windows Media Player control also exposes properties that determine which elements of the user interface are enabled and displayed to the end user. The following figure depicts the elements of the Windows Media Player user interface.

Windows Media Player control user interface elements

The following properties determine which user interface elements are displayed.

Sizing the Windows Media Player Control

One powerful feature of the Windows Media Player is its ability to stretch or shrink a clip from its original dimensions. Changing clip dimensions can be done programmatically by changing the value of the DisplaySize property. This property can be set to a wide range of values, from one half the size of the source image to full-screen display. It can only be set when the value of the AllowChangeDisplaySize property is true.

For Windows-based applications, the initial dimensions of the Windows Media Player control are determined at design time. For example, in Microsoft® Visual Basic® you select the control from the toolbox and use the mouse to draw the Windows Media Player object on the form. On a Web page with an embedded control, the HEIGHT and WIDTH parameters of the OBJECT tag determine the initial size of the control. If the height and width are specified, and the value of the AutoSize property is false, media clips conform to the dimensions of the Windows Media Player.

Specifying the size is an ideal way to tailor the Windows Media Player to specific media content. However, because clips can be stored and streamed in a variety of shapes and sizes, it is often advantageous to have the Windows Media Player conform to the dimensions of the clip. Setting the AutoSize property to true allows the Windows Media Player to stretch or shrink to accommodate the clip played at the specified display size.

When the AutoSize and ShowControls properties are both true, the control bar might determine the minimum width of the Windows Media Player. The Windows Media Player can resize itself no smaller than the control bar with all of its buttons displayed. Adding position and audio controls increases the width of the control bar. The following table describes the different widths of the control bar.

Width ShowAudioControls ShowPositionControls
Narrowest False False
Wide True False
Wider False True
Widest True True

If the AutoSize property is false, the HEIGHT and WIDTH parameters specify the dimensions of the entire control, including the control panel, display panel, status bar, and so forth. If the specified height is insufficient for both the controls and the video display, the video shrinks to fill the available space. If the specified width is insufficient to accommodate the control bar, buttons on the right side of the control bar are cut off.

If the Windows Media Player control is embedded in a Web page, using HEIGHT and WIDTH parameters has the following effects:

Embedding the Windows Media Player control without specifying HEIGHT and WIDTH parameters has the following effects:

Additional User Interface Attributes

You can add a colored video border around the display area to tailor the appearance of the Windows Media Player to your Web site. The following properties determine how the video border looks:

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

Faceplates

A faceplate is an HTML application that uses a customized user interface to the Windows Media Player control. It generally uses just the video display panel for video output, or no display at all for audio output. The user interface is typically written in dynamic HTML (DHTML), and uses Web scripts to control the Media Player playback. It enables you to customize the look and feel of the Media Player to the content it is presenting.

For more information about creating Media Player faceplates, see the Faceplate Authoring Guide.


Top of Page Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.