mediasfu-vue 1.2.1 → 1.2.2
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/CHANGELOG.md +7 -0
- package/README.md +12 -0
- package/dist/index.cjs +56 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +56 -35
- package/dist/index.js.map +1 -1
- package/dist/mediasfu-vue.css +83 -83
- package/dist/types/ProducerClient/producerClientEmits/roomVideoParams.d.ts +2 -0
- package/dist/types/ProducerClient/producerClientEmits/roomVideoPolicy.d.ts +19 -0
- package/dist/types/ProducerClient/producerClientEmits/updateRoomParametersClient.d.ts +9 -1
- package/dist/types/SharedTypes/index.d.ts +4 -0
- package/dist/types/components/mediasfuComponents/MediasfuGeneric.vue.d.ts +4 -0
- package/package.json +2 -2
- package/src/ProducerClient/producerClientEmits/roomVideoParams.ts +15 -0
- package/src/ProducerClient/producerClientEmits/roomVideoPolicy.ts +41 -0
- package/src/ProducerClient/producerClientEmits/updateRoomParametersClient.ts +18 -31
- package/src/SharedTypes/index.ts +4 -0
- package/src/components/mediasfuComponents/MediasfuGeneric.vue +6 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.2 — 2026-09-30
|
|
4
|
+
|
|
5
|
+
- Disable camera simulcast automatically for chat and capacity-two rooms, with an explicit `simulcastOff` opt-out for larger rooms and an optional `roomCapacity` hint.
|
|
6
|
+
- Preserve full-resolution encoder limits in single-encoding mode and restore the original preset for later room updates.
|
|
7
|
+
- Remove the recording-only 20% camera bitrate and initial-bitrate uplift; screen-sharing and audio presets are unchanged.
|
|
8
|
+
|
|
9
|
+
|
|
3
10
|
## 1.2.0 — 2026-09-21
|
|
4
11
|
|
|
5
12
|
- Added person-aware background blur to the classic and modern background modals.
|
package/README.md
CHANGED
|
@@ -391,3 +391,15 @@ Hosts can choose **Leave room** or **End for everyone**. **Leave room** keeps th
|
|
|
391
391
|
## License
|
|
392
392
|
|
|
393
393
|
MIT. See [LICENSE](LICENSE).
|
|
394
|
+
|
|
395
|
+
## Camera simulcast and recording bitrate
|
|
396
|
+
|
|
397
|
+
Camera simulcast is disabled automatically for `chat` rooms and rooms with a configured capacity of exactly two. This uses the room's configured capacity, not the number of participants currently connected. Larger rooms retain simulcast unless `simulcastOff: true` is supplied.
|
|
398
|
+
|
|
399
|
+
Single-encoding mode uses the full-resolution camera layer and preserves its bitrate and frame-rate limits. Screen-sharing and audio encodings are unchanged. Enabling recording no longer adds a 20% camera bitrate or initial-bitrate uplift.
|
|
400
|
+
|
|
401
|
+
The server's join-response `capacity` takes precedence. For servers that omit it, supply `roomCapacity: 2` as a client-side hint. Programmatic room creation also uses `noUIPreJoinOptions.capacity` as the hint. This option does not change server-side capacity or authorization.
|
|
402
|
+
|
|
403
|
+
```vue
|
|
404
|
+
<MediasfuGeneric :simulcast-off="true" :room-capacity="2" />
|
|
405
|
+
```
|
package/dist/index.cjs
CHANGED
|
@@ -2728,7 +2728,7 @@ const _sfc_main$1M = /* @__PURE__ */ vue.defineComponent({
|
|
|
2728
2728
|
if (!props.stream) {
|
|
2729
2729
|
return;
|
|
2730
2730
|
}
|
|
2731
|
-
const
|
|
2731
|
+
const baseParams2 = props.parameters;
|
|
2732
2732
|
let consLow = false;
|
|
2733
2733
|
intervalId = window.setInterval(async () => {
|
|
2734
2734
|
let averageLoudness = 128;
|
|
@@ -2743,7 +2743,7 @@ const _sfc_main$1M = /* @__PURE__ */ vue.defineComponent({
|
|
|
2743
2743
|
});
|
|
2744
2744
|
} catch {
|
|
2745
2745
|
}
|
|
2746
|
-
const updatedParams =
|
|
2746
|
+
const updatedParams = baseParams2.getUpdatedAllParams?.() ?? baseParams2;
|
|
2747
2747
|
const {
|
|
2748
2748
|
eventType,
|
|
2749
2749
|
meetingDisplayType,
|
|
@@ -2763,11 +2763,11 @@ const _sfc_main$1M = /* @__PURE__ */ vue.defineComponent({
|
|
|
2763
2763
|
breakOutRoomEnded: updatedBreakoutEnded,
|
|
2764
2764
|
limitedBreakRoom: updatedLimitedBreakRoom
|
|
2765
2765
|
} = updatedParams;
|
|
2766
|
-
const reUpdateInter = updatedReUpdateInter ??
|
|
2767
|
-
const updateParticipantAudioDecibels = updatedUpdateParticipantAudioDecibels ??
|
|
2768
|
-
const breakOutRoomStarted = updatedBreakoutStarted ??
|
|
2769
|
-
const breakOutRoomEnded = updatedBreakoutEnded ??
|
|
2770
|
-
const limitedBreakRoom = updatedLimitedBreakRoom ??
|
|
2766
|
+
const reUpdateInter = updatedReUpdateInter ?? baseParams2.reUpdateInter;
|
|
2767
|
+
const updateParticipantAudioDecibels = updatedUpdateParticipantAudioDecibels ?? baseParams2.updateParticipantAudioDecibels;
|
|
2768
|
+
const breakOutRoomStarted = updatedBreakoutStarted ?? baseParams2.breakOutRoomStarted ?? false;
|
|
2769
|
+
const breakOutRoomEnded = updatedBreakoutEnded ?? baseParams2.breakOutRoomEnded ?? false;
|
|
2770
|
+
const limitedBreakRoom = updatedLimitedBreakRoom ?? baseParams2.limitedBreakRoom ?? [];
|
|
2771
2771
|
const activeSounds = Array.isArray(activeSoundsRaw) ? [...activeSoundsRaw] : [];
|
|
2772
2772
|
const autoWaveEnabled = typeof autoWave === "boolean" ? autoWave : false;
|
|
2773
2773
|
const paginatedList = Array.isArray(paginatedStreams) ? paginatedStreams : [];
|
|
@@ -34802,7 +34802,32 @@ async function joinLocalRoom({
|
|
|
34802
34802
|
);
|
|
34803
34803
|
});
|
|
34804
34804
|
}
|
|
34805
|
-
|
|
34805
|
+
function cameraSimulcastOff(eventType, capacity, options = {}) {
|
|
34806
|
+
const roomCapacity = capacity ?? options.roomCapacity;
|
|
34807
|
+
return options.simulcastOff === true || eventType === "chat" || roomCapacity === 2;
|
|
34808
|
+
}
|
|
34809
|
+
function applyCameraEncodingPolicy(params, singleEncoding) {
|
|
34810
|
+
if (!singleEncoding || !params.encodings.length) return params;
|
|
34811
|
+
const full = params.encodings.reduce((best, encoding2) => (encoding2.scaleResolutionDownBy ?? 1) <= (best.scaleResolutionDownBy ?? 1) ? encoding2 : best);
|
|
34812
|
+
const encoding = { ...full, scaleResolutionDownBy: 1 };
|
|
34813
|
+
delete encoding.rid;
|
|
34814
|
+
if (encoding.scalabilityMode) encoding.scalabilityMode = "L1T3";
|
|
34815
|
+
params.encodings = [encoding];
|
|
34816
|
+
return params;
|
|
34817
|
+
}
|
|
34818
|
+
const baseParams = /* @__PURE__ */ new WeakMap();
|
|
34819
|
+
function freshRoomVideoParams(current, fallback) {
|
|
34820
|
+
const source = current?.encodings?.length ? current : fallback;
|
|
34821
|
+
const base = baseParams.get(source) ?? source;
|
|
34822
|
+
const fresh = {
|
|
34823
|
+
...base,
|
|
34824
|
+
encodings: base.encodings.map((encoding) => ({ ...encoding })),
|
|
34825
|
+
codecOptions: base.codecOptions ? { ...base.codecOptions } : void 0
|
|
34826
|
+
};
|
|
34827
|
+
baseParams.set(fresh, base);
|
|
34828
|
+
return fresh;
|
|
34829
|
+
}
|
|
34830
|
+
const updateRoomParametersClient = ({ parameters, simulcastOff = parameters.simulcastOff, roomCapacity = parameters.roomCapacity }) => {
|
|
34806
34831
|
try {
|
|
34807
34832
|
const {
|
|
34808
34833
|
screenPageLimit,
|
|
@@ -34930,14 +34955,8 @@ const updateRoomParametersClient = ({ parameters }) => {
|
|
|
34930
34955
|
vidCons = targetResolution == "hd" ? mediasfuShared.hdConsPort : targetResolution == "fhd" ? mediasfuShared.fhdConsPort : targetResolution == "qhd" ? mediasfuShared.qhdConsPort : targetResolution == "sd" ? mediasfuShared.sdConsPort : mediasfuShared.QnHDConsPort;
|
|
34931
34956
|
}
|
|
34932
34957
|
let frameRateValue = frameRate ? frameRate : 10;
|
|
34933
|
-
let vParamsValue =
|
|
34934
|
-
let hParamsValue =
|
|
34935
|
-
if (Object.keys(vParamsValue).length == 0) {
|
|
34936
|
-
vParamsValue = { ...mediasfuShared.vParams };
|
|
34937
|
-
}
|
|
34938
|
-
if (Object.keys(hParamsValue).length == 0) {
|
|
34939
|
-
hParamsValue = { ...mediasfuShared.hParams };
|
|
34940
|
-
}
|
|
34958
|
+
let vParamsValue = freshRoomVideoParams(vParams, mediasfuShared.vParams);
|
|
34959
|
+
let hParamsValue = freshRoomVideoParams(hParams, mediasfuShared.hParams);
|
|
34941
34960
|
if (targetResolution == "hd") {
|
|
34942
34961
|
frameRateValue = mediasfuShared.hdFrameRate;
|
|
34943
34962
|
vParamsValue.encodings.forEach((encoding) => {
|
|
@@ -34993,24 +35012,12 @@ const updateRoomParametersClient = ({ parameters }) => {
|
|
|
34993
35012
|
}
|
|
34994
35013
|
});
|
|
34995
35014
|
}
|
|
34996
|
-
|
|
34997
|
-
|
|
34998
|
-
|
|
34999
|
-
|
|
35000
|
-
|
|
35001
|
-
|
|
35002
|
-
hParamsValue.encodings.forEach((encoding) => {
|
|
35003
|
-
if (encoding.maxBitrate) {
|
|
35004
|
-
encoding.maxBitrate *= 1.2;
|
|
35005
|
-
}
|
|
35006
|
-
});
|
|
35007
|
-
if (hParamsValue.codecOptions && hParamsValue.codecOptions.videoGoogleStartBitrate) {
|
|
35008
|
-
hParamsValue.codecOptions.videoGoogleStartBitrate *= 1.2;
|
|
35009
|
-
}
|
|
35010
|
-
if (vParamsValue.codecOptions && vParamsValue.codecOptions.videoGoogleStartBitrate) {
|
|
35011
|
-
vParamsValue.codecOptions.videoGoogleStartBitrate *= 1.2;
|
|
35012
|
-
}
|
|
35013
|
-
}
|
|
35015
|
+
const singleCameraEncoding = cameraSimulcastOff(data.meetingRoomParams.type, data.capacity, {
|
|
35016
|
+
simulcastOff,
|
|
35017
|
+
roomCapacity
|
|
35018
|
+
});
|
|
35019
|
+
applyCameraEncodingPolicy(hParamsValue, singleCameraEncoding);
|
|
35020
|
+
applyCameraEncodingPolicy(vParamsValue, singleCameraEncoding);
|
|
35014
35021
|
updateVidCons(vidCons);
|
|
35015
35022
|
updateFrameRate(frameRateValue);
|
|
35016
35023
|
updateHParams(hParamsValue);
|
|
@@ -35263,6 +35270,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
35263
35270
|
returnUI: { type: Boolean, default: true },
|
|
35264
35271
|
renderUIExternally: { type: Boolean, default: false },
|
|
35265
35272
|
externalUITarget: { default: "#mediasfu-modern-head" },
|
|
35273
|
+
simulcastOff: { type: Boolean },
|
|
35274
|
+
roomCapacity: {},
|
|
35266
35275
|
noUIPreJoinOptions: { default: void 0 },
|
|
35267
35276
|
joinMediaSFURoom: { type: Function, default: void 0 },
|
|
35268
35277
|
createMediaSFURoom: { type: Function, default: void 0 },
|
|
@@ -39695,6 +39704,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
39695
39704
|
}
|
|
39696
39705
|
try {
|
|
39697
39706
|
updateRoomParametersClient({
|
|
39707
|
+
simulcastOff: props.simulcastOff,
|
|
39708
|
+
roomCapacity: props.roomCapacity ?? (props.noUIPreJoinOptions && "capacity" in props.noUIPreJoinOptions ? props.noUIPreJoinOptions.capacity : void 0),
|
|
39698
39709
|
parameters: {
|
|
39699
39710
|
...allParameters.value,
|
|
39700
39711
|
data: data2
|
|
@@ -41326,7 +41337,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
41326
41337
|
};
|
|
41327
41338
|
}
|
|
41328
41339
|
});
|
|
41329
|
-
const MediasfuGeneric = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
41340
|
+
const MediasfuGeneric = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-c05d7ce0"]]);
|
|
41330
41341
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
41331
41342
|
__name: "MediasfuBroadcast",
|
|
41332
41343
|
props: {
|
|
@@ -41343,6 +41354,8 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
41343
41354
|
returnUI: { type: Boolean },
|
|
41344
41355
|
renderUIExternally: { type: Boolean },
|
|
41345
41356
|
externalUITarget: {},
|
|
41357
|
+
simulcastOff: { type: Boolean },
|
|
41358
|
+
roomCapacity: {},
|
|
41346
41359
|
noUIPreJoinOptions: {},
|
|
41347
41360
|
joinMediaSFURoom: {},
|
|
41348
41361
|
createMediaSFURoom: {},
|
|
@@ -41383,6 +41396,8 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
41383
41396
|
returnUI: { type: Boolean },
|
|
41384
41397
|
renderUIExternally: { type: Boolean },
|
|
41385
41398
|
externalUITarget: {},
|
|
41399
|
+
simulcastOff: { type: Boolean },
|
|
41400
|
+
roomCapacity: {},
|
|
41386
41401
|
noUIPreJoinOptions: {},
|
|
41387
41402
|
joinMediaSFURoom: {},
|
|
41388
41403
|
createMediaSFURoom: {},
|
|
@@ -41423,6 +41438,8 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
41423
41438
|
returnUI: { type: Boolean },
|
|
41424
41439
|
renderUIExternally: { type: Boolean },
|
|
41425
41440
|
externalUITarget: {},
|
|
41441
|
+
simulcastOff: { type: Boolean },
|
|
41442
|
+
roomCapacity: {},
|
|
41426
41443
|
noUIPreJoinOptions: {},
|
|
41427
41444
|
joinMediaSFURoom: {},
|
|
41428
41445
|
createMediaSFURoom: {},
|
|
@@ -41463,6 +41480,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
41463
41480
|
returnUI: { type: Boolean },
|
|
41464
41481
|
renderUIExternally: { type: Boolean },
|
|
41465
41482
|
externalUITarget: {},
|
|
41483
|
+
simulcastOff: { type: Boolean },
|
|
41484
|
+
roomCapacity: {},
|
|
41466
41485
|
noUIPreJoinOptions: {},
|
|
41467
41486
|
joinMediaSFURoom: {},
|
|
41468
41487
|
createMediaSFURoom: {},
|
|
@@ -47222,6 +47241,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47222
47241
|
returnUI: { type: Boolean, default: true },
|
|
47223
47242
|
renderUIExternally: { type: Boolean },
|
|
47224
47243
|
externalUITarget: {},
|
|
47244
|
+
simulcastOff: { type: Boolean },
|
|
47245
|
+
roomCapacity: {},
|
|
47225
47246
|
noUIPreJoinOptions: {},
|
|
47226
47247
|
joinMediaSFURoom: {},
|
|
47227
47248
|
createMediaSFURoom: {},
|