MediaExtensionManager.RegisterMediaExtensionForAppService(IMediaExtension, AppServiceConnection) MediaExtensionManager.RegisterMediaExtensionForAppService(IMediaExtension, AppServiceConnection) MediaExtensionManager.RegisterMediaExtensionForAppService(IMediaExtension, AppServiceConnection) MediaExtensionManager.RegisterMediaExtensionForAppService(IMediaExtension, AppServiceConnection) MediaExtensionManager.RegisterMediaExtensionForAppService(IMediaExtension, AppServiceConnection) Method

Definition

Registers a media extension that provides a background task that decodes media.

public : void RegisterMediaExtensionForAppService(IMediaExtension extension, AppServiceConnection connection)
void RegisterMediaExtensionForAppService(IMediaExtension extension, AppServiceConnection connection) const;
public void RegisterMediaExtensionForAppService(IMediaExtension extension, AppServiceConnection connection)
Public Sub RegisterMediaExtensionForAppService(extension As IMediaExtension, connection As AppServiceConnection)
mediaExtensionManager.registerMediaExtensionForAppService(extension, connection);

Parameters

extension
IMediaExtension IMediaExtension IMediaExtension

An object that implements IMediaExtension.

connection
AppServiceConnection AppServiceConnection AppServiceConnection

An AppServiceConnection object that represents an endpoint connection for an app service.

Additional features and requirements

Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Remarks

Call this method from within the Run method of a Windows Runtime Component that exposes your media extension.

Get an instance of AppServiceConnection by casting the TriggerDetails property of the IBackgroundTaskInstance passed into the Run method to an AppServiceTriggerDetails object and then accessing the AppServiceConnection property.

In order for your background task to receive an AppServiceTriggerDetails object, you must register it as an app service in you app manifest file. For more information, see Create and consume an app service.