jukebox

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMPVTimeout      = fmt.Errorf("mpv not responding")
	ErrMPVNeverStarted = fmt.Errorf("mpv never started")
	ErrMPVTooOld       = fmt.Errorf("mpv too old")
)

Functions

func MPVArg

func MPVArg(k string, v any) string

Types

type Jukebox

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

func New

func New() *Jukebox

func (*Jukebox) AppendToPlaylist

func (j *Jukebox) AppendToPlaylist(items []string) error

func (*Jukebox) ClearPlaylist

func (j *Jukebox) ClearPlaylist() error

func (*Jukebox) GetPlaylist

func (j *Jukebox) GetPlaylist() ([]string, error)

func (*Jukebox) GetStatus

func (j *Jukebox) GetStatus() (*Status, error)

func (*Jukebox) GetVolumePct

func (j *Jukebox) GetVolumePct() (float64, error)

func (*Jukebox) Pause

func (j *Jukebox) Pause() error

func (*Jukebox) Play

func (j *Jukebox) Play() error

func (*Jukebox) RemovePlaylistIndex

func (j *Jukebox) RemovePlaylistIndex(i int) error

func (*Jukebox) SetPlaylist

func (j *Jukebox) SetPlaylist(items []string) error

func (*Jukebox) SetVolumePct

func (j *Jukebox) SetVolumePct(v int) error

func (*Jukebox) SkipToPlaylistIndex

func (j *Jukebox) SkipToPlaylistIndex(i int, offsetSecs int) error

func (*Jukebox) Start

func (j *Jukebox) Start(ctx context.Context, sockPath string, mpvExtraArgs []string) error

type Status

type Status struct {
	CurrentIndex    int
	CurrentFilename string
	Length          int
	Playing         bool
	GainPct         int
	Position        int
}

Jump to

Keyboard shortcuts

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