1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

add candidates ip list, add rtc_upload.html to test

This commit is contained in:
HuyaJohn 2020-03-06 23:28:15 -08:00
parent a36ed6954f
commit b730458d51
7 changed files with 176 additions and 9 deletions

View file

@ -4255,6 +4255,23 @@ int SrsConfig::get_rtc_listen()
return ::atoi(conf->arg0().c_str());
}
std::string SrsConfig::get_rtc_candidates()
{
static string DEFAULT = "*";
SrsConfDirective* conf = root->get("rtc");
if (!conf) {
return DEFAULT;
}
conf = conf->get("candidate");
if (!conf || conf->arg0().empty()) {
return DEFAULT;
}
return (conf->arg0().c_str());
}
SrsConfDirective* SrsConfig::get_vhost(string vhost, bool try_default_vhost)
{
srs_assert(root);