共用方式為


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 引進)

備註

使用此事件來判斷範例轉譯是否有延遲,在此情況下,您可能會決定切換至較低的頻寬資料流程。

適用於