-api-id | -api-type |
---|---|
M:Windows.Media.Playback.MediaPlayer.RenderSubtitlesToSurface(Windows.Graphics.DirectX.Direct3D11.IDirect3DSurface) |
winrt method |
Requests for the system to render the current subtitle text to the provided IDirect3DSurface.
The object that implements IDirect3DSurface to which the subtitle text is rendered.
True if the system rendered subtitles to the surface; otherwise false.
Handle the SubtitleFrameChanged event to receive a notification that the subtitle content has changed. Check the return value to see if subtitles were rendered. If the method returns false, then no subtitles were rendered. In this case you may decide to hide the subtitle render surface in your UI.
In order to use this feature, you must place the MediaPlayer into frame server mode by setting IsVideoFrameServerEnabled to true, and the playing media content must have at least one timed metadata track that has had its presentation mode set to PlatformPresented with a call to MediaPlaybackTimedMetadataTrackList.SetPresentationMode. For more information on using MediaPlayer in frame server mode, see Play audio and video with MediaPlayer. For more information on working with metadata tracks, see Media items, playlists, and tracks.
IDirect3DSurface MediaPlayer SubtitleFrameChanged Play audio and video with MediaPlayer Media items, playlists, and tracks