From 9baa6b17e7c180521d36b2ee80bd229291b2a79b Mon Sep 17 00:00:00 2001 From: milarin Date: Wed, 20 Dec 2023 23:22:21 +0100 Subject: [PATCH] property display-name added --- props_get.go | 4 ++++ props_observe.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/props_get.go b/props_get.go index ea62585..f850a76 100644 --- a/props_get.go +++ b/props_get.go @@ -5,6 +5,10 @@ import "time" // list of (almost) all properties can be found in official docs: // https://mpv.io/manual/master/#properties +func GetDisplayNames(socket string) ([]string, error) { + return GetProperty[[]string](socket, "display-names") +} + func IsFullscreen(socket string) (bool, error) { return GetProperty[bool](socket, "fullscreen") } diff --git a/props_observe.go b/props_observe.go index 6496e9a..4da9444 100644 --- a/props_observe.go +++ b/props_observe.go @@ -7,6 +7,10 @@ import ( "git.milar.in/milarin/channel" ) +func ObserveDisplayNames(ctx context.Context, socket string) (<-chan []string, error) { + return ObserveProperty[[]string](ctx, socket, "display-names") +} + func ObserveFullscreen(ctx context.Context, socket string) (<-chan bool, error) { return ObserveProperty[bool](ctx, socket, "fullscreen") }