Compartir a través de


DownloadCollection Object

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Note

This section describes functionality designed for use by online stores. Use of this functionality outside the context of an online store is not supported.

 

The DownloadCollection object contains properties and methods to handle collections of download items. It can be used by webpages that are hosted in the full mode Windows Media Player and that have access to the External object, such as online stores.

The DownloadCollection object supports the following properties.

Property Description
count Retrieves the number of pending downloads.
id Retrieves the ID of the download collection.

 

The DownloadCollection object supports the following methods.

Method Description
Clear Removes all items from a download collection.
item Retrieves a pending download object.
removeItem Removes a download item from a collection.
startDownload Queues a download.

 

The DownloadCollection object is accessed through the following methods.

Object Method
DownloadManager createDownloadCollection
DownloadManager getDownloadCollection

 

For purposes of illustration, DownloadManager.getDownloadCollection(collectionId) is used in the reference syntax sections.

Reference for Type 2 Online Stores