Add frontend pages, move static to www/, add resolution to tester

Frontend:
- index.html: probe device, navigate to standard/homekit by type
- standard.html: camera config, model search with multi-select
- create.html: stream URL list, custom URL input, create test session
- homekit.html: HomeKit device info, contact links, fallback to standard

Backend:
- Move static files to www/ package with embed (go2rtc pattern)
- Add initStatic() in api with FileServer
- Add width/height to test results from H264 SPS parsing
- Contribute links to gostrix.github.io with auto-filled params
This commit is contained in:
eduard256
2026-03-26 10:18:40 +00:00
parent 0ecf1eb75f
commit 74b4b61198
10 changed files with 2163 additions and 25 deletions
+1 -9
View File
@@ -1,9 +1,7 @@
package api
import (
"embed"
"encoding/json"
"io/fs"
"net"
"net/http"
"time"
@@ -25,10 +23,7 @@ func Init() {
HandleFunc("api/health", apiHealth)
HandleFunc("api/log", apiLog)
// serve frontend from embedded web/ directory
if sub, err := fs.Sub(webFS, "web"); err == nil {
http.Handle("/", http.FileServer(http.FS(sub)))
}
initStatic()
Handler = middlewareCORS(http.DefaultServeMux)
@@ -39,9 +34,6 @@ func Init() {
go listen_serve("tcp", listen)
}
//go:embed web
var webFS embed.FS
func listen_serve(network, address string) {
ln, err := net.Listen(network, address)
if err != nil {