Controls.isAvailable

The isAvailable property indicates whether a specified type of information is available or a specified action can be performed.

player.controls.isAvailable(
        name
        )

Parameters

name

String containing one of the following values.

StringDescription
currentItemDetermines whether the user can set the currentItem property.
currentMarkerDetermines whether the user can seek to a specific marker.
currentPositionDetermines whether the user can seek to a specific position in the file. Some files do not support seeking.
fastForwardDetermines whether the file supports fast forwarding and whether that functionality can be invoked. Many file types (or live streams) do not support fastForward.
fastReverseDetermines whether the file supports fastReverse and whether that functionality can be invoked. Many file types (or live streams) do not support fastReverse.
nextDetermines whether the user can seek to the next entry in a playlist.
pauseDetermines whether the pause method is available.
playDetermines whether the play method is available.
previousDetermines whether the user can seek to the previous entry in a playlist.
stepDetermines whether the step method is available during playback.
stopDetermines whether the stop method is available.

 

Return Values

This method returns a Boolean value.

Examples

The following example creates an HTML BUTTON element that seeks to the starting position of the current media item. The JScript code uses isAvailable to verify that the file supports the seek operation. The Player object was created with ID = "Player".


<INPUT TYPE = "BUTTON"  ID = "START"  NAME = "START"  VALUE = "Seek To Zero"

    /* If supported, seek to position zero. */
    onClick = "if (Player.controls.isAvailable('CurrentPosition'))
        Player.controls.currentPosition = 0;
">

Requirements

Version

Windows Media Player version 7.0 or later

DLL

Wmp.dll

See also

Controls Object

 

 

Show: