-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Enhancement: Add param and stream to on_connect #1859
Conversation
Add stream and param to hook call on_connect for better use
Could you please review this pr and merge into master if possible? @winlinvip |
3c0fc9b
to
ccd8c86
Compare
1ca9308
to
8d44b98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem
@@ -70,6 +70,8 @@ srs_error_t SrsHttpHooks::on_connect(string url, SrsRequest* req) | |||
obj->set("ip", SrsJsonAny::str(req->ip.c_str())); | |||
obj->set("vhost", SrsJsonAny::str(req->vhost.c_str())); | |||
obj->set("app", SrsJsonAny::str(req->app.c_str())); | |||
obj->set("stream", SrsJsonAny::str(req->stream.c_str())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stream does not have a value in on_connect
, right? It only has a value when play or publish occurs.
However, adding it is also possible, but it may be an empty value.
TRANS_BY_GPT3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you can note that in the documentation that this may be null.
Add stream and param to hook call on_connect for better use