Live video on the AT Protocol
1package app
2
3import (
4 "embed"
5 "encoding/json"
6 "io/fs"
7)
8
9//go:embed all:dist/**
10var AllFiles embed.FS
11
12//go:embed package.json
13var pkg []byte
14
15// fetch a static snapshot of the current Streamplace web app
16func Files() (fs.FS, error) {
17 rootFiles, err := fs.Sub(AllFiles, "dist")
18 if err != nil {
19 return nil, err
20 }
21 return rootFiles, nil
22}
23
24func PackageJSON() (map[string]any, error) {
25 var data map[string]any
26 err := json.Unmarshal(pkg, &data)
27 if err != nil {
28 return nil, err
29 }
30 return data, nil
31}