Skip to content

Commit

Permalink
fix MTX_CONN_TYPE value with RTSP connections (#3967) (#4075)
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 authored Dec 25, 2024
1 parent 8a808ac commit 28970b3
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 106 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1787,9 +1787,9 @@ The server allows to specify commands that are executed when a certain event hap
# Command to run when a client connects to the server.
# This is terminated with SIGINT when a client disconnects from the server.
# The following environment variables are available:
# * RTSP_PORT: RTSP server port
# * MTX_CONN_TYPE: connection type
# * MTX_CONN_ID: connection ID
# * RTSP_PORT: RTSP server port
runOnConnect: curl http://my-custom-server/webhook?conn_type=$MTX_CONN_TYPE&conn_id=$MTX_CONN_ID
# Restart the command if it exits.
runOnConnectRestart: no
Expand Down Expand Up @@ -1911,10 +1911,10 @@ pathDefaults:
# Command to run when a recording segment is created.
# The following environment variables are available:
# * MTX_PATH: path name
# * MTX_SEGMENT_PATH: segment file path
# * RTSP_PORT: RTSP server port
# * G1, G2, ...: regular expression groups, if path name is
# a regular expression.
# * MTX_SEGMENT_PATH: segment file path
runOnRecordSegmentCreate: curl http://my-custom-server/webhook?path=$MTX_PATH&segment_path=$MTX_SEGMENT_PATH
```

Expand All @@ -1925,11 +1925,11 @@ pathDefaults:
# Command to run when a recording segment is complete.
# The following environment variables are available:
# * MTX_PATH: path name
# * MTX_SEGMENT_PATH: segment file path
# * MTX_SEGMENT_DURATION: segment duration
# * RTSP_PORT: RTSP server port
# * G1, G2, ...: regular expression groups, if path name is
# a regular expression.
# * MTX_SEGMENT_PATH: segment file path
# * MTX_SEGMENT_DURATION: segment duration
runOnRecordSegmentComplete: curl http://my-custom-server/webhook?path=$MTX_PATH&segment_path=$MTX_SEGMENT_PATH
```

Expand Down
2 changes: 1 addition & 1 deletion internal/core/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ webrtc_sessions_bytes_sent 0

go func() {
defer wg.Done()
u, err := url.Parse("rtmp://localhost:1936/rtmps_path")
u, err := url.Parse("rtmps://localhost:1936/rtmps_path")
require.NoError(t, err)

nconn, err := tls.Dial("tcp", u.Host, &tls.Config{InsecureSkipVerify: true})
Expand Down
Loading

0 comments on commit 28970b3

Please # to comment.