MediaPlayerSurface 類別

定義

可讓您存取MediaPlayerCompositor之間共用的ICompositionSurface,以使用Windows.UI.Composition API 啟用MediaPlayer內容的轉譯,而不需要使用 XAML 架構。

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
繼承
Object Platform::Object IInspectable MediaPlayerSurface
屬性
實作

Windows 需求

裝置系列
Windows 10 Anniversary Edition (已於 10.0.14393.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v3.0 引進)

備註

呼叫 MediaPlayer.GetSurface以取得此類別的實例。

如需使用 Windows.UI.Composition API 來呈現視覺效果的詳細資訊,請參閱 視覺化層

如需將視訊轉譯成組合介面的作法指引,請參閱 使用 MediaPlayer 播放音訊和視訊

屬性

CompositionSurface

取得轉譯MediaPlayer內容的ICompositionSurface

Compositor

取得將使用介面的 Compositor

MediaPlayer

取得與MediaPlayerSurface相關聯的MediaPlayer

方法

Close()

關閉 MediaPlayerSurface 並處置相關聯的資源。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

適用於

另請參閱