SystemMediaTransportControlsDisplayUpdater SystemMediaTransportControlsDisplayUpdater SystemMediaTransportControlsDisplayUpdater SystemMediaTransportControlsDisplayUpdater Class

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

Syntax

Declaration

public sealed class SystemMediaTransportControlsDisplayUpdaterpublic sealed class SystemMediaTransportControlsDisplayUpdaterPublic NotInheritable Class SystemMediaTransportControlsDisplayUpdaterpublic sealed class SystemMediaTransportControlsDisplayUpdater

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(MediaItemDisplayProperties) 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 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 summary

Gets or sets the media id of the app.

Gets the image properties associated with the currently playing media.

Gets the music properties associated with the currently playing media.

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

Gets or sets the type of media.

Gets the video properties associated with the currently playing media.

Methods summary

Clears out all of the media metadata.

Initialize the media properties using the specified file.

Updates the metadata for the currently playing media.

Properties

  • AppMediaId
    AppMediaId
    AppMediaId
    AppMediaId

    Gets or sets the media id of the app.

    public string AppMediaId { get; set; }public string AppMediaId { get; set; }Public ReadWrite Property AppMediaId As stringpublic string AppMediaId { get; set; }

    Property Value

    • string
      string
      string
      string

      The media id.

  • ImageProperties
    ImageProperties
    ImageProperties
    ImageProperties

    Gets the image properties associated with the currently playing media.

    public ImageDisplayProperties ImageProperties { get; }public ImageDisplayProperties ImageProperties { get; }Public ReadOnly Property ImageProperties As ImageDisplayPropertiespublic ImageDisplayProperties ImageProperties { get; }

    Property Value

  • MusicProperties
    MusicProperties
    MusicProperties
    MusicProperties

    Gets the music properties associated with the currently playing media.

    public MusicDisplayProperties MusicProperties { get; }public MusicDisplayProperties MusicProperties { get; }Public ReadOnly Property MusicProperties As MusicDisplayPropertiespublic MusicDisplayProperties MusicProperties { get; }

    Property Value

  • Thumbnail
    Thumbnail
    Thumbnail
    Thumbnail

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

    public RandomAccessStreamReference Thumbnail { get; set; }public RandomAccessStreamReference Thumbnail { get; set; }Public ReadWrite Property Thumbnail As RandomAccessStreamReferencepublic RandomAccessStreamReference Thumbnail { get; set; }

    Property Value

  • Type
    Type
    Type
    Type

    Gets or sets the type of media.

    public MediaPlaybackType Type { get; set; }public MediaPlaybackType Type { get; set; }Public ReadWrite Property Type As MediaPlaybackTypepublic MediaPlaybackType Type { get; set; }

    Property Value

  • VideoProperties
    VideoProperties
    VideoProperties
    VideoProperties

    Gets the video properties associated with the currently playing media.

    public VideoDisplayProperties VideoProperties { get; }public VideoDisplayProperties VideoProperties { get; }Public ReadOnly Property VideoProperties As VideoDisplayPropertiespublic VideoDisplayProperties VideoProperties { get; }

    Property Value

Methods

  • ClearAll()
    ClearAll()
    ClearAll()
    ClearAll()

    Clears out all of the media metadata.

    public void ClearAll()public void ClearAll()Public Function ClearAll() As voidpublic void ClearAll()
  • CopyFromFileAsync(MediaPlaybackType, StorageFile)
    CopyFromFileAsync(MediaPlaybackType, StorageFile)
    CopyFromFileAsync(MediaPlaybackType, StorageFile)
    CopyFromFileAsync(MediaPlaybackType, StorageFile)

    Initialize the media properties using the specified file.

    public IAsyncOperation<bool> CopyFromFileAsync(MediaPlaybackType type, StorageFile source)public IAsyncOperation<bool> CopyFromFileAsync(MediaPlaybackType type, StorageFile source)Public Function CopyFromFileAsync(type As MediaPlaybackType, source As StorageFile) As IAsyncOperation( Of bool )public IAsyncOperation<bool> CopyFromFileAsync(MediaPlaybackType type, StorageFile source)

    Parameters

    Returns

    • When this method completes, it returns a boolean value that indicates true if the operation succeeded; otherwise, false.

  • Update()
    Update()
    Update()
    Update()

    Updates the metadata for the currently playing media.

    public void Update()public void Update()Public Function Update() As voidpublic void Update()

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.MuseAttribute
Windows.Foundation.Metadata.ThreadingAttribute

Details

Assembly

Windows.Media.dll