Get current playing track info from Microsoft Groove Music app

后端 未结 1 1449
后悔当初
后悔当初 2021-02-05 14:41

I would like to get track info of the current playing track in the Microsoft Groove app in my own app. I\'m talking about the Groove APP and not the REST Api.

My first

1条回答
  •  别那么骄傲
    2021-02-05 15:10

    https://docs.microsoft.com/en-us/uwp/api/Windows.Media.SystemMediaTransportControls

    SystemMediaTransportControls _control = SystemMediaTransportControls.GetForCurrentView();

    Windows.Foundation.UniversalApiContract.winmd is the contract you require to gain access to the SMTC Class.

    Reference this and you should be able to gain control.

    C:\Program Files (x86)\Windows Kits\10\References\Windows.Foundation.UniversalApiContract\3‌​.0.0.0\Windows.Found‌​ation.UniversalApiCo‌​ntract.winmd

    add this to your project file in visual studio.

    I'm hoping this is what you were looking for, either way this will allow you access to the "Windows.Media" namespace.

    0 讨论(0)
提交回复
热议问题