Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.64 KB

mediaplayer_getsurface_812026623.md

File metadata and controls

34 lines (23 loc) · 1.64 KB
-api-id -api-type
M:Windows.Media.Playback.MediaPlayer.GetSurface(Windows.UI.Composition.Compositor)
winrt method

Windows.Media.Playback.MediaPlayer.GetSurface

-description

Gets a MediaPlayerSurface object for the MediaPlayer, which allows you to render the player's contents using a Compositor without relying on the XAML framework.

-parameters

-param compositor

The Compositor with which the returned surface will be used.

-returns

The media player surface.

-remarks

By default, the CompositionSurface generated by this method will have the dimensions 640x 480, in pixels. To get a different size, call SetSurfaceSize before calling GetSurface.

You can obtain multiple surfaces from a single MediaPlayer instance by calling GetSurface multiple times.

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.

-examples

-see-also

Play audio and video with MediaPlayer