MediaPlaybackList Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a list of MediaPlaybackItem objects that can be played back. Provides methods for switching the currently playing item and enabling looping and shuffling.
public ref class MediaPlaybackList sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class MediaPlaybackList final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class MediaPlaybackList final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class MediaPlaybackList
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class MediaPlaybackList
function MediaPlaybackList()
Public NotInheritable Class MediaPlaybackList
- Inheritance
- Attributes
- Implements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Items in a MediaPlaybackList are rendered using gapless playback. The system will use provided metadata in MP3 or AAC encoded files to determine the delay or padding compensation needed for gapless playback. If the MP3 or AAC encoded files don't provide this metadata, then the system determines the delay or padding heuristically. For lossless formats, such as PCM, FLAC, or ALAC, the system takes no action because these encoders don't introduce delay or padding.
For how-to guidance for working with media items, see Media items, playlists, and tracks.
Windows version | SDK version | Value added |
---|---|---|
1511 | 10586 | MaxPrefetchTime |
1511 | 10586 | SetShuffledItems |
1511 | 10586 | ShuffledItems |
1511 | 10586 | StartingItem |
1703 | 15063 | MaxPlayedItemsToKeepOpen |
Media |
Initializes a new instance of the MediaPlaybackList class. |
Auto |
Gets or sets a value indicating whether the playback list will loop when the end of the list is reached. |
Current |
Gets the currently playing MediaPlaybackItem. |
Current |
Gets the index of the current item in theMediaPlaybackList. |
Items |
Gets an IObservableVector representation of the playback list. |
Max |
Gets or sets a value that specifies the number of MediaPlaybackItem objects that should be kept open after they have been played. |
Max |
Gets or sets the maximum prefetch time for MediaPlaybackItem objects in the playback list. The prefetch time is the amount of time before an item is expected to begin playing that the system retrieves the item's media content. |
Shuffled |
Gets a read-only list of MediaPlaybackItem objects that will be played in shuffle mode, in the order in which they will be played. |
Shuffle |
Gets or sets a value indicating whether the items in the playback list are played in a random order. |
Starting |
Gets or sets the MediaPlaybackItem that will be played first. |
Move |
Changes the current item of the MediaPlaybackList to the next item in the list. |
Move |
Changes the current item of the MediaPlaybackList to the previous item in the list. |
Move |
Changes the current item of the MediaPlaybackList to the item with the specified index. |
Set |
Sets the list of MediaPlaybackItem objects that will be played in shuffle mode, in the order in which they will be played. |
Current |
Occurs when the currently playing MediaPlaybackItem changes. |
Item |
Occurs when an error is encountered with a MediaPlaybackItem in the playback list. |
Item |
Occurs when a MediaPlaybackItem in the playback list is successfully opened. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |