kodi

package
v0.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NewStateCB

type NewStateCB func(old, new basepb.PlayerState) error

type Player

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

func InitPlayer

func InitPlayer(host string, port int, newStateCB NewStateCB, opts ...PlayerOption) (*Player, error)

func (*Player) Pause

func (p *Player) Pause() error

func (*Player) Play

func (p *Player) Play(audioURL string) error

func (*Player) Resume

func (p *Player) Resume() error

func (*Player) Run

func (p *Player) Run(ctx context.Context) error

func (*Player) Seek

func (p *Player) Seek(pos time.Duration) error

func (*Player) SetVol

func (p *Player) SetVol(vol int) error

func (*Player) State

func (p *Player) State() basepb.PlayerState

func (*Player) Stop

func (p *Player) Stop() error

type PlayerOption

type PlayerOption func(*Player)

func PlayerWithCommOpts

func PlayerWithCommOpts(opts ...tcp.CommOption) PlayerOption

func PlayerWithLogger

func PlayerWithLogger(logger *slog.Logger) PlayerOption

func PlayerWithLoggerWith

func PlayerWithLoggerWith(args ...any) PlayerOption

Jump to

Keyboard shortcuts

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