Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion trunk/src/app/srs_app_rtc_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ srs_error_t SrsGoApiRtcWhip::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessa
if (action.empty()) {
action = "publish";
}
if (srs_string_ends_with(r->path(), "/whip-play/")) {
// For whip-play or whep, parsed to https://datatracker.ietf.org/doc/draft-murillo-whep/
if (srs_string_ends_with(r->path(), "/whip-play/") || srs_string_ends_with(r->path(), "/whep/")) {
action = "play";
}

Expand Down
7 changes: 6 additions & 1 deletion trunk/src/app/srs_app_rtc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,13 +471,18 @@ srs_error_t SrsRtcServer::listen_api()
}

// Generally, WHIP is a publishing protocol, but it can be also used as playing.
// See https://datatracker.ietf.org/doc/draft-ietf-wish-whep/
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.
// See https://datatracker.ietf.org/doc/draft-murillo-whep/
if ((err = http_api_mux->handle("/rtc/v1/whip-play/", new SrsGoApiRtcWhip(this))) != srs_success) {
return srs_error_wrap(err, "handle whip play");
return srs_error_wrap(err, "handle whep play");
}
if ((err = http_api_mux->handle("/rtc/v1/whep/", new SrsGoApiRtcWhip(this))) != srs_success) {
return srs_error_wrap(err, "handle whep play");
}

#ifdef SRS_SIMULATOR
Expand Down