Search code examples
vb.netpopupwindows-10media-playervolume

How to display your media player program to show on volume control on windows 10


i've been trying to make media player to appear in the windows 10 volume control like when using groove music or spotify or even google chrome when you press the volume up or down button in the keyboard a volume control popup appears with the volume slider and the media information with a play/pause , next and previous buttons how can i achieve that if it is available as an api or a library. i don't have any code because i couldn't find any useful ideas on google. That's the image i have for the Popup. Windows 10 Volume Control Popup for groove music


Solution

  • It appears you need to use the windows 10 SMTC ^ Samples:

        Dim props As MediaItemDisplayProperties = mediaPlaybackItem.GetDisplayProperties()
        props.Type = Windows.Media.MediaPlaybackType.Video
        props.VideoProperties.Title = "Video title"
        props.VideoProperties.Subtitle = "Video subtitle"
        props.VideoProperties.Genres.Add("Documentary")
        mediaPlaybackItem.ApplyDisplayProperties(props)
    
        props = mediaPlaybackItem.GetDisplayProperties()
        props.Type = Windows.Media.MediaPlaybackType.Music
        props.MusicProperties.Title = "Song title"
        props.MusicProperties.Artist = "Song artist"
        props.MusicProperties.Genres.Add("Polka")
        mediaPlaybackItem.ApplyDisplayProperties(props)
    

    More at: ^