๐Ÿ“š go-mpris - Awesome Go Library for Audio and Music

Go Gopher mascot for go-mpris

Client for mpris dbus interfaces

๐Ÿท๏ธ Audio and Music
๐Ÿ“‚ Audio and Music
โญ 0 stars
View on GitHub ๐Ÿ”—

Detailed Description of go-mpris

go-mpris

Go GoDoc Go Report Card codecov

go-mpris is an implementation of the mpris dbus interface written in go (golang). Implemented and tested against version 2.2. See: https://specifications.freedesktop.org/mpris-spec/2.2.

Example

Example cli has been implemented.

git clone [email protected]:leberKleber/go-mpris.git

go build examples/cli.go

./cli-client

Features

Player

https://specifications.freedesktop.org/mpris-spec/2.2/Player_Interface.html

Methods

methodlibrary pathimplemented
Nextmpris.Player.Next():heavy_check_mark:
Previousmpris.Player.Previous():heavy_check_mark:
Pausempris.Player.Pause():heavy_check_mark:
PlayPausempris.Player.PlayPause():heavy_check_mark:
Stopmpris.Player.Stop():heavy_check_mark:
Seekmpris.Player.SeekTo(<offset> int64)ยน:heavy_check_mark:
SetPositionmpris.Player.SetPosition(<trackID> dbus.ObjectPath, <position> int64):heavy_check_mark:
OpenUrimpris.Player.OpenUri(<uri> string):heavy_check_mark:

ยน Could not be named Seek, it's a reserved function name.

Properties

propertylibrary pathimplemented
PlaybackStatusmpris.Player.PlaybackStatus() (mpris.PlaybackStatus, error):heavy_check_mark:
LoopStatusmpris.Player.LoopStatus() (mpris.LoopStatus, error):heavy_check_mark:
LoopStatusmpris.Player.SetLoopStatus(<loopStatus> mpris.LoopStatus) error:heavy_check_mark:
Ratempris.Player.Rate() (float64, error):heavy_check_mark:
Ratempris.Player.SetRate(<rate> float64) error:heavy_check_mark:
Shufflempris.Player.Shuffle() (bool, error):heavy_check_mark:
Shufflempris.Player.SetShuffle(<shuffle> bool) error:heavy_check_mark:
Metadatampris.Player.Metadata() (mpris.Metadata, error):heavy_check_mark:
Volumempris.Player.Volume() (float64, error):heavy_check_mark:
Volumempris.Player.SetVolume(<volume> float64) (error):heavy_check_mark:
Positionmpris.Player.Position() (int64, error):heavy_check_mark:
Positionmpris.Player.SetPosition(<trackID> dbus.ObjectPath, <position> int64):heavy_check_mark:
MinimumRatempris.Player.MinimumRate() (float64, error):heavy_check_mark:
MaximumRatempris.Player.MaximumRate() (float64, error):heavy_check_mark:
CanGoNextmpris.Player.CanGoNext() (bool, error):heavy_check_mark:
CanGoPreviousmpris.Player.CanGoPrevious() (bool, error):heavy_check_mark:
CanPlaympris.Player.CanPlay() (bool, error):heavy_check_mark:
CanPausempris.Player.CanPause() (bool, error):heavy_check_mark:
CanSeekmpris.Player.CanSeek() (bool, error):heavy_check_mark:
CanControlmpris.Player.CanControl() (bool, error):heavy_check_mark:

Signals

signallibrary pathimplemented
Seekedmpris.Player.Seeked(<ctx> context.Context) (<-chan int, error) :heavy_check_mark:

TrackList

https://specifications.freedesktop.org/mpris-spec/2.2/Track_List_Interface.html

Methods

methodlibrary pathimplemented
GetTracksMetadataNot implemented yet:heavy_multiplication_x:
AddTrackNot implemented yet:heavy_multiplication_x:
RemoveTrackNot implemented yet:heavy_multiplication_x:
GoToNot implemented yet:heavy_multiplication_x:

Properties

propertylibrary pathimplemented
TracksNot implemented yet:heavy_multiplication_x:
CanEditTracksNot implemented yet:heavy_multiplication_x:

Signals

signallibrary pathimplemented
TrackListReplacedNot implemented yet:heavy_multiplication_x:
TrackAddedNot implemented yet:heavy_multiplication_x:
TrackRemovedNot implemented yet:heavy_multiplication_x:
TrackMetadataChangedNot implemented yet:heavy_multiplication_x:

Development

Versioning

This library follows the semantic versioning concept.

Commits

Commits should follow the conventional commit rules.
See: https://conventionalcommits.org.

Mocks

Mocks will be generated with github.com/matryer/moq. It can be installed with go install github.com/matryer/moq@latest. Generation can be triggered with go generate ./....

Go Docs

Read the docs at https://pkg.go.dev/github.com/leberKleber/go-mpris