Contents

suransea/mpris-swift

A library for interacting with [MPRIS](https://specifications.freedesktop.org/mpris-spec/latest/) players.

Documentation

The API Documentation is available on Swift Package Index.

Example

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())
}

License

MIT license

Package Metadata

Repository: suransea/mpris-swift

Default branch: main

README: README.md