added volume getter and setter
This commit is contained in:
parent
930caa62c2
commit
ddb1e3af17
@ -17,6 +17,10 @@ func IsPaused(socket string) (bool, error) {
|
||||
return GetProperty[bool](socket, "pause")
|
||||
}
|
||||
|
||||
func GetVolume(socket string) (float64, error) {
|
||||
return GetProperty[float64](socket, "volume")
|
||||
}
|
||||
|
||||
func GetFilename(socket string) (string, error) {
|
||||
return GetProperty[string](socket, "filename")
|
||||
}
|
||||
|
@ -17,3 +17,7 @@ func SetTimePos(socket string, timePos time.Duration) error {
|
||||
func SetPercentPos(socket string, percentPos float64) error {
|
||||
return SetProperty[float64](socket, "percent-pos", percentPos)
|
||||
}
|
||||
|
||||
func SetVolume(socket string, volume float64) error {
|
||||
return SetProperty[float64](socket, "volume", volume)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user