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) Resume(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)
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 From int Limit int Album *AlbumSource Playlist *unification.ID Popular *unification.ID PageEntry *string }
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 }
type Queue ¶
type Queue struct { Current int Tracks []unification.Track }
Click to show internal directories.
Click to hide internal directories.