Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PlayerCmd ¶
type PlayerCmd struct {
CmdID int
Op PlayerOp
Song song.Song // Only relevant for Op == PlayerPlay and Op == PlayerSeek.
SeekTo time.Duration // Only relevant for Op == PlayerSeek.
}
PlayerCmd is a command that can be sent to the player. If a new command is given before the previous finished, it is assumed that the previous will be canceled.
type PlayerFeedback ¶
PlayerFeedback is the feedback the player gives to a given PlayerCmd. The ID will identify which PlayerCmd is being responded to. Every PlayerCmd will get PlayerFeedback, unless a new PlayerCmd was issued in the meantime.
type QueueFeedback ¶
type Status ¶
type Status struct {
Type StatusType
Position time.Duration // Only relevant for Type == StatusPosition.
SongID string // Only relevant for Type == StatusPlayingNext, StatusNowPlaying and StatusScrobble.
Err error // Only relevant for Type == StatusError.
}
A Status gives information the player provides, independent of received commands. E.g. updates on the position in the track or song changes.
type StatusType ¶
type StatusType int
const ( StatusPosition StatusType = iota StatusPlayingNext StatusStopped StatusNowPlaying StatusScrobble StatusError )
Click to show internal directories.
Click to hide internal directories.