services

package
v0.0.0-...-f97bc68 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CMD_RESET = "reset"

Variables

View Source
var KeyFunctionsMap = map[string]func(){
	"play": func() {
		fmt.Println("play")
		err := VLC_Play()
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
	"pause": func() {
		fmt.Println("pause")
		err := VLC_Pause()
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
	"stop": func() {
		fmt.Println("stop")
		err := VLC_Stop()
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
	"prev": func() {
		fmt.Println("prev")
		err := VLC_Prev()
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
	"next": func() {
		fmt.Println("next")
		err := VLC_Next()
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
	"volup": func() {
		fmt.Println("volup")
		err := VLC_Volup(1)
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
	"voldown": func() {
		fmt.Println("voldown")
		err := VLC_Voldown(1)
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
	"clear": func() {
		fmt.Println("clear")
		err := VLC_Clear()
		if err != nil {
			log.Printf("error: %s\n", err.Error())
		}
	},
}
View Source
var VlcHost = "192.168.86.176:8888"

Functions

func SimplerPlaylistMap

func SimplerPlaylistMap(config *Configuration) map[string]string

func VLC_Add

func VLC_Add(xyz string) error

func VLC_Clear

func VLC_Clear() error

func VLC_Enqueue

func VLC_Enqueue(xyz string) error

func VLC_IsPlaying

func VLC_IsPlaying() (bool, error)

func VLC_Next

func VLC_Next() error

func VLC_Pause

func VLC_Pause() error

func VLC_Play

func VLC_Play() error

func VLC_Prev

func VLC_Prev() error

func VLC_StartPlaylist

func VLC_StartPlaylist(playlist string) error

func VLC_Status

func VLC_Status() (string, error)

func VLC_Stop

func VLC_Stop() error

func VLC_Voldown

func VLC_Voldown(step int) error

func VLC_Volup

func VLC_Volup(step int) error

func VLCsendCommand

func VLCsendCommand(cmdList []string, waitForResponse bool) (string, error)

Types

type Configuration

type Configuration struct {
	VlcHost            string              `json:"vlcHost"`
	SerialPort         string              `json:"serialPort"`
	PlaylistCollection map[string]Playlist `json:"playlists"`
}

type Playlist

type Playlist struct {
	Name string `json:"name"`
	File string `json:"file,omitempty"`
}

type SerialComms

type SerialComms struct {
	// contains filtered or unexported fields
}

func NewSerialComms

func NewSerialComms(config *Configuration) *SerialComms

func (*SerialComms) StartSerialComms

func (sc *SerialComms) StartSerialComms()

Jump to

Keyboard shortcuts

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