Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/plugins/streaming-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,17 +566,19 @@ class StreamingHandle extends Handle {
* @param {string} [params.video.rtpmap] - rtpmap that will be used
* @param {boolean} [params.video.skew] - Set skew compensation
* @param {string} [params.video.fmtp] - fmtp that will be used
* @param {boolean} [params.video.buffer] - Enable buffering of the keyframes
* @param {boolean} [params.video.buffer] - Enable buffering of the keyframes (deprecated, see bufferkf_ms and bufferkf_bytes)
* @param {Object} [params.data] - The datachannel descriptor for the mp
* @param {number} [params.data.port] - Port used for datachannels packets
* @param {boolean} [params.data.buffer] - Enable buffering of the datachannels
* @param {object[]} [params.media] - [multistream] The media object, each media includes type, mid, port, pt ...
* @param {number} [params.bufferkf_ms] - Enable buffering of the video keyframes (milliseconds)
* @param {number} [params.bufferkf_bytes] - Enable buffering of the video keyframes (bytes)
* @param {number} [params.threads] - The number of helper threads used in this mp
* @param {Object} [params.metadata] - An opaque metadata to add to the mp
* @param {number} [params.collision] - The stream collision discarding time in number of milliseconds (0=disabled)
* @returns {Promise<module:streaming-plugin~STREAMING_EVENT_CREATED>}
*/
async createRtpMountpoint({ id = 0, name, description, secret, pin, admin_key, permanent = false, is_private = false, e2ee = false, audio, video, data, media, threads, metadata, collision }) {
async createRtpMountpoint({ id = 0, name, description, secret, pin, admin_key, permanent = false, is_private = false, e2ee = false, audio, video, data, media, bufferkf_ms, bufferkf_bytes, threads, metadata, collision }) {
const body = {
request: REQUEST_CREATE,
type: 'rtp',
Expand Down Expand Up @@ -630,6 +632,8 @@ class StreamingHandle extends Handle {
if (typeof data.buffer === 'boolean') body.databuffermsg = data.buffer;
}
}
if (typeof bufferkf_ms === 'number') body.bufferkf_ms = bufferkf_ms;
if (typeof bufferkf_bytes === 'number') body.bufferkf_bytes = bufferkf_bytes;
if (typeof threads === 'number' && threads > 0) body.threads = threads;
if (metadata) body.metadata = metadata;
if (typeof collision === 'number') body.collision = collision;
Expand Down