diff --git a/CHANGELOG.md b/CHANGELOG.md index e17d854ba..fbeba27cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The changelog for SRS. ## SRS 4.0 Changelog +* v4.0, 2021-07-08, For [#2403](https://github.com/ossrs/srs/issues/2403), fix padding packets for RTMP2RTC. 4.0.140 * v4.0, 2021-07-04, For [#2424](https://github.com/ossrs/srs/issues/2424), use srandom/random to generate. 4.0.139 * v4.0, 2021-07-01, Merge [#2452](https://github.com/ossrs/srs/pull/2452), fix FFmpeg bug by updating channel_layout. 4.0.138 * v4.0, 2021-06-30, Merge [#2440](https://github.com/ossrs/srs/pull/2440), fix [#2390](https://github.com/ossrs/srs/issues/2390), SRT bug for zerolatency. 4.0.137 diff --git a/README.md b/README.md index f1d593a7b..18234e7f4 100755 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ please set the CANDIDATE ([CN][v4_CN_WebRTC#config-candidate],[EN][v4_EN_WebRTC# ```bash docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 \ --env CANDIDATE=$(ifconfig en0 inet| grep 'inet '|awk '{print $2}') -p 8000:8000/udp \ - ossrs/srs:v4.0.117 ./objs/srs -c conf/srs.conf + ossrs/srs:v4.0.139 ./objs/srs -c conf/srs.conf ``` diff --git a/trunk/research/players/js/srs.sdk.js b/trunk/research/players/js/srs.sdk.js index 5151aebb4..1bfff4d1e 100644 --- a/trunk/research/players/js/srs.sdk.js +++ b/trunk/research/players/js/srs.sdk.js @@ -33,8 +33,8 @@ function SrsRtcPublisherAsync() { // webrtc://r.ossrs.net:11985/live/mystream // or set the api server to myapi.domain.com: // webrtc://myapi.domain.com/live/livestream - // or set the candidate(ip) of answer: - // webrtc://r.ossrs.net/live/livestream?eip=39.107.238.185 + // or set the candidate(eip) of answer: + // webrtc://r.ossrs.net/live/livestream?candidate=39.107.238.185 // or force to access https API: // webrtc://r.ossrs.net/live/livestream?schema=https // or use plaintext, without SRTP: @@ -272,8 +272,8 @@ function SrsRtcPlayerAsync() { // webrtc://r.ossrs.net:11985/live/mystream // or set the api server to myapi.domain.com: // webrtc://myapi.domain.com/live/livestream - // or set the candidate(ip) of answer: - // webrtc://r.ossrs.net/live/livestream?eip=39.107.238.185 + // or set the candidate(eip) of answer: + // webrtc://r.ossrs.net/live/livestream?candidate=39.107.238.185 // or force to access https API: // webrtc://r.ossrs.net/live/livestream?schema=https // or use plaintext, without SRTP: diff --git a/trunk/src/app/srs_app_rtc_api.cpp b/trunk/src/app/srs_app_rtc_api.cpp index 16d6a7b4f..6cba0888c 100644 --- a/trunk/src/app/srs_app_rtc_api.cpp +++ b/trunk/src/app/srs_app_rtc_api.cpp @@ -118,8 +118,11 @@ srs_error_t SrsGoApiRtcPlay::do_serve_http(ISrsHttpResponseWriter* w, ISrsHttpMe srs_discovery_tc_url(tcUrl, schema, host, vhost, app, stream_name, port, param); } - // For client to specifies the EIP of server. + // For client to specifies the candidate(EIP) of server. string eip = r->query_get("eip"); + if (eip.empty()) { + eip = r->query_get("candidate"); + } string codec = r->query_get("codec"); // For client to specifies whether encrypt by SRTP. string srtp = r->query_get("encrypt"); @@ -338,8 +341,11 @@ srs_error_t SrsGoApiRtcPublish::do_serve_http(ISrsHttpResponseWriter* w, ISrsHtt srs_discovery_tc_url(tcUrl, schema, host, vhost, app, stream_name, port, param); } - // For client to specifies the EIP of server. + // For client to specifies the candidate(EIP) of server. string eip = r->query_get("eip"); + if (eip.empty()) { + eip = r->query_get("candidate"); + } string codec = r->query_get("codec"); srs_trace("RTC publish %s, api=%s, tid=%s, clientip=%s, app=%s, stream=%s, offer=%dB, eip=%s, codec=%s", diff --git a/trunk/src/app/srs_app_rtc_sdp.cpp b/trunk/src/app/srs_app_rtc_sdp.cpp index 15af0699e..d671bbaa1 100644 --- a/trunk/src/app/srs_app_rtc_sdp.cpp +++ b/trunk/src/app/srs_app_rtc_sdp.cpp @@ -747,6 +747,9 @@ srs_error_t SrsSdp::parse(const std::string& sdp_str) line.erase(line.size()-1, 1); } + // Strip the space of line, for pion WebRTC client. + line = srs_string_trim_end(line, " "); + if ((err = parse_line(line)) != srs_success) { return srs_error_wrap(err, "parse sdp line failed"); } diff --git a/trunk/src/core/srs_core_version4.hpp b/trunk/src/core/srs_core_version4.hpp index dfb188e12..46bfd26be 100644 --- a/trunk/src/core/srs_core_version4.hpp +++ b/trunk/src/core/srs_core_version4.hpp @@ -9,6 +9,6 @@ #define VERSION_MAJOR 4 #define VERSION_MINOR 0 -#define VERSION_REVISION 139 +#define VERSION_REVISION 140 #endif