From e7d802836adfe3701e92e07e0a91bd91e0fe17cd Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 13 Oct 2020 23:26:31 +0200 Subject: [PATCH] Fixed protocol display for websocket-based outputs in JSON streaminfo --- src/output/output_http_internal.cpp | 6 ++++-- src/output/output_webrtc.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/output/output_http_internal.cpp b/src/output/output_http_internal.cpp index fa6a4aec..8216a499 100644 --- a/src/output/output_http_internal.cpp +++ b/src/output/output_http_internal.cpp @@ -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); } diff --git a/src/output/output_webrtc.cpp b/src/output/output_webrtc.cpp index 35a337f5..3f59684d 100644 --- a/src/output/output_webrtc.cpp +++ b/src/output/output_webrtc.cpp @@ -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;