MediaSourceAppServiceConnection.InitializeMediaStreamSourceRequested Event

Definition

Raised by the system to request the initialization of a new 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) 

Event Type

TypedEventHandler<MediaSourceAppServiceConnection,InitializeMediaStreamSourceRequestedEventArgs>

Remarks

After registering a handler for the InitializeMediaStreamSourceRequestedEventArgs, call Start to notify the system that the app service is ready to handle requests.

With the InitializeMediaStreamSourceRequestedEventArgs object, the system passes an IRandomAccessStream and an a uninitialized MediaStreamSource object into the InitializeMediaStreamSourceRequested event handler. The app service should parse the IRandomAccessStream to create an IMediaStreamDescriptor. If the requested stream format is supported, then the app service can initialize the MediaStreamSource and begin providing samples.

Applies to