MediaPlayer Members

The following tables list the members exposed by the MediaPlayer type.

Public Properties

Name Description
Public Property Static GameHasControl Determines whether the game has control of the background music.
Public Property Static IsMuted Gets or set the muted setting for the media player.
Public Property Static IsRepeating Gets or sets the repeat setting for the media player.
Public Property Static IsShuffled Gets or sets the shuffle setting for the media player.
Public Property Static IsVisualizationEnabled Gets or sets the visualization enabled setting for the media player.
Public Property Static PlayPosition Gets the play position within the currently playing song.
Public Property Static Queue Gets the media playback queue, MediaQueue.
Public Property Static State Gets the media playback state, MediaState.
Public Property Static Volume Gets or sets the media player volume.

Public Methods

Name Description
Public Method Static GetVisualizationData Retrieves visualization (frequency and sample) data for the currently-playing song.
Public Method Static MoveNext Moves to the next song in the queue of playing songs.
Public Method Static MovePrevious Moves to the previous song in the queue of playing songs.
Public Method Static Pause Pauses the currently playing song.
Public Method Static Play Overloaded. Plays a song or collection of songs.
Public Method Static Resume Resumes a paused song.
Public Method Static Stop Stops playing a song.

Public Events

Name Description
Public Event Static ActiveSongChanged Raised when the active song changes due to active playback or due to explicit calls to the MoveNext or MovePrevious methods.
Public Event Static MediaStateChanged Raised when the media player play state changes.

See Also

Reference

MediaPlayer Class
Microsoft.Xna.Framework.Media Namespace