mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Support eip/candidate to set the eip of server
This commit is contained in:
parent
b121f5f588
commit
10b9a81061
2 changed files with 12 additions and 6 deletions
|
@ -33,8 +33,8 @@ function SrsRtcPublisherAsync() {
|
||||||
// webrtc://r.ossrs.net:11985/live/mystream
|
// webrtc://r.ossrs.net:11985/live/mystream
|
||||||
// or set the api server to myapi.domain.com:
|
// or set the api server to myapi.domain.com:
|
||||||
// webrtc://myapi.domain.com/live/livestream
|
// webrtc://myapi.domain.com/live/livestream
|
||||||
// or set the candidate(ip) of answer:
|
// or set the candidate(eip) of answer:
|
||||||
// webrtc://r.ossrs.net/live/livestream?eip=39.107.238.185
|
// webrtc://r.ossrs.net/live/livestream?candidate=39.107.238.185
|
||||||
// or force to access https API:
|
// or force to access https API:
|
||||||
// webrtc://r.ossrs.net/live/livestream?schema=https
|
// webrtc://r.ossrs.net/live/livestream?schema=https
|
||||||
// or use plaintext, without SRTP:
|
// or use plaintext, without SRTP:
|
||||||
|
@ -272,8 +272,8 @@ function SrsRtcPlayerAsync() {
|
||||||
// webrtc://r.ossrs.net:11985/live/mystream
|
// webrtc://r.ossrs.net:11985/live/mystream
|
||||||
// or set the api server to myapi.domain.com:
|
// or set the api server to myapi.domain.com:
|
||||||
// webrtc://myapi.domain.com/live/livestream
|
// webrtc://myapi.domain.com/live/livestream
|
||||||
// or set the candidate(ip) of answer:
|
// or set the candidate(eip) of answer:
|
||||||
// webrtc://r.ossrs.net/live/livestream?eip=39.107.238.185
|
// webrtc://r.ossrs.net/live/livestream?candidate=39.107.238.185
|
||||||
// or force to access https API:
|
// or force to access https API:
|
||||||
// webrtc://r.ossrs.net/live/livestream?schema=https
|
// webrtc://r.ossrs.net/live/livestream?schema=https
|
||||||
// or use plaintext, without SRTP:
|
// or use plaintext, without SRTP:
|
||||||
|
|
|
@ -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);
|
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");
|
string eip = r->query_get("eip");
|
||||||
|
if (eip.empty()) {
|
||||||
|
eip = r->query_get("candidate");
|
||||||
|
}
|
||||||
string codec = r->query_get("codec");
|
string codec = r->query_get("codec");
|
||||||
// For client to specifies whether encrypt by SRTP.
|
// For client to specifies whether encrypt by SRTP.
|
||||||
string srtp = r->query_get("encrypt");
|
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);
|
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");
|
string eip = r->query_get("eip");
|
||||||
|
if (eip.empty()) {
|
||||||
|
eip = r->query_get("candidate");
|
||||||
|
}
|
||||||
string codec = r->query_get("codec");
|
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",
|
srs_trace("RTC publish %s, api=%s, tid=%s, clientip=%s, app=%s, stream=%s, offer=%dB, eip=%s, codec=%s",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue