MediaSource.CreateFromDownloadOperation(DownloadOperation) MediaSource.CreateFromDownloadOperation(DownloadOperation) MediaSource.CreateFromDownloadOperation(DownloadOperation) MediaSource.CreateFromDownloadOperation(DownloadOperation) MediaSource.CreateFromDownloadOperation(DownloadOperation) Method

Definition

Creates an instance of MediaSource from the provided DownloadOperation.

public : static MediaSource CreateFromDownloadOperation(DownloadOperation downloadOperation)
static MediaSource CreateFromDownloadOperation(DownloadOperation downloadOperation) const;
public static MediaSource CreateFromDownloadOperation(DownloadOperation downloadOperation)
Public Shared Function CreateFromDownloadOperation(downloadOperation As DownloadOperation) As MediaSource
var mediaSource = Windows.Media.Core.MediaSource.createFromDownloadOperation(downloadOperation);

Parameters

downloadOperation
DownloadOperation DownloadOperation DownloadOperation

The DownloadOperation from which the MediaSource is created.

Returns

Additional features and requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

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.

See also