initial commit
This commit is contained in:
19
props_set.go
Normal file
19
props_set.go
Normal file
@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user