Get current playing track info from Microsoft Groove Music app

后端 未结 1 1450
后悔当初
后悔当初 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.

    <Reference Include="Windows.Foundation.UniversalApiContract"> <HintPath>C:\Program Files (x86)\Windows Kits\10\References\Windows.Foundation.UniversalApiContract\3‌​.0.0.0\Windows.Found‌​ation.UniversalApiCo‌​ntract.winmd</HintPa‌​th> </Reference>

    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)
提交回复
热议问题