File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ listen 1935;
3
3
max_connections 1000;
4
4
srs_log_tank console;
5
5
srs_log_file ./objs/srs.log;
6
+ daemon off;
6
7
7
8
http_server {
8
9
enabled on;
@@ -21,10 +22,13 @@ rtc {
21
22
enabled on;
22
23
# Listen at udp://8000
23
24
listen 8000;
25
+ #
26
+ # The $CANDIDATE means fetch from env, if not configed, use default * as bellow.
27
+ #
24
28
# The * means using IP of network interface stats.network,
25
29
# For example, if stats.network=0, then use IP of eth0 as candidate.
26
30
# @see https://github.com/ossrs/srs/issues/307#issuecomment-599028124
27
- candidate * ;
31
+ candidate $CANDIDATE ;
28
32
}
29
33
30
34
vhost __defaultVhost__ {
Original file line number Diff line number Diff line change 16
16
var PeerConnection = window . RTCPeerConnection || window . mozRTCPeerConnection || window . webkitRTCPeerConnection ;
17
17
var SessionDescription = window . RTCSessionDescription || window . mozRTCSessionDescription || window . webkitRTCSessionDescription ;
18
18
19
- var url = "http://localhost :1985/api/v1/sdp/";
19
+ var url = document . location . protocol + "//" + document . location . hostname + " :1985/api/v1/sdp/";
20
20
21
21
var method = "POST" ;
22
22
var shouldBeAsync = true ;
Original file line number Diff line number Diff line change @@ -4323,6 +4323,11 @@ std::string SrsConfig::get_rtc_candidates()
4323
4323
if (!eip.empty ()) {
4324
4324
return eip;
4325
4325
}
4326
+
4327
+ // If configed as ENV, but no ENV set, use default value.
4328
+ if (srs_string_starts_with (conf->arg0 (), " $" )) {
4329
+ return DEFAULT;
4330
+ }
4326
4331
4327
4332
return (conf->arg0 ().c_str ());
4328
4333
}
You can’t perform that action at this time.
0 commit comments