Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MediaQueue Class

Provides methods and properties to access and control the queue of playing songs.

public sealed class MediaQueue

MediaQueue provides properties and methods that query and control the queue of playing songs. The ActiveSong property returns the currently playing Song. ActiveSongIndex gets or set the queue index of the currently playing song. Count returns the number of songs in the queue. The Item indexer returns the Song at the specified index in the queue.

MediaQueue is a read-only queue of songs. With MediaQueue, you can control which song is playing in the queue, but you cannot add or remove songs from the queue. Either MediaPlayer.Play or the songs already queued up when the game starts determine the songs that are in the queue of playing songs.

Dd254855.note(en-us,XNAGameStudio.42).gifNote

All of the collections, playlists, and queues returned by methods and properties in the Microsoft.Xna.Framework.Media namespace are immutable. You cannot add or remove objects from those collections or playlists. To create a custom 'playlist' of songs, games must maintain their own list of songs to play, and play those songs one at a time by calling MediaPlayer.Play.

Namespace: Microsoft.Xna.Framework.Media
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Windows Phone

Community Additions

Show:
© 2014 Microsoft