Udostępnij za pośrednictwem


MediaStreamSource.SampleRendered Event

Definition

Occurs when a sample from the MediaStreamSource is rendered.

// Register
event_token SampleRendered(TypedEventHandler<MediaStreamSource, MediaStreamSourceSampleRenderedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaStreamSource::SampleRendered_revoker SampleRendered(auto_revoke_t, TypedEventHandler<MediaStreamSource, MediaStreamSourceSampleRenderedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaStreamSource,MediaStreamSourceSampleRenderedEventArgs> SampleRendered;
function onSampleRendered(eventArgs) { /* Your code */ }
mediaStreamSource.addEventListener("samplerendered", onSampleRendered);
mediaStreamSource.removeEventListener("samplerendered", onSampleRendered);
- or -
mediaStreamSource.onsamplerendered = onSampleRendered;
Public Custom Event SampleRendered As TypedEventHandler(Of MediaStreamSource, MediaStreamSourceSampleRenderedEventArgs) 

Event Type

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Remarks

Use this event to determine if there is a lag in the rendering of a sample, in which case you may decide to switch to a lower-bandwidth stream.

Applies to