Home

Awesome

MusicPlayer

Github CI Status codebeat badge

Music player submodule for LyricsX.

Unified API for music players.

Supported Players

macOS

iOS

Linux

<details><summary>Read me before using MPRIS</summary>
dependencies

A running GMainLoop is required to automatically update the player and playback status for MPRIS. If not, you can run one by:

GRunLoop.main.run()

or in other threads:

Thread.detachNewThread { 
    GRunLoop.main.run() 
}
</details>

Universal

Helper:

Usage

Quick Start

let player = MusicPlayers.Scriptable(name: .appleMusic)!
let track = player.currentTrack.title
if player.playbackState.isPlaying {
    player.skipToNextItem()
}

License

MusicPlayer is part of LyricsX and licensed under MPL 2.0. See the LICENSE file.