app

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Art added in v1.0.1

func Art(artist, track string) (art string, err error)

Art fetches album art for the given track, converts it to ASCII, and return the ASCII stringified album art

func PlayChannel

func PlayChannel(chn *components.ChannelItem, ctx *context.AppContext)

PlayChannel begins streaming the provided channel after fetching its playlist If a channel is already playing, the old stream is stopped first, clearing up resources. This function is *asynchronous* and creates a single streaming resource: the audio stream held by the application context. To clean up resources created by this function, Close() the application's audio stream.

func TogglePause

func TogglePause(ctx *context.AppContext)

TogglePause pauses/unpauses audio when a channel is playing

func UpdateNowPlaying

func UpdateNowPlaying(chn *components.ChannelItem, ctx *context.AppContext)

UpdateNowPlaying updates the application's now playing view with the currently playing channel and album art Artist and track information are fetched separately from album art, allowing for a more responsive UI

Types

This section is empty.

Jump to

Keyboard shortcuts

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