Share via


Windows Media Player 11 SDK Using the Download ManagerĀ 

Windows Media Player SDK banner art

Previous Next

Using the Download Manager

The Windows Media Player SDK includes a sample Web page that demonstrates using the Download Manager to download files to the user's computer. You can locate the sample in the folder named WebPage where you installed the SDK. The name of the file is sample.asp. The sample provides the following functionality:

  • Creates the DownloadManager object.
  • Creates a DownloadCollection object.
  • Starts downloading five files when the user clicks Download. Default file paths are provided in the sample. You should replace these default paths with the locations of files on your own server. You can change the paths by changing the values assigned to the global array named g_sFiles.
  • Shows status information for a download when the user selects it.
  • Provides controls to pause, resume, cancel, and remove a download item.
  • Maintains information about download collections between sessions by using cookies. This is important because the user can close the Player at any time. Also, if the user switches task panes in the Player, the online store session ends.
  • Uses real-time downloading by default. You can change the behavior to background downloading by changing the value of the variable named g_sDLType. Background downloading is available for use with the Microsoft Windows XP operating system.
  • Synchronizes the background color with the Player color. You can use this feature to make your online store change appearance when the user chooses to change the color of the Player.

The following sections provide more information:

See Also

Previous Next