Skip to content

Commit

Permalink
add host_family to startForward (#29)
Browse files Browse the repository at this point in the history
add host_family to startForward
  • Loading branch information
augustblack authored Sep 4, 2023
1 parent 7dda199 commit 62d5b22
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugins/audiobridge-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ class AudioBridgeHandle extends Handle {
* @param {number|string} params.room - The involved room
* @param {boolean} [params.always] - Whether silence should be forwarded when the room is empty
* @param {string} params.host - The host to forward to
* @param {string} [params.host_family] - ipv4|ipv6; by default, first family returned by DNS request
* @param {number} params.audio_port - The port to forward to
* @param {number} [params.ssrc] - The SSRC to use to use when forwarding
* @param {number} [params.ptype] - The payload type to use to use when forwarding
Expand All @@ -732,13 +733,14 @@ class AudioBridgeHandle extends Handle {
* @param {string} [params.secret] - The optional secret needed to manage the room
* @returns {Promise<module:audiobridge-plugin~AUDIOBRIDGE_EVENT_RTP_FWD>}
*/
async startForward({ room, always, host, audio_port, ssrc, ptype, codec, group, secret }) {
async startForward({ room, always, host, host_family, audio_port, ssrc, ptype, codec, group, secret }) {
const body = {
request: REQUEST_RTP_FWD_START,
room,
};
if (typeof always === 'boolean') body.always_on = always;
if (typeof host === 'string') body.host = host;
if (typeof host_family === 'string') body.host_family = host_family;
if (typeof audio_port === 'number') body.port = audio_port;
if (typeof ssrc === 'number') body.ssrc = ssrc;
if (typeof ptype === 'number') body.ptype = ptype;
Expand Down Expand Up @@ -1149,4 +1151,4 @@ export default {
*/
AUDIOBRIDGE_ERROR: PLUGIN_EVENT.ERROR,
},
};
};

0 comments on commit 62d5b22

Please sign in to comment.