Documentation
¶
Index ¶
- type Client
- type MPRISHandler
- func (m *MPRISHandler) CanControl() (bool, error)
- func (m *MPRISHandler) CanGoNext() (bool, error)
- func (m *MPRISHandler) CanGoPrevious() (bool, error)
- func (m *MPRISHandler) CanPause() (bool, error)
- func (m *MPRISHandler) CanPlay() (bool, error)
- func (m *MPRISHandler) CanQuit() (bool, error)
- func (m *MPRISHandler) CanRaise() (bool, error)
- func (m *MPRISHandler) CanSeek() (bool, error)
- func (m *MPRISHandler) Errors() <-chan error
- func (m *MPRISHandler) HasTrackList() (bool, error)
- func (m *MPRISHandler) Identity() (string, error)
- func (m *MPRISHandler) LoopStatus() (types.LoopStatus, error)
- func (m *MPRISHandler) MaximumRate() (float64, error)
- func (m *MPRISHandler) Metadata() (types.Metadata, error)
- func (m *MPRISHandler) MinimumRate() (float64, error)
- func (m *MPRISHandler) Next() error
- func (m *MPRISHandler) OpenUri(_ string) error
- func (m *MPRISHandler) Pause() error
- func (m *MPRISHandler) Play() error
- func (m *MPRISHandler) PlayPause() error
- func (m *MPRISHandler) PlaybackStatus() (types.PlaybackStatus, error)
- func (m *MPRISHandler) Position() (int64, error)
- func (m *MPRISHandler) Previous() error
- func (m *MPRISHandler) Quit() error
- func (m *MPRISHandler) Raise() error
- func (m *MPRISHandler) Rate() (float64, error)
- func (m *MPRISHandler) Seek(offset types.Microseconds) error
- func (m *MPRISHandler) SetLoopStatus(status types.LoopStatus) error
- func (m *MPRISHandler) SetPosition(trackId string, position types.Microseconds) error
- func (m *MPRISHandler) SetRate(float64) error
- func (m *MPRISHandler) SetShuffle(enable bool) error
- func (m *MPRISHandler) SetVolume(v float64) error
- func (m *MPRISHandler) Shuffle() (bool, error)
- func (m *MPRISHandler) Stop() error
- func (m *MPRISHandler) SupportedMimeTypes() ([]string, error)
- func (m *MPRISHandler) SupportedUriSchemes() ([]string, error)
- func (m *MPRISHandler) Volume() (float64, error)
- type ShuffleStatus
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MPRISHandler ¶
type MPRISHandler struct {
// contains filtered or unexported fields
}
MPRISHandler materializes Status into dbus to implement the MPRIS control interface.
Adapted from https://raw.githubusercontent.com/dweymouth/supersonic/v0.13.0/backend/mpris.go Licensed under GPL3.0 by Drew Weymouth
func NewMPRISHandler ¶
func NewMPRISHandler(ctx context.Context, updates <-chan Status, client *Client) *MPRISHandler
func (*MPRISHandler) CanControl ¶
func (m *MPRISHandler) CanControl() (bool, error)
func (*MPRISHandler) CanGoNext ¶
func (m *MPRISHandler) CanGoNext() (bool, error)
func (*MPRISHandler) CanGoPrevious ¶
func (m *MPRISHandler) CanGoPrevious() (bool, error)
func (*MPRISHandler) CanPause ¶
func (m *MPRISHandler) CanPause() (bool, error)
func (*MPRISHandler) CanPlay ¶
func (m *MPRISHandler) CanPlay() (bool, error)
func (*MPRISHandler) CanQuit ¶
func (m *MPRISHandler) CanQuit() (bool, error)
func (*MPRISHandler) CanRaise ¶
func (m *MPRISHandler) CanRaise() (bool, error)
func (*MPRISHandler) CanSeek ¶
func (m *MPRISHandler) CanSeek() (bool, error)
func (*MPRISHandler) Errors ¶
func (m *MPRISHandler) Errors() <-chan error
func (*MPRISHandler) HasTrackList ¶
func (m *MPRISHandler) HasTrackList() (bool, error)
func (*MPRISHandler) Identity ¶
func (m *MPRISHandler) Identity() (string, error)
func (*MPRISHandler) LoopStatus ¶
func (m *MPRISHandler) LoopStatus() (types.LoopStatus, error)
func (*MPRISHandler) MaximumRate ¶
func (m *MPRISHandler) MaximumRate() (float64, error)
func (*MPRISHandler) MinimumRate ¶
func (m *MPRISHandler) MinimumRate() (float64, error)
func (*MPRISHandler) Next ¶
func (m *MPRISHandler) Next() error
func (*MPRISHandler) OpenUri ¶
func (m *MPRISHandler) OpenUri(_ string) error
func (*MPRISHandler) Pause ¶
func (m *MPRISHandler) Pause() error
func (*MPRISHandler) Play ¶
func (m *MPRISHandler) Play() error
func (*MPRISHandler) PlayPause ¶
func (m *MPRISHandler) PlayPause() error
func (*MPRISHandler) PlaybackStatus ¶
func (m *MPRISHandler) PlaybackStatus() (types.PlaybackStatus, error)
func (*MPRISHandler) Position ¶
func (m *MPRISHandler) Position() (int64, error)
func (*MPRISHandler) Previous ¶
func (m *MPRISHandler) Previous() error
func (*MPRISHandler) Quit ¶
func (m *MPRISHandler) Quit() error
func (*MPRISHandler) Raise ¶
func (m *MPRISHandler) Raise() error
func (*MPRISHandler) Rate ¶
func (m *MPRISHandler) Rate() (float64, error)
func (*MPRISHandler) Seek ¶
func (m *MPRISHandler) Seek(offset types.Microseconds) error
func (*MPRISHandler) SetLoopStatus ¶
func (m *MPRISHandler) SetLoopStatus(status types.LoopStatus) error
func (*MPRISHandler) SetPosition ¶
func (m *MPRISHandler) SetPosition(trackId string, position types.Microseconds) error
func (*MPRISHandler) SetRate ¶
func (m *MPRISHandler) SetRate(float64) error
func (*MPRISHandler) SetShuffle ¶
func (m *MPRISHandler) SetShuffle(enable bool) error
func (*MPRISHandler) SetVolume ¶
func (m *MPRISHandler) SetVolume(v float64) error
func (*MPRISHandler) Shuffle ¶
func (m *MPRISHandler) Shuffle() (bool, error)
func (*MPRISHandler) Stop ¶
func (m *MPRISHandler) Stop() error
func (*MPRISHandler) SupportedMimeTypes ¶
func (m *MPRISHandler) SupportedMimeTypes() ([]string, error)
func (*MPRISHandler) SupportedUriSchemes ¶
func (m *MPRISHandler) SupportedUriSchemes() ([]string, error)
func (*MPRISHandler) Volume ¶
func (m *MPRISHandler) Volume() (float64, error)
type ShuffleStatus ¶
type ShuffleStatus string
const ( StuffleStatusNone ShuffleStatus = "0" StuffleStatusTrack ShuffleStatus = "1" StuffleStatusAlbum ShuffleStatus = "2" )
type Status ¶
type Status struct {
CanSeek bool
Connected bool
Loop types.LoopStatus
Shuffle ShuffleStatus
Metadata types.Metadata
Playback types.PlaybackStatus
Position time.Duration
Volume int
}
func EmptyStatus ¶
func EmptyStatus() Status
Click to show internal directories.
Click to hide internal directories.