mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-09-26 19:51:14 +08:00
embed
This commit is contained in:
6
main.go
6
main.go
@@ -2,6 +2,7 @@ package rtsp
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"embed"
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
@@ -29,12 +30,17 @@ 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",
|
||||
Type: PLUGIN_PUBLISHER | PLUGIN_HOOK,
|
||||
Config: &config,
|
||||
Run: runPlugin,
|
||||
UIFile: &ui,
|
||||
HotConfig: map[string]func(interface{}){
|
||||
"AutoPull": func(value interface{}) {
|
||||
config.AutoPull = value.(bool)
|
||||
|
Reference in New Issue
Block a user