The MediaPlayer object allows you to control a media player using StealthBot scripting. You cannot change the media player StealthBot is interacting with using scripting. This object is a polymorphic object for all current and future media players that StealthBot supports.
Supported media players:
- 1 History
- 2 How to use
- 3 Properties
- 4 Functions
- 5 See also
How to use
Example: Count how many songs you have in your playlist.
Value = MediaPlayer.PlaylistCount
Example: Playing a track by number.
Value = MediaPlayer.PlayTrack(142)
List of properties
Returns a string, either "Winamp" or "iTunes", describing the current media player loaded.
Sets or returns the current sound volume as a number from 0 to 100.
Returns the current numeric position in the current playlist.
Returns the number of tracks in the current playlist.
Returns the name of the current track.
Returns the length in seconds of the current track.
Sets or returns whether the media player is currently "shuffling" the track list (random next song).
Sets or returns whether the media player will "repeat" the playlist once it has completed all songs.
Returns whether the media player is playing. will return false if the media player is not laoded.
Returns whether the media player is paused. Will return false if no media is loaded or the media player is not loaded.
Public Function IsLoaded() As Boolean Public Function Start(Optional filePath As String) As Boolean Public Sub NextTrack() Public Sub PreviousTrack() Public Sub PlayTrack(Optional ByVal Track As Variant = vbNullString) Public Sub PausePlayback() Public Sub QuitPlayback() Public Sub FadeOutToStop()
List of functions
- .Start(optional FilePath)
- .PlayTrack(optional Track)
Attempts to load the media player if not loaded. Returns true on success or already loaded and false on failure.
Attempts to load the media player from a specific location (if provided) or from the default install location for that media player (if not provided).
Moves to the next track to play.
Moves to the previous track to play.
Attempts to play a different track by name. The track must be in the current playlist. If no track name or number is provided, this function will just begin playback.
Pauses the current playback. .PlayTrack() with no arguments resumes playback.
Stops the current playback. .PlayTrack() with no arguments restarts playback.
Causes the media player to fade-out stop. Similar to calling .QuitPlayback() but arguably better sounding.
iTunes does not support fade-out stopping so this method will just stop playback.