如何在 Windows 10 上的音量控制上显示您的媒体播放器程序 [英] How to display your media player program to show on volume control on windows 10

查看:38
本文介绍了如何在 Windows 10 上的音量控制上显示您的媒体播放器程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图让媒体播放器出现在 Windows 10 的音量控制中,就像使用律动音乐或 Spotify 甚至谷歌浏览器时一样,当您按下键盘上的音量增大或减小按钮时,音量控制弹出窗口会出现音量滑块和带有播放/暂停、下一个和上一个按钮的媒体信息,如果它可用作 api 或库,我如何实现这一点.我没有任何代码,因为我在谷歌上找不到任何有用的想法.这就是我对弹出窗口的图像.

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 SMTC ^示例:

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)

更多信息:^

这篇关于如何在 Windows 10 上的音量控制上显示您的媒体播放器程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆