streaming-key-server-manager icon indicating copy to clipboard operation
streaming-key-server-manager copied to clipboard

fix: remove stream key from hls live name

Open marcosfons opened this issue 8 months ago • 0 comments

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, and postgres). This way, when a change is made to a file in the auth-app, docker does not need to rebuild the playback-app, for example.
  • Added a mount cache to each Go Dockerfile, significantly improving the build performance of the two containers.

marcosfons avatar Jun 12 '24 02:06 marcosfons