Files
wehub-resource-sync ead81af521
Deploy to GitHub Pages / deploy (push) Failing after 0s
CI / go (push) Has been cancelled
CI / build (darwin, macos-14) (push) Has been cancelled
CI / build (windows, windows-2025) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:31:13 +08:00

51 lines
857 B
Go

package playback
import "time"
type (
PlayPauseMsg struct{}
PlayMsg struct{}
PauseMsg struct{}
NextMsg struct{}
PrevMsg struct{}
StopMsg struct{}
QuitMsg struct{}
SeekMsg struct{ Offset time.Duration }
SetPositionMsg struct {
Position time.Duration
}
SetVolumeMsg struct{ VolumeDB float64 }
)
type Status string
const (
StatusStopped Status = "Stopped"
StatusPlaying Status = "Playing"
StatusPaused Status = "Paused"
)
type Track struct {
Title string
Artist string
Album string
Genre string
TrackNumber int
URL string
ArtURL string
Duration time.Duration
}
type State struct {
Status Status
Track Track
VolumeDB float64
Position time.Duration
Seekable bool
}
type Notifier interface {
Update(State)
Seeked(time.Duration)
}