@huddle01/web-core
Version:
The Huddle01 Javascript SDK offers a comprehensive suite of methods and event listeners that allow for seamless real-time audio and video communication with minimal coding required.
53 lines (51 loc) • 1.48 kB
JavaScript
// src/constants/rtpConstants.ts
var VIDEO_CONSTRAINTS = {
qvga: { width: { ideal: 320 }, height: { ideal: 240 } },
vga: { width: { ideal: 640 }, height: { ideal: 480 } },
hd: { width: { ideal: 1280 }, height: { ideal: 720 } },
fHd: { width: { ideal: 1920 }, height: { ideal: 1080 } },
qHd: { width: { ideal: 4096 }, height: { ideal: 2160 } }
};
var PC_PROPRIETARY_CONSTRAINTS = {
optional: [{ googDscp: true }]
};
var WEBCAM_SIMULCAST_ENCODINGS = [
{
scaleResolutionDownBy: 4,
maxBitrate: 3e5,
// 300kbps
rid: "r0",
scalabilityMode: "S1T3",
maxFramerate: 15
},
{
scaleResolutionDownBy: 2,
maxBitrate: 6e5,
// 600kbps
rid: "r1",
scalabilityMode: "S1T3",
maxFramerate: 30
},
{
scaleResolutionDownBy: 1,
maxBitrate: 9e6,
// 900kbps
rid: "r2",
scalabilityMode: "S1T3",
maxFramerate: 30
}
];
var SCREEN_SHARING_SVC_ENCODINGS = [
{ scalabilityMode: "S3T3", dtx: true }
];
var encodingViaMediaType = {
video: WEBCAM_SIMULCAST_ENCODINGS,
"screen-share-video": void 0,
audio: [{ maxBitrate: 128e3 }]
};
var codecOptionsViaKind = {
audio: { opusStereo: true, opusFec: true, opusDtx: true },
video: { videoGoogleStartBitrate: 1e3 }
};
var WEBCAM_KSVC_ENCODINGS = [{ scalabilityMode: "S3T3_KEY" }];
export { PC_PROPRIETARY_CONSTRAINTS, SCREEN_SHARING_SVC_ENCODINGS, VIDEO_CONSTRAINTS, WEBCAM_KSVC_ENCODINGS, WEBCAM_SIMULCAST_ENCODINGS, codecOptionsViaKind, encodingViaMediaType };