External Object for Type 1 Online Stores

[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 External object provides functionality to webpages, provided by an online store, hosted in Windows Media Player.

The External object exposes the following properties for type 1 online stores.

Property Description
accountType Retrieves the account type of the current user.
appColorButtonHighlight Retrieves the current button highlight color for the Windows Media Player user interface.
appColorButtonHoverFace Retrieves the current button hover color for the Windows Media Player user interface.
appColorButtonShadow Retrieves the current button shadow color for the Windows Media Player user interface.
appColorDark Retrieves the current dark shaded color of the Windows Media Player user interface.
appColorLight Retrieves the current light shaded color of the Windows Media Player user interface.
appColorMedium Retrieves the current medium shaded color of the Windows Media Player user interface.
basketTitle Retrieves the title of the button in the list pane (also called the basket) in Windows Media Player.
filter Retrieves the search filter currently in use by Windows Media Player.
ignoreIEHistory Specifies whether Windows Media Player should ignore Internet Explorer history.
libraryLocationID Retrieves the identifier of a specific media item that is currently displayed in the Player's view.
libraryLocationType Retrieves a library location constant that indicates type of the current view in Windows Media Player.
pluginRunning Retrieves a value that indicates whether the online store's plug-in is running.
selectedItemID Retrieves the identifier of the media item that is currently selected in Windows Media Player.
selectedItemType Retrieves the type of the media item that is currently selected in Windows Media Player.
task Retrieves the name of the current task pane.
templateBeingDisplayedInLocalLibrary Indicates whether the feed represented by the current discovery page is being displayed in the local library tree-view control.
userLoggedIn Retrieves a value indicating whether the user is logged in to the online store.
version Retrieves the current version of Windows Media Player.
viewParameters Retrieves parameters associated with the current view in Windows Media Player.

 

The External object exposes the following methods for type 1 online stores.

Method Description
addToBasket Adds media items to the list pane (also called the basket) in Windows Media Player.
attemptLogin Displays a dialog box so the user can attempt to log in to the online store.
authenticate Initiates an attempt to authenticate the user.
buy Initiates the purchase of a set of media items.
cancelNavigate Informs Windows Media Player that it should not display a new discovery page even though the view has changed in the Player.
changeView Changes the view in Windows Media Player.
changeViewOnlineList Changes the view in Windows Media Player to display a list generated dynamically by the online store.
download Initiates the download of a set of media items.
play Instructs Windows Media Player to play a set of media items.
saveCurrentViewToLibrary Creates a playlist from the media items in the current view and saves the playlist to the local library.
sendMessage Sends a message to the online store's plug-in.
showPopup Instructs Windows Media Player to display a pop-up webpage; that is, a webpage that appears in a separate window.

 

The External object exposes the following events for type 1 online stores.

Event Description
OnChangeViewError Occurs when a call to the External.ChangeView method results in an error.
OnChangeViewOnlineListError Occurs when a call to the External.ChangeViewOnlineList method results in an error.
OnColorChange Occurs when the color of the Windows Media Player user interface changes.
OnLoginChange Occurs when the user's log-in status changes or when an attempt to log in fails.
OnSendMessageComplete Occurs when the online store has finished processing a message.
OnViewChange Occurs when the view changes in Windows Media Player.

 

Reference for Type 1 Online Stores

Remoting the Windows Media Player Control