A library for interacting with MPRIS players.
The API Documentation is available on Swift Package Index.
let connection = try Connection(type: .session)
try connection.setupDispatch(with: DispatchQueue.main)
let sessionManager = try MediaPlayer2.SessionManager(connection: connection)
if let player = sessionManager.activePlayer {
try await player.player.pause()
print(try await player.player.playbackStatus.get())
}