DownloadItem 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 DownloadItem object represents a file download request. 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 premium services.

The DownloadItem object supports the following properties.

Property Description
downloadState Retrieves the state of the download.
progress Retrieves the progress of the download in bytes.
size Retrieves the size of the download.
sourceURL Retrieves the source URL of the download.
type Retrieves the type of the download.

 

The DownloadItem object supports the following methods.

Method Description
cancel Cancels the download.
getItemInfo Retrieves the value of an attribute for the download item.
pause Pauses the download.
resume Resumes the download.

 

The DownloadItem object is accessed through the following property.

Object Property
DownloadCollection item

 

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

Reference for Type 2 Online Stores