From 1749afc8e262793a6c12e98fb3f710ec887c92bc Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 28 Feb 2022 14:17:19 -0600 Subject: [PATCH] Add additional Firefox streaming workaround --- web/js/MonitorStream.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index cd520034d..27c180998 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -536,8 +536,12 @@ async function attachVideo(id) { if (jsep !== undefined && jsep !== null) { Janus.debug("Handling SDP as well..."); Janus.debug(jsep); - if ((navigator.userAgent.toLowerCase().indexOf('firefox') > -1) && (jsep["sdp"].includes("420029"))) { //because firefox devs are stubborn - jsep["sdp"] = jsep["sdp"].replace("420029", "42e01f"); + if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { + if (jsep["sdp"].includes("420029")) { + jsep["sdp"] = jsep["sdp"].replace("420029", "42e01f"); + } else if (jsep["sdp"].includes("4d002a")) { + jsep["sdp"] = jsep["sdp"].replace("4d002a", "4de02a"); + } } // Offer from the plugin, let's answer streaming[id].createAnswer({