THEME.savePreference
[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 savePreference method saves a preference in the registry.
theme.savePreference(theKey, theValue)
Parameters
-
theKey
-
A String specifying the key of the preference value to save.
-
theValue
-
A String specifying the value to save.
Return Value
This method does not return a value.
Remarks
A preference is a key/value pair that can be stored in the registry to retain information about the state of Windows Media Player between runs. This feature can be used, for example, to save customization settings so that they won't have to be re-entered each time Windows Media Player is started.
Preferences are not encrypted and therefore are not a secure method for persisting data. Do not use preferences to store private data.
Examples
<THEME>
<VIEW
id="View1"
onclose="jscript:theme.savePreference('drawer1','open');
theme.savePreference('drawer2','close')">
</VIEW>
</THEME>
Requirements
Requirement | Value |
---|---|
Version |
Windows Media Player version 7.0 or later |