MediaSource.CreateFromDownloadOperation(DownloadOperation) Method

Definition

Creates an instance of MediaSource from the provided DownloadOperation.

public:
 static MediaSource ^ CreateFromDownloadOperation(DownloadOperation ^ downloadOperation);
 static MediaSource CreateFromDownloadOperation(DownloadOperation const& downloadOperation);
public static MediaSource CreateFromDownloadOperation(DownloadOperation downloadOperation);
function createFromDownloadOperation(downloadOperation)
Public Shared Function CreateFromDownloadOperation (downloadOperation As DownloadOperation) As MediaSource

Parameters

downloadOperation
DownloadOperation

The DownloadOperation from which the MediaSource is created.

Returns

The new media source.

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v6.0)

Remarks

Use the BackgroundDownloader class to create a DownloadOperation.

Use the MediaSource.DownloadOperation property to get a reference to the download operation set with this method from the MediaSource.

You can use the MediaBinder class to defer associating the DownloadOperation with the MediaSource until the system preparing to play the item. For more information on late binding media content, see Media items, playlists, and tracks.

Applies to

See also