Dela via


MediaPlayerSurface Class

Definition

Provides access to a ICompositionSurface that is shared between a MediaPlayer and a Compositor to enable the rendering of MediaPlayer content using the Windows.UI.Composition APIs without requiring the use of the XAML framework.

public ref class MediaPlayerSurface sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaPlayerSurface final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaPlayerSurface : System.IDisposable
Public NotInheritable Class MediaPlayerSurface
Implements IDisposable
Inheritance
Object Platform::Object IInspectable MediaPlayerSurface
Attributes
Implements

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

Get an instance of this class by calling MediaPlayer.GetSurface.

For more information on using the Windows.UI.Composition APIs to render visuals, see Visual layer.

For how-to guidance for rendering video to a composition surface, see Play audio and video with MediaPlayer.

Properties

CompositionSurface

Gets the ICompositionSurface for rendering MediaPlayer content.

Compositor

Gets the Compositor with which the surface will be used.

MediaPlayer

Gets the MediaPlayer associated with the MediaPlayerSurface.

Methods

Close()

Closes the MediaPlayerSurface and disposes of associated resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Applies to

See also