-api-id | -api-type |
---|---|
T:Windows.Media.Core.MediaSourceAppServiceConnection |
winrt class |
Enables the implementation of an app service that provides a custom media source that can be consumed by UWP apps.
This feature must be implemented in a background task. When the background task is launched and the Run, the app should create a new instance of this class, register a handler for the InitializeMediaStreamSourceRequested event, and call Start to notify the system that the app service is ready to handle stream source requests.
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.