diff --git a/go.mod b/go.mod index e622a2b..e393842 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/Monibuca/plugin-rtsp/v3 -go 1.13 +go 1.16 require ( github.com/Monibuca/engine/v3 v3.0.0-alpha6 diff --git a/main.go b/main.go index b818ab1..7823981 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package rtsp import ( "bufio" + "embed" "fmt" "log" "net" @@ -28,11 +29,16 @@ var config = struct { } }{":554", false, "rtsp://localhost/${streamPath}", 0, false, nil} +//go:embed ui/* +//go:embed README.md +var ui embed.FS + func init() { InstallPlugin(&PluginConfig{ Name: "RTSP", Config: &config, Run: runPlugin, + UIFile: &ui, HotConfig: map[string]func(interface{}){ "AutoPull": func(value interface{}) { config.AutoPull = value.(bool)