mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-10-21 14:49:30 +08:00
embed
This commit is contained in:
6
main.go
6
main.go
@@ -2,6 +2,7 @@ package rtsp
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
@@ -29,12 +30,17 @@ var config = struct {
|
|||||||
}
|
}
|
||||||
}{":554", false, "rtsp://localhost/${streamPath}", 0, false, nil}
|
}{":554", false, "rtsp://localhost/${streamPath}", 0, false, nil}
|
||||||
|
|
||||||
|
//go:embed ui/*
|
||||||
|
//go:embed README.md
|
||||||
|
var ui embed.FS
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
InstallPlugin(&PluginConfig{
|
InstallPlugin(&PluginConfig{
|
||||||
Name: "RTSP",
|
Name: "RTSP",
|
||||||
Type: PLUGIN_PUBLISHER | PLUGIN_HOOK,
|
Type: PLUGIN_PUBLISHER | PLUGIN_HOOK,
|
||||||
Config: &config,
|
Config: &config,
|
||||||
Run: runPlugin,
|
Run: runPlugin,
|
||||||
|
UIFile: &ui,
|
||||||
HotConfig: map[string]func(interface{}){
|
HotConfig: map[string]func(interface{}){
|
||||||
"AutoPull": func(value interface{}) {
|
"AutoPull": func(value interface{}) {
|
||||||
config.AutoPull = value.(bool)
|
config.AutoPull = value.(bool)
|
||||||
|
Reference in New Issue
Block a user