mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
add sample credentials to client examples (#696)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user