Documentation ¶
Index ¶
- Constants
- Variables
- func AddTrackToQueue(track *db.Track)
- func ClearQueue() error
- func Exit() error
- func GetCurrentTrack() *db.Track
- func GetPosition() (float64, error)
- func GetTrackAt(index int) *db.Track
- func Initialize(dataFolder string)
- func MoveDownInQueue(index int) error
- func MoveUpInQueue(index int) error
- func NextLoopStatus() error
- func NextTrack() error
- func Pause() error
- func Play() error
- func PlayPause() error
- func PlayResult(result *youtube.YoutubeEntry)
- func PlayTrack(track *db.Track)
- func PlayTracks(tracks []*db.Track)
- func PreviousTrack() error
- func RemoveFromQueue(index int) error
- func SetLoopStatus(loopStatus LoopStatus) error
- func SetPosition(pos float64) error
- func SetVolume(volume float64) error
- func Shuffle()
- func Stop() error
- type LoopStatus
- type PlayerState
Constants ¶
View Source
const ( LOOP_NONE = LoopStatus(0) LOOP_TRACK = LoopStatus(1) LOOP_QUEUE = LoopStatus(2) )
Variables ¶
View Source
var DataFolder string
View Source
var MpvInstance *mpv.Mpv
Functions ¶
func AddTrackToQueue ¶
func ClearQueue ¶
func ClearQueue() error
func GetCurrentTrack ¶
func GetPosition ¶
func GetTrackAt ¶
func Initialize ¶
func Initialize(dataFolder string)
func MoveDownInQueue ¶
func MoveUpInQueue ¶
func NextLoopStatus ¶
func NextLoopStatus() error
func PlayResult ¶
func PlayResult(result *youtube.YoutubeEntry)
func PlayTracks ¶
func PreviousTrack ¶
func PreviousTrack() error
func RemoveFromQueue ¶
func SetLoopStatus ¶
func SetLoopStatus(loopStatus LoopStatus) error
func SetPosition ¶
Types ¶
type PlayerState ¶
type PlayerState struct { Paused bool Fetching *youtube.YoutubeEntry Queue []*db.Track QueueIndex int Volume float64 Duration float64 // contains filtered or unexported fields }
var State *PlayerState
Source Files ¶
Click to show internal directories.
Click to hide internal directories.