Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for forwarding groups in AudioBridge #2653

Merged
merged 10 commits into from
Jul 29, 2021
2 changes: 2 additions & 0 deletions conf/janus.plugin.audiobridge.jcfg.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# record_dir = "/path/to/" (path to save the recording to, makes record_file a relative path if provided)
# allow_rtp_participants = true|false (whether participants should be allowed to join
# via plain RTP as well, rather than just WebRTC, default=false)
# groups = optional, non-hierarchical, array of groups to tag participants, for external forwarding purposes only
#
# The following lines are only needed if you want the mixed audio
# to be automatically forwarded via plain RTP to an external component
Expand All @@ -28,6 +29,7 @@
# rtp_forward_ssrc = SSRC to use to use when streaming (optional: stream_id used if missing)
# rtp_forward_codec = opus (default), pcma (A-Law) or pcmu (mu-Law)
# rtp_forward_ptype = payload type to use when streaming (optional: only read for Opus, 100 used if missing)
# rtp_forward_group = group of participants to forward, if enabled in the room (optional: forwards full mix if missing)
# rtp_forward_srtp_suite = length of authentication tag (32 or 80)
# rtp_forward_srtp_crypto = "<key to use as crypto (base64 encoded key as in SDES)>"
# rtp_forward_always_on = true|false, whether silence should be forwarded when the room is empty (optional: false used if missing)
Expand Down
9 changes: 8 additions & 1 deletion html/audiobridgetest.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ if(getQueryStringValue("room") !== "")
var stereo = false;
if(getQueryStringValue("stereo") !== "")
stereo = (getQueryStringValue("stereo") === "true");
var mygroup = null; // Forwarding group, if required by the room
if(getQueryStringValue("group") !== "")
mygroup = getQueryStringValue("group");
var myusername = null;
var myid = null;
var webrtcUp = false;
Expand Down Expand Up @@ -426,7 +429,11 @@ function registerUsername() {
}
var register = { request: "join", room: myroom, display: username };
myusername = username;
mixertest.send({ message: register});
// If the room uses forwarding groups, this is how we state ours
if(mygroup)
register["group"] = mygroup;
// Send the message
mixertest.send({ message: register });
}
}

Expand Down
Loading