mirror of
https://github.com/Monibuca/plugin-webrtc.git
synced 2025-10-07 15:50:52 +08:00
embed
This commit is contained in:
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
|||||||
module github.com/Monibuca/plugin-webrtc
|
module github.com/Monibuca/plugin-webrtc
|
||||||
|
|
||||||
go 1.13
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/Monibuca/engine/v2 v2.2.5
|
github.com/Monibuca/engine/v2 v2.2.5
|
||||||
|
6
main.go
6
main.go
@@ -1,6 +1,7 @@
|
|||||||
package webrtc
|
package webrtc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"embed"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
@@ -52,6 +53,10 @@ var config struct {
|
|||||||
// port int
|
// port int
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
//go:embed ui/*
|
||||||
|
//go:embed README.md
|
||||||
|
var ui embed.FS
|
||||||
|
|
||||||
var playWaitList WaitList
|
var playWaitList WaitList
|
||||||
var reg_level = regexp.MustCompile("profile-level-id=(4.+f)")
|
var reg_level = regexp.MustCompile("profile-level-id=(4.+f)")
|
||||||
|
|
||||||
@@ -80,6 +85,7 @@ func init() {
|
|||||||
Name: "WebRTC",
|
Name: "WebRTC",
|
||||||
Type: PLUGIN_PUBLISHER | PLUGIN_SUBSCRIBER,
|
Type: PLUGIN_PUBLISHER | PLUGIN_SUBSCRIBER,
|
||||||
Run: run,
|
Run: run,
|
||||||
|
UIFile: &ui,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user