Documentation
¶
Index ¶
- type NewStateCB
- type Player
- func (p *Player) Pause() error
- func (p *Player) Play(audioURL string) error
- func (p *Player) Resume() error
- func (p *Player) Run(ctx context.Context) error
- func (p *Player) Seek(pos time.Duration) error
- func (p *Player) SetVol(vol int) error
- func (p *Player) State() basepb.PlayerState
- func (p *Player) Stop() error
- type PlayerOption
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) State ¶
func (p *Player) State() basepb.PlayerState
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
Click to show internal directories.
Click to hide internal directories.