Share via


ErrorItem.errorDescription

[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.]

The errorDescription property retrieves a description of the error.

player.error.item(
        index
        ).errorDescription

Possible Values

This property is a read-only String.

Remarks

You should set Settings.enableErrorDialogs to false if you choose to display custom error messages.

Examples

The following JScript example uses ErrorItem.errorDescription in an event handler to display the error message to the user. The Player object was created with ID = "Player".

<SCRIPT LANGUAGE = "JScript"  FOR = Player  EVENT = error()>

// Get the error description for the first error item.
errDesc = Player.error.item(0).errorDescription;

// Display the error code.
var message = "Error: " + errDesc";
message += "<BR>";
message += "Use your BACK button to return ";
message += "to the previous page.";
document.write(message);

</SCRIPT>

Requirements

Requirement Value
Version
Windows Media Player version 7.0 or later
DLL
Wmp.dll

See also

ErrorItem Object