MediaStreamSource.SampleRendered 事件

定义

呈现 来自 MediaStreamSource 的示例时发生。

// 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) 

事件类型

Windows 要求

设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)

注解

使用此事件可确定示例的呈现是否存在延迟,在这种情况下,可以决定切换到带宽较低的流。

适用于