Documentation ¶
Index ¶
- type Callback
- type Client
- type Cmd
- type CmdAddBack
- type CmdAddFront
- type CmdDelete
- type CmdGetQueue
- type CmdGetSpeed
- type CmdGetTime
- type CmdJump
- type CmdLoop
- type CmdPause
- type CmdPlay
- type CmdPlayFileAndStop
- type CmdSeek
- type CmdShuffle
- type CmdSkipAll
- type CmdSpeed
- type CmdSwap
- type CmdUnshuffle
- type Event
- type EventKilled
- type EventStreamUpdated
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { CmdCh chan<- Cmd // ErrCh is blocking meaning that you will have to constantly read it, // either using another goroutine or a select statement whenever sending a // command. ErrCh <-chan error }
func NewClient ¶
func NewClient(excfg extractor.Config, ffmpegPath string, outCh chan<- []byte, callbacks ...Callback) Client
Creates a new player client that will run in parallel and receive commands via the returned Client.CmdCh. All audio will be sent via the given outCh. Closing the returned Client.CmdCh channel acts as a kill signal.
type Cmd ¶
type Cmd interface{}
Client commands Get commands can most easily be executed via the builtin convenience functions NOTE: When using commands like Jump, Swap and Delete, we can't be sure that our versions of the indices correspond to the versions the caller is referring to, but in this context, that should be fine
type CmdAddBack ¶
type CmdAddFront ¶
type CmdGetQueue ¶
type CmdGetQueue chan<- *Queue
type CmdGetSpeed ¶
type CmdGetSpeed chan<- float64
type CmdGetTime ¶
type CmdGetTime chan<- float64
type CmdPlayFileAndStop ¶
type CmdPlayFileAndStop struct { DoneCh chan<- struct{} Data []byte }
type CmdShuffle ¶
type CmdShuffle struct{}
type CmdSkipAll ¶
type CmdSkipAll struct{}
type CmdUnshuffle ¶
type CmdUnshuffle struct{}
type EventKilled ¶
type EventKilled struct{}
type EventStreamUpdated ¶
type EventStreamUpdated struct{}
Click to show internal directories.
Click to hide internal directories.