VIDEO.maintainAspectRatio

[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.]

The maintainAspectRatio attribute specifies or retrieves a value indicating whether the video will maintain its aspect ratio when trying to fit within the width and height defined for the control.

        elementID.maintainAspectRatio

Possible Values

This attribute is a read/write Boolean.

Value Description
true Default. Video maintains its aspect ratio when resizing.
false Video does not maintain its aspect ratio when resizing.

Requirements

Requirement Value
Version
Windows Media Player version 7.0 or later

See also

VIDEO Element