streamd: preview quality picker, dashboard polish, C4 wrap keys
- Preview player can select FHD/HD/SD (or ABR master) from publish links - Embed dashboard screenshots in README; Linux streamd+agent setup guide - C4 Widevine wrap license mode + require --wvd; prefer Widevine PSSH - Channel 4 and My5 modules; streamd auth, variants, schedules, HLS gate
This commit is contained in:
parent
b3955bd81e
commit
066e018749
113 changed files with 19002 additions and 1541 deletions
|
|
@ -12,6 +12,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"drmdecryption/apps/streamd/internal/auth"
|
||||
"drmdecryption/modhost"
|
||||
"drmdecryption/repo"
|
||||
)
|
||||
|
|
@ -29,6 +30,12 @@ func (h *Handler) modules(w http.ResponseWriter, r *http.Request) {
|
|||
path := strings.TrimPrefix(r.URL.Path, "/api/modules")
|
||||
path = strings.Trim(path, "/")
|
||||
|
||||
// Module metadata describes the provider plugins installed on this host,
|
||||
// so even reading it needs a principal.
|
||||
if _, ok := auth.Guard(w, r, auth.RoleViewer); !ok {
|
||||
return
|
||||
}
|
||||
|
||||
switch {
|
||||
case path == "" && r.Method == http.MethodGet:
|
||||
h.listModules(w, r)
|
||||
|
|
@ -74,7 +81,10 @@ func (h *Handler) getModule(w http.ResponseWriter, r *http.Request, name string)
|
|||
}
|
||||
|
||||
func (h *Handler) putModule(w http.ResponseWriter, r *http.Request, name string) {
|
||||
if !h.auth(w, r) {
|
||||
// Writing a module.yaml changes how streams are captured on this host:
|
||||
// operator, and recorded.
|
||||
p, ok := auth.Guard(w, r, auth.RoleOperator)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
if !moduleNameRe.MatchString(name) {
|
||||
|
|
@ -117,6 +127,8 @@ func (h *Handler) putModule(w http.ResponseWriter, r *http.Request, name string)
|
|||
}
|
||||
|
||||
info := moduleYAMLInfo(modDir, name)
|
||||
h.audit(r, p, http.StatusOK, "uploaded module.yaml for "+name)
|
||||
h.logger().Info("module.yaml updated", "module", name, "by", p.Actor(), "sha256", info.YAMLSHA256)
|
||||
writeJSON(w, http.StatusOK, map[string]any{
|
||||
"ok": true,
|
||||
"module": info,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue