player

package
v0.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2021 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 AddTrackToQueue(track *db.Track)

func ClearQueue

func ClearQueue() error

func Exit

func Exit() error

func GetCurrentTrack

func GetCurrentTrack() *db.Track

func GetPosition

func GetPosition() (float64, error)

func GetTrackAt

func GetTrackAt(index int) *db.Track

func Initialize

func Initialize(dataFolder string)

func MoveDownInQueue

func MoveDownInQueue(index int) error

func MoveUpInQueue

func MoveUpInQueue(index int) error

func NextLoopStatus

func NextLoopStatus() error

func NextTrack

func NextTrack() error

func Pause

func Pause() error

func Play

func Play() error

func PlayPause

func PlayPause() error

func PlayResult

func PlayResult(result *youtube.YoutubeEntry)

func PlayTrack

func PlayTrack(track *db.Track)

func PlayTracks

func PlayTracks(tracks []*db.Track)

func PreviousTrack

func PreviousTrack() error

func RemoveFromQueue

func RemoveFromQueue(index int) error

func SetLoopStatus

func SetLoopStatus(loopStatus LoopStatus) error

func SetPosition

func SetPosition(pos float64) error

func SetVolume

func SetVolume(volume float64) error

func Shuffle

func Shuffle()

func Stop

func Stop() error

Types

type LoopStatus

type LoopStatus int

func GetLoopStatus

func GetLoopStatus() LoopStatus

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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