Add firefox specific workaround for Janus streaming

This commit is contained in:
Jonathan Bennett 2022-01-21 23:21:41 -06:00
parent 52e48c02b6
commit 2e9bda1af1
2 changed files with 6 additions and 0 deletions

View File

@ -521,6 +521,9 @@ async function attachVideo(id) {
if (jsep !== undefined && jsep !== null) { if (jsep !== undefined && jsep !== null) {
Janus.debug("Handling SDP as well..."); Janus.debug("Handling SDP as well...");
Janus.debug(jsep); 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");
}
// Offer from the plugin, let's answer // Offer from the plugin, let's answer
streaming[id].createAnswer({ streaming[id].createAnswer({
jsep: jsep, jsep: jsep,

View File

@ -91,6 +91,9 @@ function initCycle() {
if (jsep !== undefined && jsep !== null) { if (jsep !== undefined && jsep !== null) {
Janus.debug("Handling SDP as well..."); Janus.debug("Handling SDP as well...");
Janus.debug(jsep); 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");
}
// Offer from the plugin, let's answer // Offer from the plugin, let's answer
streaming2.createAnswer({ streaming2.createAnswer({
jsep: jsep, jsep: jsep,