streaming-key-server-manager
streaming-key-server-manager copied to clipboard
fix: remove stream key from hls live name
Description
This PR fixes the issue where the live name is not being renamed during the on_publish
call to remove the stream key from the name.
About the Fix
The on_publish directive accepts two types of HTTP responses, similar to the on_play directive:
- HTTP 2xx: Continues the RTMP session.
- HTTP 3xx: Redirects RTMP to another stream whose name is taken from the Location HTTP response header.
Before the fix, the auth server was returning an OK
response with a 200 status code. As a result, the push was made to hls-live/<live-name>_<stream-key>
. To address this, the auth server now redirects the request with a 302 status code using the name of the live stream.
Additionally, having the push
in nginx.conf
resulted in two streams for HLS, so I removed it.
Other Changes
I have made other changes to the project to facilitate testing of the fix:
- Separated the components into different directories (
streaming-server
,auth-app
,playback-app
, andpostgres
). This way, when a change is made to a file in theauth-app
, docker does not need to rebuild theplayback-app
, for example. - Added a mount cache to each Go Dockerfile, significantly improving the build performance of the two containers.