mpris

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNameOwned = errors.New("mpris name already owned")

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service exposes the MPRIS interfaces over DBus.

func Start

func Start(appRef *core.App) (*Service, error)

Start registers the MPRIS service if possible. Returns (nil, nil) if the name is already owned.

func (*Service) Close

func (s *Service) Close()

Close releases the DBus name and stops event handling.

func (*Service) Get

func (s *Service) Get(iface, prop string) (dbus.Variant, *dbus.Error)

Get implements org.freedesktop.DBus.Properties.Get.

func (*Service) GetAll

func (s *Service) GetAll(iface string) (map[string]dbus.Variant, *dbus.Error)

GetAll implements org.freedesktop.DBus.Properties.GetAll.

func (*Service) Next

func (s *Service) Next() *dbus.Error

Next advances to the next track.

func (*Service) OpenUri

func (s *Service) OpenUri(uri string) *dbus.Error

OpenUri opens a file URI or absolute path.

func (*Service) Pause

func (s *Service) Pause() *dbus.Error

Pause pauses playback.

func (*Service) Play

func (s *Service) Play() *dbus.Error

Play starts or resumes playback.

func (*Service) PlayPause

func (s *Service) PlayPause() *dbus.Error

PlayPause toggles playback state.

func (*Service) Previous

func (s *Service) Previous() *dbus.Error

Previous goes to the previous track.

func (*Service) Quit

func (s *Service) Quit() *dbus.Error

Quit is a no-op (tmus does not quit via MPRIS).

func (*Service) Raise

func (s *Service) Raise() *dbus.Error

Raise is a no-op (tmus is a terminal app).

func (*Service) Set

func (s *Service) Set(iface, prop string, value dbus.Variant) *dbus.Error

Set implements org.freedesktop.DBus.Properties.Set.

func (*Service) SetPosition

func (s *Service) SetPosition(trackID dbus.ObjectPath, pos int64) *dbus.Error

SetPosition seeks to an absolute position in microseconds.

func (*Service) Stop

func (s *Service) Stop() *dbus.Error

Stop stops playback.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL