1
0
Fork 0
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:
Haibo Chen 2021-09-23 13:31:45 +08:00 committed by GitHub
parent 40f8460929
commit f901831362
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 277 additions and 5 deletions

View file

@ -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);
}