on_play callback not available in Oryx
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.
I'm interested if it was removed on purpose, for some particular reason, or it just needs to be implemented and tested.
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
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