Skip to content

Commit

Permalink
videoroom: add "threads" parameter to create API
Browse files Browse the repository at this point in the history
  • Loading branch information
atoppi committed Nov 22, 2024
1 parent 4792d5b commit 4b75b33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/videoroom-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,12 @@ class VideoRoomHandle extends Handle {
* @param {boolean} [params.videoorient] - Whether the video-orientation RTP extension must be negotiated
* @param {string} [params.h264_profile] - H264 specific profile to prefer
* @param {string} [params.vp9_profile] - VP9 specific profile to prefer
* @param {number} [params.threads] - Number of threads to assist with the relaying of publishers in the room
* @returns {Promise<module:videoroom-plugin~VIDEOROOM_EVENT_CREATED>}
*/
async create({ room, description, max_publishers, permanent, is_private, secret, pin, admin_key, bitrate,
bitrate_cap, fir_freq, audiocodec, videocodec, talking_events, talking_level_threshold, talking_packets_threshold,
require_pvtid, require_e2ee, record, rec_dir, videoorient, h264_profile, vp9_profile }) {
require_pvtid, require_e2ee, record, rec_dir, videoorient, h264_profile, vp9_profile, threads }) {
const body = {
request: REQUEST_CREATE,
};
Expand All @@ -1288,6 +1289,7 @@ class VideoRoomHandle extends Handle {
if (typeof videoorient === 'boolean') body.videoorient_ext = videoorient;
if (typeof h264_profile === 'string') body.h264_profile = h264_profile;
if (typeof vp9_profile === 'string') body.vp9_profile = vp9_profile;
if (typeof threads === 'number') body.threads = threads;

const response = await this.message(body);
const { event, data: evtdata } = response._janode || {};
Expand Down

0 comments on commit 4b75b33

Please sign in to comment.