radio

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2025 License: Unlicense Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Main = iota
	Help
	Tags
	Search
)
View Source
const Version = "0.7.0"

Variables

This section is empty.

Functions

func InitLog

func InitLog(enabled bool)

func VersionString

func VersionString() string

Types

type Application added in v0.4.0

type Application struct {
	// contains filtered or unexported fields
}

func NewApp

func NewApp(player *Player, stations []Station) *Application

func (*Application) Run added in v0.4.0

func (a *Application) Run() error

type FavoriteStation added in v0.5.7

type FavoriteStation struct {
	URL        string    `json:"url"`
	Title      string    `json:"title"`
	PlayCount  int       `json:"play_count"`
	LastPlayed time.Time `json:"last_played"`
}

type Favorites added in v0.5.7

type Favorites struct {
	Stations map[string]*FavoriteStation `json:"stations"`
	// contains filtered or unexported fields
}

func NewFavorites added in v0.5.7

func NewFavorites(stations []Station) *Favorites

type Info

type Info struct {
	Status   string
	Station  string
	Song     string
	PrevSong string
	Url      string
	Volume   int
	Bitrate  int
}

type Page added in v0.4.0

type Page int

type Player

type Player struct {
	sync.Mutex
	Info chan Info
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer() *Player

func (*Player) FadeIn added in v0.7.0

func (p *Player) FadeIn(ctx context.Context, duration time.Duration)

func (*Player) FadeOut added in v0.7.0

func (p *Player) FadeOut(ctx context.Context, duration time.Duration)

func (*Player) Load

func (p *Player) Load(url string)

func (*Player) Quit

func (p *Player) Quit()

func (*Player) SetVolume added in v0.7.0

func (p *Player) SetVolume(volume int)

func (*Player) Start

func (p *Player) Start()

func (*Player) Stop

func (p *Player) Stop()

func (*Player) Toggle

func (p *Player) Toggle(station Station)

func (*Player) VolumeDn

func (p *Player) VolumeDn()

func (*Player) VolumeUp

func (p *Player) VolumeUp()

type Retry

type Retry struct {
	// contains filtered or unexported fields
}

type Station added in v0.4.0

type Station struct {
	// contains filtered or unexported fields
}

func Stations

func Stations(sta string) []Station

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL