MediaPlayer.VideoFrameAvailable Event

Definition

Occurs when IsVideoFrameServerEnabled is set to true and a new video frame is available for processing.

// Register
event_token VideoFrameAvailable(TypedEventHandler<MediaPlayer, IInspectable const&> const& handler) const;

// Revoke with event_token
void VideoFrameAvailable(event_token const* cookie) const;

// Revoke with event_revoker
MediaPlayer::VideoFrameAvailable_revoker VideoFrameAvailable(auto_revoke_t, TypedEventHandler<MediaPlayer, IInspectable const&> const& handler) const;
public event TypedEventHandler<MediaPlayer,object> VideoFrameAvailable;
function onVideoFrameAvailable(eventArgs) { /* Your code */ }
mediaPlayer.addEventListener("videoframeavailable", onVideoFrameAvailable);
mediaPlayer.removeEventListener("videoframeavailable", onVideoFrameAvailable);
- or -
mediaPlayer.onvideoframeavailable = onVideoFrameAvailable;
Public Custom Event VideoFrameAvailable As TypedEventHandler(Of MediaPlayer, Object) 

Event Type

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

In the handler for this event, call CopyFrameToVideoSurface to get the video frame data.

Applies to