Versions in this module Expand all Collapse all v0 v0.0.3 Sep 4, 2021 Changes in this version + const HookFileEnded + const HookFileLoadStarted + const HookFileLoaded + const HookGenericUpdate + const HookIdle + const HookLoopPlaylistChanged + const HookLoopTrackChanged + const HookPlaybackPaused + const HookPlaybackResumed + const HookPlayerInitialized + const HookPlaylistSongChanged + const HookSavingTrackToPlaylist + const HookSeek + const HookVolumeChanged + const StatusLoopNone + const StatusLoopPlaylist + const StatusLoopTrack v0.0.2 Jan 7, 2021 Changes in this version + const HOOK_FILE_ENDED + const HOOK_FILE_LOADED + const HOOK_FILE_LOAD_STARTED + const HOOK_GENERIC_UPDATE + const HOOK_IDLE + const HOOK_LOOP_PLAYLIST_CHANGED + const HOOK_LOOP_TRACK_CHANGED + const HOOK_PLAYBACK_PAUSED + const HOOK_PLAYBACK_RESUMED + const HOOK_PLAYER_INITIALIZED + const HOOK_PLAYLIST_SONG_CHANGED + const HOOK_SAVING_TRACK_TO_PLAYLIST + const HOOK_SEEK + const HOOK_VOLUME_CHANGED + const LOOP_NONE + const LOOP_PLAYLIST + const LOOP_TRACK + var MpvInstance *mpv.Mpv + func AppendFile(filePath string) error + func ClearPlaylist() error + func FetchLyric() + func ForceUpdate() + func GetPosition() (float64, error) + func Initialize() + func LoadFile(filePath string) error + func LoopNone() error + func LoopPlaylist() error + func LoopTrack() error + func Pause() error + func Play() error + func PlayPause() error + func PlaySearchResult(result *search.SearchResult, playlist *storage.Playlist) error + func PlaylistNext() error + func PlaylistPrevious() error + func RegisterHook(cb HookCallback, hookType int) + func RegisterHooks(cb HookCallback, hookTypes ...int) + func RemoveCurrentFromPlaylist() error + func SaveToPlaylist() + func Seek(seconds int) error + func SetPosition(pos float64) error + func SetVolume(volume float64) error + func Stop() error + type HookCallback func(params ...interface{}) + type LoopStatus int + type PlayerState struct + Data *storage.TunerData + Duration float64 + Idle bool + Loop LoopStatus + Lyric SongLyric + Paused bool + Playlist *storage.Playlist + PlaylistIndex int + Result *search.SearchResult + SavingToPlaylist bool + ShowHelp bool + ShowLyric bool + ShowURL bool + Volume float64 + var State *PlayerState + func (s *PlayerState) GetPlaying() *search.SearchResult + func (s *PlayerState) IsPlaylist() bool + type SongLyric struct + Index int + Lines []string v0.0.1 Dec 17, 2020 Changes in this version + type MPV struct + Cmd *exec.Cmd + Exitted bool + HasAlbum bool + LyricIndex int + LyricLines []string + Pid int + Player *mpris.Player + Playlist *storage.Playlist + PlaylistIndex int + Saving bool + ShowHelp bool + ShowLyric bool + ShowURL bool + func ConnectToMPV(cmd *exec.Cmd, result *search.YouTubeResult, playlist *storage.Playlist, ...) *MPV + func (i *MPV) Exit() + func (i *MPV) FetchLyric() + func (i *MPV) GetPlaying() *search.YouTubeResult + func (i *MPV) IsPlaylist() bool + func (i *MPV) Next() error + func (i *MPV) PlayPause() + func (i *MPV) Previous() error + func (i *MPV) Save() + func (i *MPV) Update() + type SaveFunction func(result *search.YouTubeResult, mpv *MPV) + type SongLoadedHandler func(result *search.YouTubeResult, mpv *MPV) + type UpdateHandler func(result *search.YouTubeResult, mpv *MPV)