mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-05-26 15:26:12 +00:00
janus: added default ICE url
This commit is contained in:
@@ -60,6 +60,8 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const char *const default_ice_url = "stun:stun.l.google.com:19302";
|
||||||
|
|
||||||
static us_config_s *_g_config = NULL;
|
static us_config_s *_g_config = NULL;
|
||||||
static const useconds_t _g_watchers_polling = 100000;
|
static const useconds_t _g_watchers_polling = 100000;
|
||||||
|
|
||||||
@@ -670,11 +672,12 @@ static struct janus_plugin_result *_plugin_handle_message(
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (!strcmp(request_str, "features")) {
|
} else if (!strcmp(request_str, "features")) {
|
||||||
|
const char *const ice_url = getenv("JANUS_USTREAMER_WEB_ICE_URL");
|
||||||
json_t *const features = json_pack(
|
json_t *const features = json_pack(
|
||||||
"{s:b, s:b, s:{s:s?}}",
|
"{s:b, s:b, s:{s:s?}}",
|
||||||
"audio", (_g_rtpa != NULL),
|
"audio", (_g_rtpa != NULL),
|
||||||
"mic", (_g_rtpa != NULL && _g_config->aplay_dev_name != NULL),
|
"mic", (_g_rtpa != NULL && _g_config->aplay_dev_name != NULL),
|
||||||
"ice", "url", getenv("JANUS_USTREAMER_WEB_ICE_URL")
|
"ice", "url", (ice_url != NULL ? ice_url : default_ice_url)
|
||||||
);
|
);
|
||||||
PUSH_STATUS("features", features, NULL);
|
PUSH_STATUS("features", features, NULL);
|
||||||
json_decref(features);
|
json_decref(features);
|
||||||
|
|||||||
Reference in New Issue
Block a user