Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on_play callback not available in Oryx #206

Open
jurry opened this issue Jul 25, 2024 · 3 comments
Open

on_play callback not available in Oryx #206

jurry opened this issue Jul 25, 2024 · 3 comments
Labels
feature New feature or request

Comments

@jurry
Copy link

jurry commented Jul 25, 2024

I would like to secure the access to a stream by token authentication. SRS contains on_play callback, but this option is not available in Oryx. Currently, anyone with the URL can watch the stream.

Describe the solution you'd like
The goal is to prevent unauthorized users from watching a stream.

Describe alternatives you've considered
I'm not aware of any alternate solution.
SRS or other solution instead of Oryx may solve the issue.

@jurry jurry added the feature New feature or request label Jul 25, 2024
@jurry
Copy link
Author

jurry commented Jul 25, 2024

I'm interested if it was removed on purpose, for some particular reason, or it just needs to be implemented and tested.

@suzp1984
Copy link
Contributor

You can implement your own api server to authorize the play streams, set the http api hook by the env: SRS_VHOST_HTTP_HOOKS_ON_PLAY.
env: SRS_VHOST_HTTP_HOOKS_ON_PLAY=http://ip/on_play_api

@jurry
Copy link
Author

jurry commented Jul 28, 2024

It is exactly what I needed, thanks!
I was not aware that the SRS hooks are also exposed in Oryx. I was under an assumption Oryx had limited configuration possibilities compared to the pure SRS. I haven't found it in the documentation, maybe it should be more visible, for example in this table? https://ossrs.net/lts/en-us/docs/v5/doc/getting-started-oryx#compare-to-srs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants