tangled
alpha
login
or
join now
stream.place
/
streamplace
74
fork
atom
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
make internal API url configurable for live subcommand
Natalie B.
8 months ago
4de267e5
d9f53d4f
+15
-5
2 changed files
expand all
collapse all
unified
split
pkg
cmd
live.go
streamplace.go
+2
-2
pkg/cmd/live.go
···
7
7
"os"
8
8
)
9
9
10
10
-
func Live(streamKey string) error {
10
10
+
func Live(streamKey string, httpInternalAddr string) error {
11
11
// Create the URL for the live stream endpoint
12
12
-
url := fmt.Sprintf("http://127.0.0.1:39090/live/%s", streamKey)
12
12
+
url := fmt.Sprintf("http://%s/live/%s", httpInternalAddr, streamKey)
13
13
14
14
// Create a new HTTP request with POST method
15
15
req, err := http.NewRequest("POST", url, os.Stdin)
+13
-3
pkg/cmd/streamplace.go
···
87
87
}
88
88
89
89
if len(os.Args) > 1 && os.Args[1] == "live" {
90
90
-
if len(os.Args) != 3 {
91
91
-
fmt.Println("usage: streamplace live [stream-key]")
90
90
+
cli := config.CLI{Build: build}
91
91
+
fs := cli.NewFlagSet("streamplace live")
92
92
+
93
93
+
err := cli.Parse(fs, os.Args[2:])
94
94
+
if err != nil {
95
95
+
return err
96
96
+
}
97
97
+
98
98
+
args := fs.Args()
99
99
+
if len(args) != 1 {
100
100
+
fmt.Println("usage: streamplace live [flags] [stream-key]")
92
101
os.Exit(1)
93
102
}
94
94
-
return Live(os.Args[2])
103
103
+
104
104
+
return Live(args[0], cli.HTTPInternalAddr)
95
105
}
96
106
97
107
if len(os.Args) > 1 && os.Args[1] == "sign" {