MediaFrameReader.FrameArrived 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 a new frame arrives from the media frame source associated with the MediaFrameReader.
// Register
event_token FrameArrived(TypedEventHandler<MediaFrameReader, MediaFrameArrivedEventArgs const&> const& handler) const;
// Revoke with event_token
void FrameArrived(event_token const* cookie) const;
// Revoke with event_revoker
MediaFrameReader::FrameArrived_revoker FrameArrived(auto_revoke_t, TypedEventHandler<MediaFrameReader, MediaFrameArrivedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaFrameReader,MediaFrameArrivedEventArgs> FrameArrived;
function onFrameArrived(eventArgs) { /* Your code */ }
mediaFrameReader.addEventListener("framearrived", onFrameArrived);
mediaFrameReader.removeEventListener("framearrived", onFrameArrived);
- or -
mediaFrameReader.onframearrived = onFrameArrived;
Public Custom Event FrameArrived As TypedEventHandler(Of MediaFrameReader, MediaFrameArrivedEventArgs)
Event Type
Remarks
In the handler for the FrameArrived event, call TryAcquireLatestFrame to get a MediaFrameReference representing the latest frame from the media frame source.