Class MediaPlayer
Assembly: MonoGame.Framework.dll
public static class MediaPlayer : object
Properties
Declaration
public static bool GameHasControl { get; }
Property Value
Declaration
public static bool IsMuted { get; set; }
Property Value
Declaration
public static bool IsRepeating { get; set; }
Property Value
Declaration
public static bool IsShuffled { get; set; }
Property Value
Declaration
public static bool IsVisualizationEnabled { get; }
Property Value
Declaration
public static TimeSpan PlayPosition { get; }
Property Value
Type |
Description |
TimeSpan |
|
Declaration
public static MediaQueue Queue { get; }
Property Value
Declaration
public static MediaState State { get; }
Property Value
Declaration
public static float Volume { get; set; }
Property Value
Methods
Declaration
public static void MoveNext()
Declaration
public static void MovePrevious()
Declaration
public static void Pause()
Play clears the current playback queue, and then queues up the specified song for playback.
Playback starts immediately at the beginning of the song.
Declaration
public static void Play(Song song)
Parameters
Type |
Name |
Description |
Song |
song |
|
Play clears the current playback queue, and then queues up the specified song for playback.
Playback starts immediately at the given position of the song.
Declaration
public static void Play(Song song, TimeSpan? startPosition)
Parameters
Type |
Name |
Description |
Song |
song |
|
Nullable<TimeSpan> |
startPosition |
|
Declaration
public static void Play(SongCollection collection, int index = 0)
Parameters
Declaration
public static void Resume()
Declaration
public static void Stop()
Events
Declaration
public static event EventHandler<EventArgs> ActiveSongChanged
Event Type
Type |
Description |
EventHandler<EventArgs> |
|
Declaration
public static event EventHandler<EventArgs> MediaStateChanged
Event Type
Type |
Description |
EventHandler<EventArgs> |
|