Windows Media Player 11 SDK IWMPControls.isAvailable (VB and C#)
Previous | Next |
IWMPControls.isAvailable (VB and C#)
The isAvailable property (the get_isAvailable method in C#) gets a value indicating whether a specified type of information is available or a specified action can be performed.
Parameters
bstrItem
A System.String that is one of the following values.
Value | Description |
currentItem | Discovers whether the user can set the IWMPControls.currentItem property. |
currentMarker | Discovers whether the user can seek to a specific marker. |
currentPosition | Discovers whether the user can seek to a specific position in the file. Some files do not support seeking. |
fastForward | Discovers whether the file supports fast forwarding and whether that functionality can be invoked. Many file types (and live streams) do not support fastForward. |
fastReverse | Discovers whether the file supports fastReverse and whether that functionality can be invoked. Many file types (and live streams) do not support fastReverse. |
next | Discovers whether the user can seek to the next entry in a playlist. |
pause | Discovers whether the IWMPControls.pause method is available. |
play | Discovers whether the IWMPControls.play method is available. |
previous | Discovers whether the user can seek to the previous entry in a playlist. |
step | Discovers whether the IWMPControls2.step method is available during playback. |
stop | Discovers whether the IWMPControls.stop method is available. |
Property Value
A System.Boolean that indicates whether a specified type of information is available or a specified action can be performed.
Remarks
IWMPControls.isAvailable is a property in Visual Basic that takes a parameter. In C# it is referred to as the IWMPControls.get_isAvailable method.
Example Code
The following example uses the isAvailable property (the get_isAvailable method in C#) to verify that the current media item supports the currentPosition property. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
' If the currentPosition property is supported, seek to position 0. If (player.Ctlcontrols.isAvailable("currentPosition")) Then player.Ctlcontrols.currentPosition = 0 End If
FakePre-542117efaaeb4945a793e543d7bce0af-85e00b4616be4f60a5020fca42b40bde
// If the currentPosition property is supported, seek to position 0. if (player.Ctlcontrols.get_isAvailable("currentPosition")) { player.Ctlcontrols.currentPosition = 0; }
Requirements
Version: Windows Media Player 9 Series or later
Namespace: WMPLib
Assembly: Interop.WMPLib.dll (automatically generated by Visual Studio)
See Also
- IWMPControls Interface (VB and C#)
- IWMPControls.currentItem (VB and C#)
- IWMPControls.pause (VB and C#)
- IWMPControls.play (VB and C#)
- IWMPControls.stop (VB and C#)
- IWMPControls2.step (VB and C#)
Previous | Next |