add sample credentials to client examples (#696)

This commit is contained in:
Alessandro Ros
2025-02-10 15:45:27 +01:00
committed by GitHub
parent ed078672e4
commit 770549f223
40 changed files with 41 additions and 41 deletions

View File

@@ -19,7 +19,7 @@ func main() {
reader := gortsplib.Client{}
// parse source URL
sourceURL, err := base.ParseURL("rtsp://localhost:8554/mystream")
sourceURL, err := base.ParseURL("rtsp://myuser:mypass@localhost:8554/mystream")
if err != nil {
panic(err)
}
@@ -48,7 +48,7 @@ func main() {
// connect to the server and start recording the same medias
publisher := gortsplib.Client{}
err = publisher.StartRecording("rtsp://localhost:8554/mystream2", desc)
err = publisher.StartRecording("rtsp://myuser:mypass@localhost:8554/mystream2", desc)
if err != nil {
panic(err)
}