Share via


Settings.setMode method

[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 setMode method sets various modes to active or inactive.

Syntax

Settings.setMode(
  modeName,
  state
)

Parameters

modeName [in]

String specifying the name of the mode being changed, containing one of the following values.

String Description
autoRewind Mode indicating whether the tracks are rewound to the beginning after playing to the end. Default state is true.
loop Mode indicating whether the sequence of tracks repeats itself. Default state is false.
showFrame Mode indicating whether the nearest video key frame is displayed at the current position when not playing. Default state is false. Has no effect on audio tracks.
shuffle Mode indicating whether the tracks are played in random order. Default state is false.

state [in]

Boolean specifying whether the new specified mode is active or not.

Return value

This method does not return a value.

Remarks

When the showFrame mode is active, the Player must access the track content to retrieve the video frame. Due to bandwidth considerations, use this mode cautiously when playing non-local content.

Requirements

Requirement Value
Version
For loop and shuffle modes, Windows Media Player version 7.0 or later. For autoRewind and showFrame modes, Windows Media Player 9 Series or later.
DLL
Wmp.dll

See also

Settings Object

Settings.getMode