@whereby.com/media 1.27.0 → 1.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +111 -110
- package/dist/index.d.cts +97 -6
- package/dist/index.d.mts +97 -6
- package/dist/index.d.ts +97 -6
- package/dist/index.mjs +100 -110
- package/dist/legacy-esm.js +100 -110
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1674,31 +1674,6 @@ class RtcStream {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
}
|
|
1676
1676
|
|
|
1677
|
-
const lowPixelCount = 320 * 180;
|
|
1678
|
-
const lowBitratePerPixel = 150000 / lowPixelCount;
|
|
1679
|
-
const highPixelCount = 1280 * 720;
|
|
1680
|
-
const highBitratePerPixel = 1000000 / highPixelCount;
|
|
1681
|
-
const bitrateChangePerPixel = (highBitratePerPixel - lowBitratePerPixel) / (highPixelCount - lowPixelCount);
|
|
1682
|
-
function getOptimalBitrate(width, height, frameRate) {
|
|
1683
|
-
let targetPixelCount = width * height;
|
|
1684
|
-
if (targetPixelCount < lowPixelCount)
|
|
1685
|
-
targetPixelCount = lowPixelCount;
|
|
1686
|
-
if (targetPixelCount > highPixelCount)
|
|
1687
|
-
targetPixelCount = highPixelCount;
|
|
1688
|
-
let targetBitratePerPixel = lowBitratePerPixel;
|
|
1689
|
-
if (targetPixelCount > highPixelCount)
|
|
1690
|
-
targetBitratePerPixel = highBitratePerPixel;
|
|
1691
|
-
else if (targetPixelCount > lowPixelCount) {
|
|
1692
|
-
targetBitratePerPixel += (targetPixelCount - lowPixelCount) * bitrateChangePerPixel;
|
|
1693
|
-
}
|
|
1694
|
-
let targetBitrate = width * height * targetBitratePerPixel;
|
|
1695
|
-
if (frameRate <= 15)
|
|
1696
|
-
targetBitrate = targetBitrate * 0.7;
|
|
1697
|
-
else if (frameRate <= 24)
|
|
1698
|
-
targetBitrate = targetBitrate * 0.9;
|
|
1699
|
-
return targetBitrate;
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
1677
|
const word = "[a-fA-F\\d:]";
|
|
1703
1678
|
const boundry = (options) => options && options.includeBoundaries ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : "";
|
|
1704
1679
|
const v4 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}";
|
|
@@ -2553,25 +2528,29 @@ const VIDEO_SETTINGS_VP9 = {
|
|
|
2553
2528
|
codecOptions: {
|
|
2554
2529
|
videoGoogleStartBitrate: 500,
|
|
2555
2530
|
},
|
|
2556
|
-
encodings: [{ scalabilityMode: "
|
|
2531
|
+
encodings: [{ scalabilityMode: "L3T2", maxBitrate: 1000000 }],
|
|
2532
|
+
};
|
|
2533
|
+
const VIDEO_SETTINGS_VP9_KEY = {
|
|
2534
|
+
codecOptions: {
|
|
2535
|
+
videoGoogleStartBitrate: 500,
|
|
2536
|
+
},
|
|
2537
|
+
encodings: [{ scalabilityMode: "L3T2_KEY", maxBitrate: 1250000 }],
|
|
2557
2538
|
};
|
|
2558
2539
|
const VIDEO_SETTINGS_VP9_LOW_BANDWIDTH = {
|
|
2559
2540
|
codecOptions: {
|
|
2560
2541
|
videoGoogleStartBitrate: 500,
|
|
2561
2542
|
},
|
|
2562
|
-
encodings: [{ scalabilityMode: "
|
|
2543
|
+
encodings: [{ scalabilityMode: "L2T2", maxBitrate: 500000 }],
|
|
2544
|
+
};
|
|
2545
|
+
const VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY = {
|
|
2546
|
+
codecOptions: {
|
|
2547
|
+
videoGoogleStartBitrate: 500,
|
|
2548
|
+
},
|
|
2549
|
+
encodings: [{ scalabilityMode: "L2T2_KEY", maxBitrate: 650000 }],
|
|
2563
2550
|
};
|
|
2564
2551
|
const SCREEN_SHARE_SETTINGS = {
|
|
2565
2552
|
encodings: [{}],
|
|
2566
2553
|
};
|
|
2567
|
-
const SCREEN_SHARE_SETTINGS_LOW_BANDWIDTH = {
|
|
2568
|
-
encodings: [
|
|
2569
|
-
{
|
|
2570
|
-
maxBitrate: 600000,
|
|
2571
|
-
maxFramerate: 2,
|
|
2572
|
-
},
|
|
2573
|
-
],
|
|
2574
|
-
};
|
|
2575
2554
|
const SCREEN_SHARE_SIMULCAST_SETTINGS = {
|
|
2576
2555
|
encodings: [
|
|
2577
2556
|
{ scaleResolutionDownBy: 2, dtx: true, maxBitrate: 500000 },
|
|
@@ -2592,54 +2571,95 @@ const SCREEN_SHARE_SETTINGS_VP9 = {
|
|
|
2592
2571
|
encodings: [{ dtx: true }],
|
|
2593
2572
|
};
|
|
2594
2573
|
const getMediaSettings = (kind, isScreenShare, features, isSomeoneAlreadyPresenting = false) => {
|
|
2595
|
-
const { lowDataModeEnabled, simulcastScreenshareOn,
|
|
2574
|
+
const { lowDataModeEnabled, simulcastScreenshareOn, vp9On, svcKeyScalabilityModeOn } = features;
|
|
2596
2575
|
if (kind === "audio") {
|
|
2597
2576
|
return AUDIO_SETTINGS;
|
|
2598
2577
|
}
|
|
2578
|
+
const isChrome = adapterRaw.browserDetails.browser === "chrome";
|
|
2579
|
+
const isVp9Available = isChrome && vp9On;
|
|
2599
2580
|
if (isScreenShare) {
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
}
|
|
2605
|
-
if (lowBandwidth && !vp9On)
|
|
2606
|
-
return SCREEN_SHARE_SETTINGS_LOW_BANDWIDTH;
|
|
2607
|
-
if (vp9On)
|
|
2608
|
-
return SCREEN_SHARE_SETTINGS_VP9;
|
|
2609
|
-
if (simulcastScreenshareOn)
|
|
2610
|
-
return SCREEN_SHARE_SIMULCAST_SETTINGS;
|
|
2611
|
-
return SCREEN_SHARE_SETTINGS;
|
|
2581
|
+
return getScreenShareMediaSettings({
|
|
2582
|
+
isVp9Available,
|
|
2583
|
+
isSomeoneAlreadyPresenting,
|
|
2584
|
+
simulcastScreenshareOn,
|
|
2585
|
+
});
|
|
2612
2586
|
}
|
|
2613
2587
|
else {
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2588
|
+
return getCameraMediaSettings({
|
|
2589
|
+
lowBandwidth: lowDataModeEnabled,
|
|
2590
|
+
isVp9Available,
|
|
2591
|
+
svcKeyScalabilityModeOn,
|
|
2592
|
+
});
|
|
2593
|
+
}
|
|
2594
|
+
};
|
|
2595
|
+
const getCameraMediaSettings = ({ lowBandwidth, isVp9Available, svcKeyScalabilityModeOn, }) => {
|
|
2596
|
+
if (lowBandwidth) {
|
|
2597
|
+
if (isVp9Available) {
|
|
2598
|
+
if (svcKeyScalabilityModeOn)
|
|
2599
|
+
return VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY;
|
|
2600
|
+
return VIDEO_SETTINGS_VP9_LOW_BANDWIDTH;
|
|
2618
2601
|
}
|
|
2619
|
-
|
|
2620
|
-
return VIDEO_SETTINGS_VP9;
|
|
2621
|
-
if (lowDataModeEnabled)
|
|
2622
|
-
return VIDEO_SETTINGS_SD;
|
|
2623
|
-
return VIDEO_SETTINGS_HD;
|
|
2602
|
+
return VIDEO_SETTINGS_SD;
|
|
2624
2603
|
}
|
|
2604
|
+
if (isVp9Available) {
|
|
2605
|
+
if (svcKeyScalabilityModeOn)
|
|
2606
|
+
return VIDEO_SETTINGS_VP9_KEY;
|
|
2607
|
+
return VIDEO_SETTINGS_VP9;
|
|
2608
|
+
}
|
|
2609
|
+
return VIDEO_SETTINGS_HD;
|
|
2610
|
+
};
|
|
2611
|
+
const getScreenShareMediaSettings = ({ isVp9Available, isSomeoneAlreadyPresenting, simulcastScreenshareOn, }) => {
|
|
2612
|
+
if (isSomeoneAlreadyPresenting) {
|
|
2613
|
+
if (isVp9Available)
|
|
2614
|
+
return ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9;
|
|
2615
|
+
return ADDITIONAL_SCREEN_SHARE_SETTINGS;
|
|
2616
|
+
}
|
|
2617
|
+
if (isVp9Available)
|
|
2618
|
+
return SCREEN_SHARE_SETTINGS_VP9;
|
|
2619
|
+
if (simulcastScreenshareOn)
|
|
2620
|
+
return SCREEN_SHARE_SIMULCAST_SETTINGS;
|
|
2621
|
+
return SCREEN_SHARE_SETTINGS;
|
|
2625
2622
|
};
|
|
2623
|
+
var PrioritizableCodec;
|
|
2624
|
+
(function (PrioritizableCodec) {
|
|
2625
|
+
PrioritizableCodec["H264"] = "video/h264";
|
|
2626
|
+
PrioritizableCodec["VP9"] = "video/vp9";
|
|
2627
|
+
})(PrioritizableCodec || (PrioritizableCodec = {}));
|
|
2626
2628
|
const modifyMediaCapabilities = (routerRtpCapabilities, features) => {
|
|
2627
2629
|
const { vp9On, h264On } = features;
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2630
|
+
const isChrome = adapterRaw.browserDetails.browser === "chrome";
|
|
2631
|
+
if (!(routerRtpCapabilities === null || routerRtpCapabilities === void 0 ? void 0 : routerRtpCapabilities.codecs)) {
|
|
2632
|
+
return routerRtpCapabilities;
|
|
2633
|
+
}
|
|
2634
|
+
if (vp9On && isChrome) {
|
|
2635
|
+
const sorted = prioritizeRouterRtpCapabilitiesCodecs(routerRtpCapabilities.codecs, PrioritizableCodec.VP9);
|
|
2636
|
+
return Object.assign(Object.assign({}, routerRtpCapabilities), { codecs: sorted });
|
|
2634
2637
|
}
|
|
2635
2638
|
else if (h264On) {
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2638
|
-
routerRtpCapabilities.codecs = routerRtpCapabilities.codecs.filter((codec) => codec.kind === "audio" ||
|
|
2639
|
-
codec.preferredPayloadType === preferredPayloadType ||
|
|
2640
|
-
codec.preferredPayloadType === aptPreferredPayloadType);
|
|
2639
|
+
const sorted = prioritizeRouterRtpCapabilitiesCodecs(routerRtpCapabilities.codecs, PrioritizableCodec.H264);
|
|
2640
|
+
return Object.assign(Object.assign({}, routerRtpCapabilities), { codecs: sorted });
|
|
2641
2641
|
}
|
|
2642
|
+
return routerRtpCapabilities;
|
|
2642
2643
|
};
|
|
2644
|
+
function prioritizeRouterRtpCapabilitiesCodecs(codecs, preferredCodec) {
|
|
2645
|
+
const preferredCodecEntry = codecs.find(({ mimeType }) => mimeType.toLowerCase() === preferredCodec);
|
|
2646
|
+
if (!preferredCodecEntry) {
|
|
2647
|
+
return codecs;
|
|
2648
|
+
}
|
|
2649
|
+
return [...codecs].sort((left, right) => {
|
|
2650
|
+
if (left.mimeType.toLowerCase() === preferredCodec) {
|
|
2651
|
+
return -1;
|
|
2652
|
+
}
|
|
2653
|
+
if (left.mimeType.toLowerCase() === "video/rtx" &&
|
|
2654
|
+
left.parameters.apt === preferredCodecEntry.preferredPayloadType) {
|
|
2655
|
+
if (right.mimeType.toLowerCase() === preferredCodec) {
|
|
2656
|
+
return 1;
|
|
2657
|
+
}
|
|
2658
|
+
return -1;
|
|
2659
|
+
}
|
|
2660
|
+
return 0;
|
|
2661
|
+
});
|
|
2662
|
+
}
|
|
2643
2663
|
function getPreferredOrder(availableCodecs, { vp9On, av1On }) {
|
|
2644
2664
|
if (vp9On) {
|
|
2645
2665
|
availableCodecs.unshift("video/vp9");
|
|
@@ -3953,12 +3973,12 @@ class P2pRtcManager {
|
|
|
3953
3973
|
if (numPeers > 7) {
|
|
3954
3974
|
numPeers = 7;
|
|
3955
3975
|
}
|
|
3956
|
-
|
|
3976
|
+
const bandwidth = this._features.bandwidth
|
|
3957
3977
|
? parseInt(this._features.bandwidth, 10)
|
|
3958
3978
|
: {
|
|
3959
|
-
1:
|
|
3960
|
-
2:
|
|
3961
|
-
3:
|
|
3979
|
+
1: 0,
|
|
3980
|
+
2: 384,
|
|
3981
|
+
3: 256,
|
|
3962
3982
|
4: 192,
|
|
3963
3983
|
5: 128,
|
|
3964
3984
|
6: 128,
|
|
@@ -3967,22 +3987,6 @@ class P2pRtcManager {
|
|
|
3967
3987
|
if (bandwidth === undefined) {
|
|
3968
3988
|
return 0;
|
|
3969
3989
|
}
|
|
3970
|
-
if (this._features.adjustBitratesFromResolution) {
|
|
3971
|
-
const cameraStream = this._getLocalCameraStream();
|
|
3972
|
-
if (cameraStream) {
|
|
3973
|
-
const cameraTrack = cameraStream && cameraStream.getVideoTracks()[0];
|
|
3974
|
-
if (cameraTrack) {
|
|
3975
|
-
const { width, height, frameRate } = cameraTrack.getSettings();
|
|
3976
|
-
if (width && height && frameRate) {
|
|
3977
|
-
const optimalBandwidth = Math.round(getOptimalBitrate(width, height, frameRate) / 1000);
|
|
3978
|
-
bandwidth = Math.min(optimalBandwidth, bandwidth || optimalBandwidth);
|
|
3979
|
-
}
|
|
3980
|
-
}
|
|
3981
|
-
}
|
|
3982
|
-
}
|
|
3983
|
-
if (this._features.higherP2PBitrates && !this._features.lowBandwidth) {
|
|
3984
|
-
bandwidth = bandwidth * 1.5;
|
|
3985
|
-
}
|
|
3986
3990
|
this._forEachPeerConnection((session) => {
|
|
3987
3991
|
session.changeBandwidth(bandwidth);
|
|
3988
3992
|
});
|
|
@@ -5245,9 +5249,9 @@ class VegaRtcManager {
|
|
|
5245
5249
|
try {
|
|
5246
5250
|
const { routerRtpCapabilities } = yield this._vegaConnection.request("getCapabilities");
|
|
5247
5251
|
if (!this._routerRtpCapabilities) {
|
|
5248
|
-
modifyMediaCapabilities(routerRtpCapabilities, Object.assign(Object.assign({}, this._features), { vp9On: this._features.sfuVp9On }));
|
|
5249
|
-
this._routerRtpCapabilities =
|
|
5250
|
-
yield ((_a = this._mediasoupDevice) === null || _a === void 0 ? void 0 : _a.load({ routerRtpCapabilities }));
|
|
5252
|
+
const modifiedCapabilities = modifyMediaCapabilities(routerRtpCapabilities, Object.assign(Object.assign({}, this._features), { vp9On: this._features.sfuVp9On }));
|
|
5253
|
+
this._routerRtpCapabilities = modifiedCapabilities;
|
|
5254
|
+
yield ((_a = this._mediasoupDevice) === null || _a === void 0 ? void 0 : _a.load({ routerRtpCapabilities: modifiedCapabilities }));
|
|
5251
5255
|
}
|
|
5252
5256
|
this._vegaConnection.message("setCapabilities", {
|
|
5253
5257
|
rtpCapabilities: (_b = this._mediasoupDevice) === null || _b === void 0 ? void 0 : _b.rtpCapabilities,
|
|
@@ -5601,7 +5605,7 @@ class VegaRtcManager {
|
|
|
5601
5605
|
return;
|
|
5602
5606
|
}
|
|
5603
5607
|
this._webcamProducerPromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
5604
|
-
var _b
|
|
5608
|
+
var _b;
|
|
5605
5609
|
try {
|
|
5606
5610
|
const currentPaused = this._webcamPaused;
|
|
5607
5611
|
const producer = yield this._sendTransport.produce(Object.assign(Object.assign({ track: this._webcamTrack, disableTrackOnPause: false, stopTracks: false }, getMediaSettings("video", false, Object.assign(Object.assign({}, this._features), { vp9On: this._features.sfuVp9On }))), { appData: {
|
|
@@ -5639,9 +5643,6 @@ class VegaRtcManager {
|
|
|
5639
5643
|
this._stopProducer(this._webcamProducer);
|
|
5640
5644
|
this._webcamProducer = null;
|
|
5641
5645
|
}
|
|
5642
|
-
if (this._features.lowBandwidth && this._screenVideoTrack) {
|
|
5643
|
-
(_c = this._webcamProducer) === null || _c === void 0 ? void 0 : _c.setMaxSpatialLayer(0);
|
|
5644
|
-
}
|
|
5645
5646
|
}
|
|
5646
5647
|
}))();
|
|
5647
5648
|
});
|
|
@@ -5700,7 +5701,6 @@ class VegaRtcManager {
|
|
|
5700
5701
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5701
5702
|
logger$3.info("_internalSendScreenVideo()");
|
|
5702
5703
|
this._screenVideoProducerPromise = (() => __awaiter(this, void 0, void 0, function* () {
|
|
5703
|
-
var _a, _b;
|
|
5704
5704
|
try {
|
|
5705
5705
|
if (!this._screenVideoTrack || !this._sendTransport || this._screenVideoProducer) {
|
|
5706
5706
|
this._screenVideoProducerPromise = null;
|
|
@@ -5726,9 +5726,6 @@ class VegaRtcManager {
|
|
|
5726
5726
|
});
|
|
5727
5727
|
if (this._screenVideoTrack !== this._screenVideoProducer.track)
|
|
5728
5728
|
yield this._replaceScreenVideoTrack();
|
|
5729
|
-
if (this._features.lowBandwidth) {
|
|
5730
|
-
(_a = this._webcamProducer) === null || _a === void 0 ? void 0 : _a.setMaxSpatialLayer(0);
|
|
5731
|
-
}
|
|
5732
5729
|
}
|
|
5733
5730
|
catch (error) {
|
|
5734
5731
|
logger$3.error("screenVideoProducer failed:%o", error);
|
|
@@ -5738,9 +5735,6 @@ class VegaRtcManager {
|
|
|
5738
5735
|
if (!this._screenVideoTrack) {
|
|
5739
5736
|
yield this._stopProducer(this._screenVideoProducer);
|
|
5740
5737
|
this._screenVideoProducer = null;
|
|
5741
|
-
if (this._features.lowBandwidth) {
|
|
5742
|
-
(_b = this._webcamProducer) === null || _b === void 0 ? void 0 : _b.setMaxSpatialLayer(Number.MAX_VALUE);
|
|
5743
|
-
}
|
|
5744
5738
|
}
|
|
5745
5739
|
}
|
|
5746
5740
|
}))();
|
|
@@ -5906,7 +5900,6 @@ class VegaRtcManager {
|
|
|
5906
5900
|
}
|
|
5907
5901
|
}
|
|
5908
5902
|
removeStream(streamId, _stream, requestedByClientId) {
|
|
5909
|
-
var _a;
|
|
5910
5903
|
logger$3.info("removeStream() [streamId:%s, requestedByClientId:%s]", streamId, requestedByClientId);
|
|
5911
5904
|
this._emitToSignal(PROTOCOL_REQUESTS.STOP_SCREENSHARE, {
|
|
5912
5905
|
streamId: OUTBOUND_SCREEN_OUTBOUND_STREAM_ID,
|
|
@@ -5918,9 +5911,6 @@ class VegaRtcManager {
|
|
|
5918
5911
|
this._stopProducer(this._screenAudioProducer);
|
|
5919
5912
|
this._screenAudioProducer = null;
|
|
5920
5913
|
this._screenAudioTrack = null;
|
|
5921
|
-
if (this._features.lowBandwidth) {
|
|
5922
|
-
(_a = this._webcamProducer) === null || _a === void 0 ? void 0 : _a.setMaxSpatialLayer(Number.MAX_VALUE);
|
|
5923
|
-
}
|
|
5924
5914
|
}
|
|
5925
5915
|
_onMicAnalyserScoreUpdated(data) {
|
|
5926
5916
|
var _a, _b;
|
|
@@ -7360,9 +7350,9 @@ class BandwidthTester extends EventEmitter {
|
|
|
7360
7350
|
try {
|
|
7361
7351
|
const { routerRtpCapabilities } = yield this._vegaConnection.request("getCapabilities");
|
|
7362
7352
|
if (!this._routerRtpCapabilities) {
|
|
7363
|
-
modifyMediaCapabilities(routerRtpCapabilities, this._features);
|
|
7364
|
-
this._routerRtpCapabilities =
|
|
7365
|
-
yield ((_a = this._mediasoupDevice) === null || _a === void 0 ? void 0 : _a.load({ routerRtpCapabilities }));
|
|
7353
|
+
const modifiedCapabilities = modifyMediaCapabilities(routerRtpCapabilities, Object.assign(Object.assign({}, this._features), { vp9On: this._features.sfuVp9On }));
|
|
7354
|
+
this._routerRtpCapabilities = modifiedCapabilities;
|
|
7355
|
+
yield ((_a = this._mediasoupDevice) === null || _a === void 0 ? void 0 : _a.load({ routerRtpCapabilities: modifiedCapabilities }));
|
|
7366
7356
|
}
|
|
7367
7357
|
this._vegaConnection.message("setCapabilities", {
|
|
7368
7358
|
rtpCapabilities: (_b = this._mediasoupDevice) === null || _b === void 0 ? void 0 : _b.rtpCapabilities,
|
|
@@ -8023,6 +8013,9 @@ exports.RtcEventNames = void 0;
|
|
|
8023
8013
|
RtcEventNames["stream_added"] = "stream_added";
|
|
8024
8014
|
})(exports.RtcEventNames || (exports.RtcEventNames = {}));
|
|
8025
8015
|
|
|
8016
|
+
exports.ADDITIONAL_SCREEN_SHARE_SETTINGS = ADDITIONAL_SCREEN_SHARE_SETTINGS;
|
|
8017
|
+
exports.ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9 = ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9;
|
|
8018
|
+
exports.AUDIO_SETTINGS = AUDIO_SETTINGS;
|
|
8026
8019
|
exports.BandwidthTester = BandwidthTester;
|
|
8027
8020
|
exports.EVENTS = EVENTS;
|
|
8028
8021
|
exports.KNOCK_MESSAGES = KNOCK_MESSAGES;
|
|
@@ -8041,11 +8034,20 @@ exports.RELAY_MESSAGES = RELAY_MESSAGES;
|
|
|
8041
8034
|
exports.ReconnectManager = ReconnectManager;
|
|
8042
8035
|
exports.RtcManagerDispatcher = RtcManagerDispatcher;
|
|
8043
8036
|
exports.RtcStream = RtcStream;
|
|
8037
|
+
exports.SCREEN_SHARE_SETTINGS = SCREEN_SHARE_SETTINGS;
|
|
8038
|
+
exports.SCREEN_SHARE_SETTINGS_VP9 = SCREEN_SHARE_SETTINGS_VP9;
|
|
8039
|
+
exports.SCREEN_SHARE_SIMULCAST_SETTINGS = SCREEN_SHARE_SIMULCAST_SETTINGS;
|
|
8044
8040
|
exports.STREAM_TYPES = STREAM_TYPES;
|
|
8045
8041
|
exports.ServerSocket = ServerSocket;
|
|
8046
8042
|
exports.Session = Session;
|
|
8047
8043
|
exports.SfuV2Parser = SfuV2Parser;
|
|
8048
8044
|
exports.TYPES = TYPES;
|
|
8045
|
+
exports.VIDEO_SETTINGS_HD = VIDEO_SETTINGS_HD;
|
|
8046
|
+
exports.VIDEO_SETTINGS_SD = VIDEO_SETTINGS_SD;
|
|
8047
|
+
exports.VIDEO_SETTINGS_VP9 = VIDEO_SETTINGS_VP9;
|
|
8048
|
+
exports.VIDEO_SETTINGS_VP9_KEY = VIDEO_SETTINGS_VP9_KEY;
|
|
8049
|
+
exports.VIDEO_SETTINGS_VP9_LOW_BANDWIDTH = VIDEO_SETTINGS_VP9_LOW_BANDWIDTH;
|
|
8050
|
+
exports.VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY = VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY;
|
|
8049
8051
|
exports.VegaConnection = VegaConnection;
|
|
8050
8052
|
exports.VegaMediaQualityMonitor = VegaMediaQualityMonitor;
|
|
8051
8053
|
exports.VegaRtcManager = VegaRtcManager;
|
|
@@ -8084,7 +8086,6 @@ exports.getMediasoupDevice = getMediasoupDevice;
|
|
|
8084
8086
|
exports.getNumFailedStatsReports = getNumFailedStatsReports;
|
|
8085
8087
|
exports.getNumFailedTrackSsrcLookups = getNumFailedTrackSsrcLookups;
|
|
8086
8088
|
exports.getNumMissingTrackSsrcLookups = getNumMissingTrackSsrcLookups;
|
|
8087
|
-
exports.getOptimalBitrate = getOptimalBitrate;
|
|
8088
8089
|
exports.getPeerConnectionIndex = getPeerConnectionIndex;
|
|
8089
8090
|
exports.getStats = getStats;
|
|
8090
8091
|
exports.getStream = getStream;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Device } from 'mediasoup-client';
|
|
2
2
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
3
|
+
import { RtpCapabilities } from 'mediasoup-client/lib/RtpParameters';
|
|
3
4
|
|
|
4
5
|
interface MetricData {
|
|
5
6
|
ticks: number;
|
|
@@ -596,18 +597,110 @@ declare const ipRegex: {
|
|
|
596
597
|
}): RegExp;
|
|
597
598
|
};
|
|
598
599
|
|
|
600
|
+
declare const AUDIO_SETTINGS: {
|
|
601
|
+
codecOptions: {
|
|
602
|
+
opusDtx: boolean;
|
|
603
|
+
opusFec: boolean;
|
|
604
|
+
};
|
|
605
|
+
encodings: {
|
|
606
|
+
dtx: boolean;
|
|
607
|
+
}[];
|
|
608
|
+
};
|
|
609
|
+
declare const VIDEO_SETTINGS_HD: {
|
|
610
|
+
codecOptions: {
|
|
611
|
+
videoGoogleStartBitrate: number;
|
|
612
|
+
};
|
|
613
|
+
encodings: {
|
|
614
|
+
scaleResolutionDownBy: number;
|
|
615
|
+
maxBitrate: number;
|
|
616
|
+
}[];
|
|
617
|
+
};
|
|
618
|
+
declare const VIDEO_SETTINGS_SD: {
|
|
619
|
+
codecOptions: {
|
|
620
|
+
videoGoogleStartBitrate: number;
|
|
621
|
+
};
|
|
622
|
+
encodings: {
|
|
623
|
+
scaleResolutionDownBy: number;
|
|
624
|
+
maxBitrate: number;
|
|
625
|
+
}[];
|
|
626
|
+
};
|
|
627
|
+
declare const VIDEO_SETTINGS_VP9: {
|
|
628
|
+
codecOptions: {
|
|
629
|
+
videoGoogleStartBitrate: number;
|
|
630
|
+
};
|
|
631
|
+
encodings: {
|
|
632
|
+
scalabilityMode: string;
|
|
633
|
+
maxBitrate: number;
|
|
634
|
+
}[];
|
|
635
|
+
};
|
|
636
|
+
declare const VIDEO_SETTINGS_VP9_KEY: {
|
|
637
|
+
codecOptions: {
|
|
638
|
+
videoGoogleStartBitrate: number;
|
|
639
|
+
};
|
|
640
|
+
encodings: {
|
|
641
|
+
scalabilityMode: string;
|
|
642
|
+
maxBitrate: number;
|
|
643
|
+
}[];
|
|
644
|
+
};
|
|
645
|
+
declare const VIDEO_SETTINGS_VP9_LOW_BANDWIDTH: {
|
|
646
|
+
codecOptions: {
|
|
647
|
+
videoGoogleStartBitrate: number;
|
|
648
|
+
};
|
|
649
|
+
encodings: {
|
|
650
|
+
scalabilityMode: string;
|
|
651
|
+
maxBitrate: number;
|
|
652
|
+
}[];
|
|
653
|
+
};
|
|
654
|
+
declare const VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY: {
|
|
655
|
+
codecOptions: {
|
|
656
|
+
videoGoogleStartBitrate: number;
|
|
657
|
+
};
|
|
658
|
+
encodings: {
|
|
659
|
+
scalabilityMode: string;
|
|
660
|
+
maxBitrate: number;
|
|
661
|
+
}[];
|
|
662
|
+
};
|
|
663
|
+
declare const SCREEN_SHARE_SETTINGS: {
|
|
664
|
+
encodings: {}[];
|
|
665
|
+
};
|
|
666
|
+
declare const SCREEN_SHARE_SIMULCAST_SETTINGS: {
|
|
667
|
+
encodings: {
|
|
668
|
+
scaleResolutionDownBy: number;
|
|
669
|
+
dtx: boolean;
|
|
670
|
+
maxBitrate: number;
|
|
671
|
+
}[];
|
|
672
|
+
};
|
|
673
|
+
declare const ADDITIONAL_SCREEN_SHARE_SETTINGS: {
|
|
674
|
+
encodings: {
|
|
675
|
+
scaleResolutionDownBy: number;
|
|
676
|
+
dtx: boolean;
|
|
677
|
+
maxBitrate: number;
|
|
678
|
+
}[];
|
|
679
|
+
};
|
|
680
|
+
declare const ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9: {
|
|
681
|
+
encodings: {
|
|
682
|
+
scalabilityMode: string;
|
|
683
|
+
dtx: boolean;
|
|
684
|
+
maxBitrate: number;
|
|
685
|
+
}[];
|
|
686
|
+
};
|
|
687
|
+
declare const SCREEN_SHARE_SETTINGS_VP9: {
|
|
688
|
+
encodings: {
|
|
689
|
+
dtx: boolean;
|
|
690
|
+
}[];
|
|
691
|
+
};
|
|
599
692
|
declare const getMediaSettings: (kind: string, isScreenShare: boolean, features: {
|
|
600
693
|
lowDataModeEnabled?: boolean;
|
|
601
694
|
simulcastScreenshareOn?: boolean;
|
|
602
|
-
lowBandwidth?: boolean;
|
|
603
695
|
vp9On?: boolean;
|
|
696
|
+
svcKeyScalabilityModeOn?: boolean;
|
|
604
697
|
}, isSomeoneAlreadyPresenting?: boolean) => {
|
|
605
698
|
encodings: {}[];
|
|
606
699
|
};
|
|
607
|
-
declare const modifyMediaCapabilities: (routerRtpCapabilities:
|
|
700
|
+
declare const modifyMediaCapabilities: (routerRtpCapabilities: RtpCapabilities, features: {
|
|
608
701
|
vp9On?: boolean;
|
|
609
702
|
h264On?: boolean;
|
|
610
|
-
}) =>
|
|
703
|
+
}) => RtpCapabilities;
|
|
611
704
|
interface Codec {
|
|
612
705
|
clockRate: number;
|
|
613
706
|
mimeType: string;
|
|
@@ -619,8 +712,6 @@ declare function sortCodecs(codecs: Codec[], features: {
|
|
|
619
712
|
preferHardwareDecodingOn?: boolean;
|
|
620
713
|
}): Promise<Codec[]>;
|
|
621
714
|
|
|
622
|
-
declare function getOptimalBitrate(width: number, height: number, frameRate: number): number;
|
|
623
|
-
|
|
624
715
|
declare class ReconnectManager extends EventEmitter {
|
|
625
716
|
_socket: any;
|
|
626
717
|
_clients: any;
|
|
@@ -1717,4 +1808,4 @@ declare class RtcStream {
|
|
|
1717
1808
|
static getTypeFromId(id: string): string;
|
|
1718
1809
|
}
|
|
1719
1810
|
|
|
1720
|
-
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutConfig, type BreakoutGroupJoinedEvent, type BreakoutSessionUpdatedEvent, type CannotJoinUnclaimedRoomError, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Codec, type Credentials, type CustomMediaStreamTrack, EVENTS, type ForbiddenError, type ForbiddenErrorNames, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type HostPresenceControlsError, type IdentifyDeviceRequest, type InternalServerError, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type MaxViewerLimitReachedError, type NewClientEvent, NoDevicesError, type OrganizationPlanExhaustedError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomConcurrencyControlsError, type RoomFullError, type RoomJoinedErrors, type RoomJoinedEvent, type RoomJoinedSuccess, type RoomKnockedEvent, type RoomLockedError, type RoomLockedEvent, type RoomMeetingTimeExhaustedError, type RoomMode, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, type StatsSubscription, TYPES, type TrackStats, type TurnTransportProtocol, type UpdatedDeviceInfo, type UpdatedDevicesInfo, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, type ViewStats, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups,
|
|
1811
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutConfig, type BreakoutGroupJoinedEvent, type BreakoutSessionUpdatedEvent, type CannotJoinUnclaimedRoomError, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Codec, type Credentials, type CustomMediaStreamTrack, EVENTS, type ForbiddenError, type ForbiddenErrorNames, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type HostPresenceControlsError, type IdentifyDeviceRequest, type InternalServerError, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type MaxViewerLimitReachedError, type NewClientEvent, NoDevicesError, type OrganizationPlanExhaustedError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomConcurrencyControlsError, type RoomFullError, type RoomJoinedErrors, type RoomJoinedEvent, type RoomJoinedSuccess, type RoomKnockedEvent, type RoomLockedError, type RoomLockedEvent, type RoomMeetingTimeExhaustedError, type RoomMode, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, type StatsSubscription, TYPES, type TrackStats, type TurnTransportProtocol, type UpdatedDeviceInfo, type UpdatedDevicesInfo, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, type ViewStats, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, type ssrcStats, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Device } from 'mediasoup-client';
|
|
2
2
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
3
|
+
import { RtpCapabilities } from 'mediasoup-client/lib/RtpParameters';
|
|
3
4
|
|
|
4
5
|
interface MetricData {
|
|
5
6
|
ticks: number;
|
|
@@ -596,18 +597,110 @@ declare const ipRegex: {
|
|
|
596
597
|
}): RegExp;
|
|
597
598
|
};
|
|
598
599
|
|
|
600
|
+
declare const AUDIO_SETTINGS: {
|
|
601
|
+
codecOptions: {
|
|
602
|
+
opusDtx: boolean;
|
|
603
|
+
opusFec: boolean;
|
|
604
|
+
};
|
|
605
|
+
encodings: {
|
|
606
|
+
dtx: boolean;
|
|
607
|
+
}[];
|
|
608
|
+
};
|
|
609
|
+
declare const VIDEO_SETTINGS_HD: {
|
|
610
|
+
codecOptions: {
|
|
611
|
+
videoGoogleStartBitrate: number;
|
|
612
|
+
};
|
|
613
|
+
encodings: {
|
|
614
|
+
scaleResolutionDownBy: number;
|
|
615
|
+
maxBitrate: number;
|
|
616
|
+
}[];
|
|
617
|
+
};
|
|
618
|
+
declare const VIDEO_SETTINGS_SD: {
|
|
619
|
+
codecOptions: {
|
|
620
|
+
videoGoogleStartBitrate: number;
|
|
621
|
+
};
|
|
622
|
+
encodings: {
|
|
623
|
+
scaleResolutionDownBy: number;
|
|
624
|
+
maxBitrate: number;
|
|
625
|
+
}[];
|
|
626
|
+
};
|
|
627
|
+
declare const VIDEO_SETTINGS_VP9: {
|
|
628
|
+
codecOptions: {
|
|
629
|
+
videoGoogleStartBitrate: number;
|
|
630
|
+
};
|
|
631
|
+
encodings: {
|
|
632
|
+
scalabilityMode: string;
|
|
633
|
+
maxBitrate: number;
|
|
634
|
+
}[];
|
|
635
|
+
};
|
|
636
|
+
declare const VIDEO_SETTINGS_VP9_KEY: {
|
|
637
|
+
codecOptions: {
|
|
638
|
+
videoGoogleStartBitrate: number;
|
|
639
|
+
};
|
|
640
|
+
encodings: {
|
|
641
|
+
scalabilityMode: string;
|
|
642
|
+
maxBitrate: number;
|
|
643
|
+
}[];
|
|
644
|
+
};
|
|
645
|
+
declare const VIDEO_SETTINGS_VP9_LOW_BANDWIDTH: {
|
|
646
|
+
codecOptions: {
|
|
647
|
+
videoGoogleStartBitrate: number;
|
|
648
|
+
};
|
|
649
|
+
encodings: {
|
|
650
|
+
scalabilityMode: string;
|
|
651
|
+
maxBitrate: number;
|
|
652
|
+
}[];
|
|
653
|
+
};
|
|
654
|
+
declare const VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY: {
|
|
655
|
+
codecOptions: {
|
|
656
|
+
videoGoogleStartBitrate: number;
|
|
657
|
+
};
|
|
658
|
+
encodings: {
|
|
659
|
+
scalabilityMode: string;
|
|
660
|
+
maxBitrate: number;
|
|
661
|
+
}[];
|
|
662
|
+
};
|
|
663
|
+
declare const SCREEN_SHARE_SETTINGS: {
|
|
664
|
+
encodings: {}[];
|
|
665
|
+
};
|
|
666
|
+
declare const SCREEN_SHARE_SIMULCAST_SETTINGS: {
|
|
667
|
+
encodings: {
|
|
668
|
+
scaleResolutionDownBy: number;
|
|
669
|
+
dtx: boolean;
|
|
670
|
+
maxBitrate: number;
|
|
671
|
+
}[];
|
|
672
|
+
};
|
|
673
|
+
declare const ADDITIONAL_SCREEN_SHARE_SETTINGS: {
|
|
674
|
+
encodings: {
|
|
675
|
+
scaleResolutionDownBy: number;
|
|
676
|
+
dtx: boolean;
|
|
677
|
+
maxBitrate: number;
|
|
678
|
+
}[];
|
|
679
|
+
};
|
|
680
|
+
declare const ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9: {
|
|
681
|
+
encodings: {
|
|
682
|
+
scalabilityMode: string;
|
|
683
|
+
dtx: boolean;
|
|
684
|
+
maxBitrate: number;
|
|
685
|
+
}[];
|
|
686
|
+
};
|
|
687
|
+
declare const SCREEN_SHARE_SETTINGS_VP9: {
|
|
688
|
+
encodings: {
|
|
689
|
+
dtx: boolean;
|
|
690
|
+
}[];
|
|
691
|
+
};
|
|
599
692
|
declare const getMediaSettings: (kind: string, isScreenShare: boolean, features: {
|
|
600
693
|
lowDataModeEnabled?: boolean;
|
|
601
694
|
simulcastScreenshareOn?: boolean;
|
|
602
|
-
lowBandwidth?: boolean;
|
|
603
695
|
vp9On?: boolean;
|
|
696
|
+
svcKeyScalabilityModeOn?: boolean;
|
|
604
697
|
}, isSomeoneAlreadyPresenting?: boolean) => {
|
|
605
698
|
encodings: {}[];
|
|
606
699
|
};
|
|
607
|
-
declare const modifyMediaCapabilities: (routerRtpCapabilities:
|
|
700
|
+
declare const modifyMediaCapabilities: (routerRtpCapabilities: RtpCapabilities, features: {
|
|
608
701
|
vp9On?: boolean;
|
|
609
702
|
h264On?: boolean;
|
|
610
|
-
}) =>
|
|
703
|
+
}) => RtpCapabilities;
|
|
611
704
|
interface Codec {
|
|
612
705
|
clockRate: number;
|
|
613
706
|
mimeType: string;
|
|
@@ -619,8 +712,6 @@ declare function sortCodecs(codecs: Codec[], features: {
|
|
|
619
712
|
preferHardwareDecodingOn?: boolean;
|
|
620
713
|
}): Promise<Codec[]>;
|
|
621
714
|
|
|
622
|
-
declare function getOptimalBitrate(width: number, height: number, frameRate: number): number;
|
|
623
|
-
|
|
624
715
|
declare class ReconnectManager extends EventEmitter {
|
|
625
716
|
_socket: any;
|
|
626
717
|
_clients: any;
|
|
@@ -1717,4 +1808,4 @@ declare class RtcStream {
|
|
|
1717
1808
|
static getTypeFromId(id: string): string;
|
|
1718
1809
|
}
|
|
1719
1810
|
|
|
1720
|
-
export { type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutConfig, type BreakoutGroupJoinedEvent, type BreakoutSessionUpdatedEvent, type CannotJoinUnclaimedRoomError, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Codec, type Credentials, type CustomMediaStreamTrack, EVENTS, type ForbiddenError, type ForbiddenErrorNames, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type HostPresenceControlsError, type IdentifyDeviceRequest, type InternalServerError, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type MaxViewerLimitReachedError, type NewClientEvent, NoDevicesError, type OrganizationPlanExhaustedError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomConcurrencyControlsError, type RoomFullError, type RoomJoinedErrors, type RoomJoinedEvent, type RoomJoinedSuccess, type RoomKnockedEvent, type RoomLockedError, type RoomLockedEvent, type RoomMeetingTimeExhaustedError, type RoomMode, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, type StatsSubscription, TYPES, type TrackStats, type TurnTransportProtocol, type UpdatedDeviceInfo, type UpdatedDevicesInfo, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, type ViewStats, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups,
|
|
1811
|
+
export { ADDITIONAL_SCREEN_SHARE_SETTINGS, ADDITIONAL_SCREEN_SHARE_SETTINGS_VP9, AUDIO_SETTINGS, type AddSpotlightRequest, type AudioEnableRequest, type AudioEnableRequestedEvent, type AudioEnabledEvent, BandwidthTester, type BreakoutConfig, type BreakoutGroupJoinedEvent, type BreakoutSessionUpdatedEvent, type CannotJoinUnclaimedRoomError, type ChatMessage, type ClientKickedEvent, type ClientLeftEvent, type ClientMetadataPayload, type ClientMetadataReceivedEvent, type ClientRole, type ClientUnableToJoinEvent, type CloudRecordingStartedEvent, type Codec, type Credentials, type CustomMediaStreamTrack, EVENTS, type ForbiddenError, type ForbiddenErrorNames, type GetConstraintsOptions, type GetDeviceDataResult, type GetMediaConstraintsOptions, type GetStreamOptions, type GetStreamResult, type GetUpdatedDevicesResult, type HostPresenceControlsError, type IdentifyDeviceRequest, type InternalServerError, type IssuesAndMetricsByView, type JoinRoomRequest, KNOCK_MESSAGES, KalmanFilter, type KnockAcceptedEvent, type KnockRejectedEvent, type KnockRoomRequest, type KnockerLeftEvent, type LiveTranscriptionStartedEvent, type LiveTranscriptionStoppedEvent, Logger, MAXIMUM_TURN_BANDWIDTH, MAXIMUM_TURN_BANDWIDTH_UNLIMITED, MEDIA_JITTER_BUFFER_TARGET, type MaxViewerLimitReachedError, type NewClientEvent, NoDevicesError, type OrganizationPlanExhaustedError, P2pRtcManager, PROTOCOL_ERRORS, PROTOCOL_EVENTS, PROTOCOL_REQUESTS, PROTOCOL_RESPONSES, RELAY_MESSAGES, ReconnectManager, type RemoveSpotlightRequest, type RoleName, type RoomConcurrencyControlsError, type RoomFullError, type RoomJoinedErrors, type RoomJoinedEvent, type RoomJoinedSuccess, type RoomKnockedEvent, type RoomLockedError, type RoomLockedEvent, type RoomMeetingTimeExhaustedError, type RoomMode, type RoomSessionEndedEvent, type RtcClientConnectionStatusChangedPayload, RtcEventNames, type RtcEvents, type RtcLocalStreamTrackAddedPayload, type RtcLocalStreamTrackRemovedPayload, type RtcManager, type RtcManagerCreatedPayload, RtcManagerDispatcher, RtcStream, type RtcStreamAddedPayload, SCREEN_SHARE_SETTINGS, SCREEN_SHARE_SETTINGS_VP9, SCREEN_SHARE_SIMULCAST_SETTINGS, STREAM_TYPES, type ScreenshareStartedEvent, type ScreenshareStoppedEvent, type SendClientMetadataRequest, ServerSocket, Session, SfuV2Parser, type SignalClient, type SignalEvents, type SignalKnocker, type SignalRequests, type SocketConf, type SocketManager, type Spotlight, type SpotlightAddedEvent, type SpotlightRemovedEvent, type StatsMonitorOptions, type StatsMonitorState, type StatsSubscription, TYPES, type TrackStats, type TurnTransportProtocol, type UpdatedDeviceInfo, type UpdatedDevicesInfo, VIDEO_SETTINGS_HD, VIDEO_SETTINGS_SD, VIDEO_SETTINGS_VP9, VIDEO_SETTINGS_VP9_KEY, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH, VIDEO_SETTINGS_VP9_LOW_BANDWIDTH_KEY, VegaConnection, VegaMediaQualityMonitor, VegaRtcManager, type VideoEnableRequest, type VideoEnableRequestedEvent, type VideoEnabledEvent, type ViewStats, addAbsCaptureTimeExtMap, addExtMap, assert, buildDeviceList, calculateStd, captureAudioSsrcMetrics, captureCandidatePairInfoMetrics, captureCommonSsrcMetrics, captureSsrcInfo, captureVideoSsrcMetrics, changeMediaDirection, cleanSdp, compareLocalDevices, createACFCalculator, createMicAnalyser, createWorker, deprioritizeH264, detectMicrophoneNotWorking, enumerate, external_stun_servers, filterMidExtension, filterMsidSemantic, fromLocation, generateByteString, getConstraints, getCurrentPeerConnections, getDeviceData, getDisplayMedia, getIssuesAndMetrics, getMediaConstraints, getMediaSettings, getMediasoupDevice, getNumFailedStatsReports, getNumFailedTrackSsrcLookups, getNumMissingTrackSsrcLookups, getPeerConnectionIndex, getStats, getStream, getUpdatedDevices, getUpdatedStats, getUserMedia, hasGetDisplayMedia, ipRegex, isMobile, isRelayed, maybeRejectNoH264, maybeTurnOnly, modifyMediaCapabilities, removePeerConnection, replaceSSRCs, replaceTracksInStream, _default as rtcManagerEvents, rtcStats, setClientProvider, setCodecPreferenceSDP, setPeerConnectionsForTests, setVideoBandwidthUsingSetParameters, sortCodecs, type ssrcStats, standardDeviation, startPerformanceMonitor, stopStreamTracks, subscribeIssues, subscribeStats, turnServerOverride, variance };
|