Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.48 KB

README.md

File metadata and controls

29 lines (21 loc) · 1.48 KB

mpris-swift

Github Release GitHub Actions Workflow Status GitHub License Swift Version Compatibility Platform Compatibility

A library for interacting with MPRIS 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