algora-io / tv

Open source Twitch for developers
https://algora.tv
Other
1.07k stars 67 forks source link

Validate stream_key inside Pipeline #98

Closed lastcanal closed 2 months ago

lastcanal commented 2 months ago

This PR validates "real" stream keys while still being backwards compatible with URL based stream keys.

I've moved all the post-connection logic that was in the validator into the pipeline and tried to avoid refactoring, although it's ripe for the pickin' now that the current user is available before the video is created. I've tested broadcasting via RTMP to Restream, but I haven't tested any of the other parts (like the websocket/chat connections).

I also have a branch that targets main prior to the LL-HLS branch being merged, in case you need to revert LL-HLS while still supporting stream keys.

For the user interface: I've moved the stream connection info into it's own section because 'save' was confusing in the context of re-generating keys, which are automatically saved. The "Generate" and "Copy" buttons are also as far apart from each other as possible to avoid any miss-click on "Generate" while trying to copy.

Here is a demo of both url and stream keys working

Screencast from 2024-09-17 20-07-46.webm

/claim #41

zcesur commented 2 months ago

Awesome work! Nice to see you already switched to Tee.Parallel -- super useful to have the user available before pipeline is started. Good call with splitting up the connection details too

/bonus $25

Btw are you in our Discord channel? Would love to get in touch

algora-pbc[bot] commented 2 months ago

A bonus of $25 has been added to the bounty by zcesur. @lastcanal: You will receive a total of $100 once you implement the requested changes and your PR is merged.