MediaSourceAppServiceConnection.InitializeMediaStreamSourceRequested 事件

定义

由系统引发以请求初始化新的 MediaStreamSource

// Register
event_token InitializeMediaStreamSourceRequested(TypedEventHandler<MediaSourceAppServiceConnection, InitializeMediaStreamSourceRequestedEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
MediaSourceAppServiceConnection::InitializeMediaStreamSourceRequested_revoker InitializeMediaStreamSourceRequested(auto_revoke_t, TypedEventHandler<MediaSourceAppServiceConnection, InitializeMediaStreamSourceRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<MediaSourceAppServiceConnection,InitializeMediaStreamSourceRequestedEventArgs> InitializeMediaStreamSourceRequested;
function onInitializeMediaStreamSourceRequested(eventArgs) { /* Your code */ }
mediaSourceAppServiceConnection.addEventListener("initializemediastreamsourcerequested", onInitializeMediaStreamSourceRequested);
mediaSourceAppServiceConnection.removeEventListener("initializemediastreamsourcerequested", onInitializeMediaStreamSourceRequested);
- or -
mediaSourceAppServiceConnection.oninitializemediastreamsourcerequested = onInitializeMediaStreamSourceRequested;
Public Custom Event InitializeMediaStreamSourceRequested As TypedEventHandler(Of MediaSourceAppServiceConnection, InitializeMediaStreamSourceRequestedEventArgs) 

事件类型

注解

InitializeMediaStreamSourceRequestedEventArgs 注册处理程序后,调用 Start 以通知系统应用服务已准备好处理请求。

使用 InitializeMediaStreamSourceRequestedEventArgs 对象,系统将 IRandomAccessStream 和未初始化的 MediaStreamSource 对象传递到 InitializeMediaStreamSourceRequested 事件处理程序中。 应用服务应分析 IRandomAccessStream 以创建 IMediaStreamDescriptor。 如果支持请求的流格式,则应用服务可以初始化 MediaStreamSource 并开始提供示例。

适用于