Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type EventType
Timestamp time.Time
Previous *core.PlaybackState
Current *core.PlaybackState
}
Event represents a playback state change.
type Formatter ¶
type Formatter struct {
// contains filtered or unexported fields
}
Formatter formats events for output.
func NewFormatter ¶
func NewFormatter(opts ...FormatterOption) *Formatter
NewFormatter creates a new formatter with the given options.
type FormatterOption ¶
type FormatterOption func(*Formatter)
FormatterOption configures a Formatter.
func WithTemplate ¶
func WithTemplate(tmpl string) FormatterOption
WithTemplate sets a custom format template.
func WithTimestamp ¶
func WithTimestamp(enabled bool) FormatterOption
WithTimestamp enables timestamp output.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher polls a player for state changes and emits events.
func NewWatcher ¶
NewWatcher creates a new state watcher.
Click to show internal directories.
Click to hide internal directories.