globalstate

package
v0.0.0-...-9316bc8 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveState

func SaveState(s Statemap)

Types

type Statemap

type Statemap struct {
	CurrentSong    db.Song     `json:"currentSong"`    // the ID of the current song
	Elapsed        float64     `json:"elapsed"`        // How many seconds into the current song we are
	Paused         bool        `json:"paused"`         // If the player is paused
	Volume         float64     `json:"volume"`         // The volume of the current song
	Muted          bool        `json:"muted"`          // If the player is muted
	Repeat         bool        `json:"repeat"`         // If repeat mode is active
	Shuffle        bool        `json:"shuffle"`        // If the player is on shuffle mode
	Next           db.Song     `json:"next"`           // The ID of the next song
	Prev           db.Song     `json:"prev"`           // The ID of the previous song
	ActivePlaylist db.Playlist `json:"activePlaylist"` // The ID of the active playlist
	// Queue          []db.Song   `json:"queue"`          // The IDs of the songs in the queue
	CurrentIndex int  `json:"currentIndex"` // The index of the current song in the queue
	IsDebug      bool `json:"isDebug"`      // If the player is in debug mode
}
var (
	State Statemap
)

func GetState

func GetState() Statemap

Jump to

Keyboard shortcuts

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