diff --git a/props_get.go b/props_get.go index f850a76..6b1ab1a 100644 --- a/props_get.go +++ b/props_get.go @@ -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") } diff --git a/props_set.go b/props_set.go index c0dc0d1..dee492b 100644 --- a/props_set.go +++ b/props_set.go @@ -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) +}