mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
WebRTC: Support WHEP for play. v5.0.182 (#3404)
RFC for WHIP: https://datatracker.ietf.org/doc/draft-ietf-wish-whip/ RFC for WHEP: https://datatracker.ietf.org/doc/draft-murillo-whep/ Please note that SRS 5.0 already had WHIP support. I didn't write a document about WHIP, because WHIP is not a RFC right now, but there are clues in [srs-unity](https://github.com/ossrs/srs-unity#usage-publisher). SRS WHIP url for publisher: `http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream` This PR is for WHEP, the url for player is `http://localhost:1985/rtc/v1/whep/?app=live&stream=livestream` PS: There is a great PR for OBS to have WHIP support, see https://github.com/obsproject/obs-studio/pull/7926 and #3581 PS: WHIP for FFmpeg https://github.com/ossrs/ffmpeg-webrtc/pull/1 See #3170 --------- Co-authored-by: Haibo Chen <495810242@qq.com> Co-authored-by: john <hondaxiao@tencent.com> Co-authored-by: ChenGH <chengh_math@126.com>
This commit is contained in:
parent
456f5d64a9
commit
389a62ee3a
6 changed files with 12 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue