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

No on_stop callback for HTTP-FLV #1388

Closed
zywu31 opened this issue Jun 11, 2019 · 7 comments
Closed

No on_stop callback for HTTP-FLV #1388

zywu31 opened this issue Jun 11, 2019 · 7 comments
Assignees
Labels
API HTTP-API, HTTP-Callback, etc. Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@zywu31
Copy link

zywu31 commented Jun 11, 2019

The following is the translation of the provided text:

'Using SRS 2.0.263
Using HTTP-FLV event callback, several issues were discovered:

  1. When requesting to play HTTP-FLV, the on_play method in http_hooks is called, but the client IP is not obtained.
  2. When stopping the playback of HTTP-FLV, on_close is not called in http_hooks.
  3. Calling the http API http://192.168.1.100:1985/api/v1/clients does not retrieve the HTTP-FLV client information.
    These issues are normal in RTMP.

TRANS_BY_GPT3

@skyempire010
Copy link

skyempire010 commented Nov 8, 2019

  1. One alternative solution is to use nginx as a reverse proxy and add an IP parameter when forwarding requests to the SRS HTTP service using prox_pass.
    location ^~ /flv/ {
    rewrite ^/flv/(.*)$ /$1?ip=$remote_addr break;
    proxy_pass http://127.0.0.1:8080/;
    }
  2. Then, parse and retrieve the IP from the callback's parameters.
  3. Indeed, the on_close callback is not being called when the HTTP-FLV is closed. Is there any solution suggested by the author? This callback can be used to obtain crucial information such as traffic for both sending and receiving. Your support on this matter would be greatly appreciated.
  4. Although the client_id can be obtained from the callback, it is not possible to retrieve related information from the HTTP API.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Dec 26, 2019

The IP issue has been resolved in #1488.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

winlinvip commented Dec 26, 2019

There is no on_close because this event corresponds to on_connect.
The event corresponding to on_play is on_stop, and indeed this event should exist.

TRANS_BY_GPT3

@winlinvip winlinvip added the Bug It might be a bug. label Dec 26, 2019
@winlinvip winlinvip added this to the SRS 3.0 release milestone Dec 26, 2019
@winlinvip winlinvip changed the title HTTP-FLV Http_Hooks问题 No on_stop callback for HTTP-FLV Dec 26, 2019
@winlinvip
Copy link
Member

Postpone to SRS4

@zywu31
Copy link
Author

zywu31 commented Jan 21, 2020 via email

@QiusHosens
Copy link

QiusHosens commented May 12, 2020

@winlinvip
Has the third question been resolved? Thank you.
3. Calling the http API http://192.168.1.100:1985/api/v1/clients did not retrieve any HTTP-FLV client information.
These issues are normal on RTMP.

TRANS_BY_GPT3

@winlinvip winlinvip added the API HTTP-API, HTTP-Callback, etc. label Aug 23, 2021
@winlinvip
Copy link
Member

Fixed.

@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API HTTP-API, HTTP-Callback, etc. Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

5 participants