Fixed protocol display for websocket-based outputs in JSON streaminfo

This commit is contained in:
Thulinma 2020-10-13 23:26:31 +02:00
parent 3f6e1c8768
commit e7d802836a
2 changed files with 5 additions and 3 deletions

View file

@ -320,8 +320,10 @@ namespace Mist{
}
}
if (!strmMeta.isMember("live") || !it->isMember("nolive")){
if (!url.protocol.size() && it->isMember("handler")){
url.protocol = (*it)["handler"].asStringRef();
bool isSSL = false;
if (url.protocol == "https" || url.protocol == "wss"){isSSL = true;}
if (it->isMember("handler")){
url.protocol = (*it)["handler"].asStringRef() + (isSSL?"s":"");
}
addSource(relurl, sources, url, *it, most_simul, total_matches);
}

View file

@ -167,7 +167,7 @@ namespace Mist{
capa["codecs"][0u][1u].append("opus");
capa["codecs"][0u][1u].append("ALAW");
capa["codecs"][0u][1u].append("ULAW");
capa["methods"][0u]["handler"] = "webrtc";
capa["methods"][0u]["handler"] = "ws";
capa["methods"][0u]["type"] = "webrtc";
capa["methods"][0u]["priority"] = 2;
capa["methods"][0u]["nobframes"] = 1;