playback

package
v0.0.0-...-4866100 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlaybackStateStopped = iota
	PlaybackStatePaused
	PlaybackStatePlaying
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(client *client.Client) *Controller

func (*Controller) AddToQueue

func (c *Controller) AddToQueue(songs []*subsonic.Child)

func (*Controller) ClearQueue

func (c *Controller) ClearQueue()

func (*Controller) Close

func (c *Controller) Close() error

func (*Controller) GetCurrentSong

func (c *Controller) GetCurrentSong() *subsonic.Child

func (*Controller) GetQueue

func (c *Controller) GetQueue() []*subsonic.Child

func (*Controller) GetQueuePosition

func (c *Controller) GetQueuePosition() int

func (*Controller) Next

func (c *Controller) Next()

func (*Controller) Play

func (c *Controller) Play(song *subsonic.Child)

func (*Controller) Prev

func (c *Controller) Prev()

func (*Controller) SetQueue

func (c *Controller) SetQueue(songs []*subsonic.Child)

func (*Controller) SetQueuePosition

func (c *Controller) SetQueuePosition(position int)

func (*Controller) SetSongElapsedFunc

func (c *Controller) SetSongElapsedFunc(f func(sing *subsonic.Child, elapsed time.Duration))

func (*Controller) SetSongEndedFunc

func (c *Controller) SetSongEndedFunc(f func(song *subsonic.Child))

func (*Controller) State

func (c *Controller) State() PlaybackState

func (*Controller) Stop

func (c *Controller) Stop()

func (*Controller) Stream

func (c *Controller) Stream(reader io.Reader, song *subsonic.Child)

func (*Controller) TogglePlayPause

func (c *Controller) TogglePlayPause()

type DesktopPlayback

type DesktopPlayback interface {
	Start()
	Stop() error
	OnPlayPause()
	OnPlaylistChanged()
	OnSongChanged()
	OnPositionChanged(sec int)
}

type PlaybackState

type PlaybackState int

Jump to

Keyboard shortcuts

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