mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Enhance HLS: support http callback on_play/stop, support statistic (#2578)
* Enhance HLS: support http callback on_play/stop, support statistic * make code readable * make code readable * rename secret
This commit is contained in:
parent
40f8460929
commit
f901831362
7 changed files with 277 additions and 5 deletions
|
@ -840,8 +840,13 @@ srs_error_t SrsGoApiClients::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessa
|
|||
return srs_api_response_code(w, r, ERROR_RTMP_CLIENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
client->conn->expire();
|
||||
srs_warn("kickoff client id=%s ok", client_id.c_str());
|
||||
if (client->conn) {
|
||||
client->conn->expire();
|
||||
srs_warn("kickoff client id=%s ok", client_id.c_str());
|
||||
} else {
|
||||
srs_error("kickoff client id=%s error", client_id.c_str());
|
||||
return srs_api_response_code(w, r, SRS_CONSTS_HTTP_BadRequest);
|
||||
}
|
||||
} else {
|
||||
return srs_go_http_error(w, SRS_CONSTS_HTTP_MethodNotAllowed);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue