MediaPlayer.SubtitleFrameChanged MediaPlayer.SubtitleFrameChanged MediaPlayer.SubtitleFrameChanged MediaPlayer.SubtitleFrameChanged MediaPlayer.SubtitleFrameChanged Event

Definition

Occurs when the current subtitle content has changed while the MediaPlayer is in frame server mode.

public : event TypedEventHandler<MediaPlayer, object> SubtitleFrameChanged
// Register
event_token SubtitleFrameChanged(TypedEventHandler<MediaPlayer, object> const& handler) const;

// Revoke with event_token
void SubtitleFrameChanged(event_token const& cookie) const;

// Revoke with event_revoker
SubtitleFrameChanged_revoker SubtitleFrameChanged(auto_revoke_t, TypedEventHandler<MediaPlayer, object> const& handler) const;
public event TypedEventHandler<MediaPlayer, object> SubtitleFrameChanged
Public Event SubtitleFrameChanged As TypedEventHandler (Of MediaPlayer, object)
function onSubtitleFrameChanged(eventArgs){/* Your code */}


mediaPlayer.addEventListener("subtitleframechanged", onSubtitleFrameChanged);
mediaPlayer.removeEventListener("subtitleframechanged", onSubtitleFrameChanged);

Remarks

In the handler for this event, you can call one of the overloads of RenderSubtitlesToSurface to request that the system render the current subtitles to the provided IDirect3DSurface. If this method returns false, then no subtitles were rendered. In this case, you may choose to hide the subtitle render surface until the next time the event is raised.

In order for this event to be raised, 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 Media​Playback​Timed​Metadata​Track​List.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.