1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For #3174: WebRTC: Support Unity to publish or play stream. v4.0.264

This commit is contained in:
winlin 2022-09-09 16:34:45 +08:00
parent 8ac8ae1c2e
commit aea2bfbaf9
7 changed files with 31 additions and 13 deletions

View file

@ -505,10 +505,16 @@ srs_error_t SrsRtcServer::listen_api()
return srs_error_wrap(err, "handle publish");
}
// Generally, WHIP is a publishing protocol, but it can be also used as playing.
if ((err = http_api_mux->handle("/rtc/v1/whip/", new SrsGoApiRtcWhip(this))) != srs_success) {
return srs_error_wrap(err, "handle whip");
}
// We create another mount, to support play with the same query string as publish.
if ((err = http_api_mux->handle("/rtc/v1/whip-play/", new SrsGoApiRtcWhip(this))) != srs_success) {
return srs_error_wrap(err, "handle whip play");
}
#ifdef SRS_SIMULATOR
if ((err = http_api_mux->handle("/rtc/v1/nack/", new SrsGoApiRtcNACK(this))) != srs_success) {
return srs_error_wrap(err, "handle nack");