Share via


Windows Media Player 11 SDK DownloadCollection.startDownload 

Windows Media Player SDK banner art

Previous Next

DownloadCollection.startDownload

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 startDownload method queues a download.

Syntax

  

Parameters

sourceURL

String specifying the URL of the download.

type

String specifying the type of download. Contains one of the following values.

Value Description
background (Windows XP only.) The download occurs as a background process as processor time becomes available. Download states persist even when Windows Media Player or Windows XP is shut down.
real time (All supported operating systems.) The download occurs all at once. No download states persist between sessions.

Return Values

This method returns a DownloadItem object.

Remarks

When a new download is started, Download Manager adds it as an item to the download collection that initiated the download.

Only the following digital media formats can be downloaded:

  • Advanced Systems Format (ASF)
  • MP3
  • Windows Media Audio (WMA)
  • Windows Media Video (WMV)

The sourceURL parameter does not support Unicode-encoded strings. It must point to valid content. Redirects are not supported.

When using Windows XP, audio files are automatically placed into appropriate My Music subfolders based upon file-level metadata values. Video files are placed into \My Music\download\random number\type, where random number is a random value generated by Windows Media Player for each user, and type is either "real time" or "background", depending upon the download type.

When using Windows Media Player 9 Series with Windows 98 and Windows Millennium Edition (ME), audio and video files are placed into \My Music\download\random number\type, where random number is a random value generated by the Player for each user, and type is either "real time" or "background", depending upon the download type.

Note that files may be renamed based upon metadata attributes contained in the file and rules specified by the user in the Options dialog box. Files that don't contain metadata, such as Album or Artist, may be moved to folders labeled Unknown Artist or Unknown Album.

Requirements

Version: Windows Media Player 9 Series or later.

Library: Use wmp.dll.

See Also

Previous Next