Microsoft ASP.NET Futures (July 2007): Using the Media Control
This sample shows:
- The ASP.NET
Media server control control and its built-in skins.
To run this sample, your browser requires the latest release of Silverlight. If the
browser does not have the correct version of Silverlight, the Xaml and Media
controls automatically render placeholder UI that your end-user can click to install Silverlight.
The ASP.NET Futures (July 2007) release introduces a number of changes to the
Media server control and the Sys.Preview.UI.Xaml.Media.Player
client JavaScript component. For details, see Using the Media Control.
Example 1: Using the Media Control
In this example, the Media control enables you to select a built-in skin and point to the
media file. The example shows you how to use the following properties to manipulate the player's appearance
and size.
AutoPlay: Specifies that the the media source begins playing as soon as it has finished loading.
Height, Width: Define the size of the player.
ScaleMode: Specifies how the media is scaled. Values (an enumeration) include Stretch (fills the given size), None (the skin and video will
be rendered at the natural size that the XAML is authored for, (although the server control may limit size), or Zoom (
the skin and video will fill the given size, while maintaining aspect ratio).
MediaSkin: Specifies the built-in skin that defines the appearance of the Media control.
Here is the effect of using ScaleMode="None", but the Height and Width are
defined, hence the media is clipped.
Here is the effect of using the default Height and Width, but ScaleMode=Zoom.