Methods such as TryPauseAsync and TryPlayAsync belong to GlobalSystemMediaTransportControlsSession instead of GlobalSystemMediaTransportControlsSessionManager. We should be free to use these methods according to the GlobalSystemMediaTransportControlsSession object.
GlobalSystemMediaTransportControlsSession currentSession = GlobalSystemMediaTransportControlsSessionManager.RequestAsync().GetAwaiter().GetResult().GetCurrentSession();
await currentSession.TryPlayAsync();
//......
How are you using them?
Also I want to set the metadata like Title, Artist, State, and TimelineProperties.
I did not find a way to do this, it seems that the current API does not support this.
Maybe you can refer to the solution in this link and use other packages to do it.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.