Documentation
¶
Index ¶
- type AlbumSource
- type EnqueueOpt
- type Library
- type NewStateCB
- type Opts
- type Playback
- type Player
- type PlayerState
- type Queue
- type Service
- func (s *Service) AllStates() map[uuid.UUID]*PlayerState
- func (s *Service) ClearQueue(playerID uuid.UUID) error
- func (s *Service) Enqueue(ctx context.Context, playerID uuid.UUID, opt EnqueueOpt) error
- func (s *Service) Pause(playerID uuid.UUID) error
- func (s *Service) Play(playerID uuid.UUID) error
- func (s *Service) Seek(playerID uuid.UUID, pos time.Duration) error
- func (s *Service) SetVol(playerID uuid.UUID, vol int) error
- func (s *Service) SkipBackward(playerID uuid.UUID) error
- func (s *Service) SkipForward(playerID uuid.UUID) error
- func (s *Service) Stream(ctx context.Context, id unification.ID) (io.ReadSeekCloser, error)
- func (s *Service) StreamRadio(ctx context.Context, id uuid.UUID) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlbumSource ¶
type AlbumSource struct {
ID unification.ID
Disc int
}
type EnqueueOpt ¶
type EnqueueOpt struct {
Clear bool
Next bool
Shuffle bool
From int
Limit int
Album *AlbumSource
Playlist *unification.ID
Popular *unification.ID
PageEntry *string
Radio *uuid.UUID
}
type NewStateCB ¶
type NewStateCB func(id uuid.UUID, state *PlayerState)
type Playback ¶
type Playback struct {
// contains filtered or unexported fields
}
func (*Playback) SetNewStateCB ¶
func (p *Playback) SetNewStateCB(cb NewStateCB)
type PlayerState ¶
type PlayerState struct {
Playback basepb.PlayerState
Queue Queue
}
Click to show internal directories.
Click to hide internal directories.