MediaPlayer.VideoFrameAvailable Event
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
TypedEventHandler<MediaPlayer,IInspectable>
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.