Jaa


SystemMediaTransportControlsDisplayUpdater Class

Definition

Provides functionality to update the music information that is displayed on the SystemMediaTransportControls.

public ref class SystemMediaTransportControlsDisplayUpdater sealed
/// [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 SystemMediaTransportControlsDisplayUpdater final
[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 SystemMediaTransportControlsDisplayUpdater
Public NotInheritable Class SystemMediaTransportControlsDisplayUpdater
Inheritance
Object Platform::Object IInspectable SystemMediaTransportControlsDisplayUpdater
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

Starting with Windows 10, version 1607, UWP apps that use the MediaPlayer class to play media are automatically integrated with the SMTC by default. With automatic integration, you update the media metadata, such as the title of a media item, using the MediaPlaybackItem class. Call GetDisplayProperties to get an instance of the MediaItemDisplayProperties class. Update the object with the values you want to be displayed for the item in the SMTC and then call ApplyDisplayProperties to commit the changes. For how-to guidance on using the SMTC from your app, see Integrate with the SystemMediaTransportControls.

If you are disabling manual SMTC integration or you are targeting an older version of Windows, you must use the SystemMediaTransportControls.DisplayUpdater to update the media metadata. For how-to guidance on manually controlling the SMTC, see Manual control of the System Media Transport Controls.

Properties

AppMediaId

Gets or sets the media id of the app.

ImageProperties

Gets the image properties associated with the currently playing media.

MusicProperties

Gets the music properties associated with the currently playing media.

Thumbnail

Gets or sets thumbnail image associated with the currently playing media.

Type

Gets or sets the type of media.

VideoProperties

Gets the video properties associated with the currently playing media.

Methods

ClearAll()

Clears out all of the media metadata.

CopyFromFileAsync(MediaPlaybackType, StorageFile)

Initialize the media properties using the specified file.

Update()

Updates the metadata for the currently playing media.

Applies to

See also