Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 596
Anes08 Avatar asked Nov 07 '22 11:11

Anes08


1 Answers

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: ^

like image 182
Anes08 Avatar answered Nov 14 '22 22:11

Anes08