mpvipc/props_set.go

24 lines
648 B
Go
Raw Permalink Normal View History

2023-12-20 20:50:11 +01:00
package mpvipc
import "time"
func SetFullscreen(socket string, fullscreen bool) error {
return SetProperty[bool](socket, "fullscreen", fullscreen)
}
func SetPause(socket string, pause bool) error {
return SetProperty[bool](socket, "pause", pause)
}
func SetTimePos(socket string, timePos time.Duration) error {
return SetProperty[float64](socket, "time-pos", float64(timePos)/float64(time.Second))
}
func SetPercentPos(socket string, percentPos float64) error {
return SetProperty[float64](socket, "percent-pos", percentPos)
}
2024-01-13 17:13:14 +01:00
func SetVolume(socket string, volume float64) error {
return SetProperty[float64](socket, "volume", volume)
}