mediasfu-vue 1.2.0 → 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 +105 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +106 -82
- package/dist/index.js.map +1 -1
- package/dist/mediasfu-vue.css +93 -93
- 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 +16 -0
- package/dist/types/components/backgroundComponents/BackgroundModal.vue.d.ts +1 -0
- package/dist/types/components/mediasfuComponents/MediasfuGeneric.vue.d.ts +4 -0
- package/dist/types/consumers/addVideosGrid.d.ts +2 -0
- package/dist/types/modern/modal_components/ModernBackgroundModal.vue.d.ts +1 -0
- package/dist/types/types/background/index.d.ts +2 -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 +7 -0
- package/src/components/backgroundComponents/BackgroundModal.vue +18 -26
- package/src/components/mediasfuComponents/MediasfuGeneric.vue +6 -0
- package/src/consumers/addVideosGrid.ts +13 -3
- package/src/modern/modal_components/ModernBackgroundModal.vue +36 -41
- package/src/types/background/index.ts +2 -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
|
@@ -1721,6 +1721,8 @@ async function addVideosGrid({
|
|
|
1721
1721
|
keepBackground,
|
|
1722
1722
|
virtualStream,
|
|
1723
1723
|
forceFullDisplay,
|
|
1724
|
+
shared,
|
|
1725
|
+
shareScreenStarted,
|
|
1724
1726
|
otherGridStreams,
|
|
1725
1727
|
updateOtherGridStreams,
|
|
1726
1728
|
updateMiniCardsGrid,
|
|
@@ -1742,6 +1744,11 @@ async function addVideosGrid({
|
|
|
1742
1744
|
const newComponents = [[], []];
|
|
1743
1745
|
let remoteProducerId = "";
|
|
1744
1746
|
numtoadd = mainGridStreams.length;
|
|
1747
|
+
const sidePanelForceFullDisplay = mediasfuShared.resolveSidePanelForceFullDisplay({
|
|
1748
|
+
forceFullDisplay,
|
|
1749
|
+
screenShareActive: !!(shared || shareScreenStarted),
|
|
1750
|
+
itemCount: numtoadd + (removeAltGrid ? 0 : altGridStreams.length)
|
|
1751
|
+
});
|
|
1745
1752
|
if (removeAltGrid) {
|
|
1746
1753
|
updateAddAltGrid(false);
|
|
1747
1754
|
}
|
|
@@ -1878,7 +1885,7 @@ async function addVideosGrid({
|
|
|
1878
1885
|
videoStream: videoParticipant.stream || new MediaStream(),
|
|
1879
1886
|
remoteProducerId: videoParticipant.stream?.id || "",
|
|
1880
1887
|
eventType,
|
|
1881
|
-
forceFullDisplay: eventType === "webinar" ? false :
|
|
1888
|
+
forceFullDisplay: eventType === "webinar" ? false : sidePanelForceFullDisplay,
|
|
1882
1889
|
customStyle: {
|
|
1883
1890
|
border: themedBorder
|
|
1884
1891
|
},
|
|
@@ -1920,7 +1927,7 @@ async function addVideosGrid({
|
|
|
1920
1927
|
videoStream: participant.stream || new MediaStream(),
|
|
1921
1928
|
remoteProducerId: remoteProducerId || "",
|
|
1922
1929
|
eventType,
|
|
1923
|
-
forceFullDisplay,
|
|
1930
|
+
forceFullDisplay: sidePanelForceFullDisplay,
|
|
1924
1931
|
customStyle: {
|
|
1925
1932
|
border: themedBorder
|
|
1926
1933
|
},
|
|
@@ -2060,7 +2067,7 @@ async function addVideosGrid({
|
|
|
2060
2067
|
videoStream: participant.stream || new MediaStream(),
|
|
2061
2068
|
remoteProducerId: remoteProducerId || "",
|
|
2062
2069
|
eventType,
|
|
2063
|
-
forceFullDisplay,
|
|
2070
|
+
forceFullDisplay: sidePanelForceFullDisplay,
|
|
2064
2071
|
customStyle: {
|
|
2065
2072
|
border: themedBorder
|
|
2066
2073
|
},
|
|
@@ -2721,7 +2728,7 @@ const _sfc_main$1M = /* @__PURE__ */ vue.defineComponent({
|
|
|
2721
2728
|
if (!props.stream) {
|
|
2722
2729
|
return;
|
|
2723
2730
|
}
|
|
2724
|
-
const
|
|
2731
|
+
const baseParams2 = props.parameters;
|
|
2725
2732
|
let consLow = false;
|
|
2726
2733
|
intervalId = window.setInterval(async () => {
|
|
2727
2734
|
let averageLoudness = 128;
|
|
@@ -2736,7 +2743,7 @@ const _sfc_main$1M = /* @__PURE__ */ vue.defineComponent({
|
|
|
2736
2743
|
});
|
|
2737
2744
|
} catch {
|
|
2738
2745
|
}
|
|
2739
|
-
const updatedParams =
|
|
2746
|
+
const updatedParams = baseParams2.getUpdatedAllParams?.() ?? baseParams2;
|
|
2740
2747
|
const {
|
|
2741
2748
|
eventType,
|
|
2742
2749
|
meetingDisplayType,
|
|
@@ -2756,11 +2763,11 @@ const _sfc_main$1M = /* @__PURE__ */ vue.defineComponent({
|
|
|
2756
2763
|
breakOutRoomEnded: updatedBreakoutEnded,
|
|
2757
2764
|
limitedBreakRoom: updatedLimitedBreakRoom
|
|
2758
2765
|
} = updatedParams;
|
|
2759
|
-
const reUpdateInter = updatedReUpdateInter ??
|
|
2760
|
-
const updateParticipantAudioDecibels = updatedUpdateParticipantAudioDecibels ??
|
|
2761
|
-
const breakOutRoomStarted = updatedBreakoutStarted ??
|
|
2762
|
-
const breakOutRoomEnded = updatedBreakoutEnded ??
|
|
2763
|
-
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 ?? [];
|
|
2764
2771
|
const activeSounds = Array.isArray(activeSoundsRaw) ? [...activeSoundsRaw] : [];
|
|
2765
2772
|
const autoWaveEnabled = typeof autoWave === "boolean" ? autoWave : false;
|
|
2766
2773
|
const paginatedList = Array.isArray(paginatedStreams) ? paginatedStreams : [];
|
|
@@ -17560,6 +17567,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
17560
17567
|
isVisible: { type: Boolean },
|
|
17561
17568
|
onClose: {},
|
|
17562
17569
|
parameters: {},
|
|
17570
|
+
keepProcessingWhenHidden: { type: Boolean, default: true },
|
|
17563
17571
|
renderMode: {},
|
|
17564
17572
|
position: { default: "topLeft" },
|
|
17565
17573
|
backgroundColor: { default: "#f5f5f5" },
|
|
@@ -17691,7 +17699,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
17691
17699
|
const saveBackgroundButtonRef = vue.ref(null);
|
|
17692
17700
|
const mainCanvasRef = vue.ref(null);
|
|
17693
17701
|
const previewLoopVersion = vue.ref(0);
|
|
17694
|
-
|
|
17702
|
+
let stopPreviewFrameLoop = null;
|
|
17695
17703
|
const previewCaptureTimeoutId = vue.ref(null);
|
|
17696
17704
|
const clonedStream = vue.ref(null);
|
|
17697
17705
|
const clonedTrack = vue.ref(null);
|
|
@@ -17715,10 +17723,8 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
17715
17723
|
};
|
|
17716
17724
|
const stopPreviewProcessing = () => {
|
|
17717
17725
|
previewLoopVersion.value++;
|
|
17718
|
-
|
|
17719
|
-
|
|
17720
|
-
previewAnimationFrameId.value = null;
|
|
17721
|
-
}
|
|
17726
|
+
stopPreviewFrameLoop?.();
|
|
17727
|
+
stopPreviewFrameLoop = null;
|
|
17722
17728
|
if (previewCaptureTimeoutId.value !== null) {
|
|
17723
17729
|
clearTimeout(previewCaptureTimeoutId.value);
|
|
17724
17730
|
previewCaptureTimeoutId.value = null;
|
|
@@ -18044,6 +18050,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
18044
18050
|
prevKeepBackground.value = keepBackground.value;
|
|
18045
18051
|
props.parameters.updatePrevKeepBackground?.(keepBackground.value);
|
|
18046
18052
|
if (!doSegmentation) {
|
|
18053
|
+
stopPreviewProcessing();
|
|
18047
18054
|
processedStream.value?.getVideoTracks().forEach((track) => track.stop());
|
|
18048
18055
|
processedStream.value = null;
|
|
18049
18056
|
props.parameters.updateProcessedStream?.(null);
|
|
@@ -18055,20 +18062,17 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
18055
18062
|
stopPreviewProcessing();
|
|
18056
18063
|
const loopVersion = previewLoopVersion.value;
|
|
18057
18064
|
let startedProcessing = false;
|
|
18058
|
-
const processFrame = () => {
|
|
18059
|
-
if (loopVersion !== previewLoopVersion.value || !selfieSegmentation.value || pauseSegmentation.value || !videoElement || videoElement.videoWidth === 0 || videoElement.videoHeight === 0) {
|
|
18060
|
-
return;
|
|
18061
|
-
}
|
|
18062
|
-
try {
|
|
18063
|
-
void selfieSegmentation.value.send({ image: videoElement }).catch(() => void 0);
|
|
18064
|
-
} catch {
|
|
18065
|
-
}
|
|
18066
|
-
previewAnimationFrameId.value = requestAnimationFrame(processFrame);
|
|
18067
|
-
};
|
|
18068
18065
|
const startProcessing = () => {
|
|
18069
18066
|
if (startedProcessing) return;
|
|
18070
18067
|
startedProcessing = true;
|
|
18071
|
-
|
|
18068
|
+
const segmentation = selfieSegmentation.value;
|
|
18069
|
+
if (!segmentation) return;
|
|
18070
|
+
stopPreviewFrameLoop = mediasfuShared.startVirtualBackgroundFrameLoop({
|
|
18071
|
+
owner: segmentation,
|
|
18072
|
+
keepProcessingWhenHidden: props.keepProcessingWhenHidden,
|
|
18073
|
+
shouldContinue: () => loopVersion === previewLoopVersion.value && !pauseSegmentation.value && videoElement.srcObject?.getVideoTracks?.()[0]?.readyState === "live",
|
|
18074
|
+
processFrame: () => videoElement.videoWidth > 0 && videoElement.videoHeight > 0 ? segmentation.send({ image: videoElement }) : void 0
|
|
18075
|
+
});
|
|
18072
18076
|
};
|
|
18073
18077
|
videoElement.onloadeddata = startProcessing;
|
|
18074
18078
|
if (videoElement.readyState >= 2 && videoElement.videoWidth > 0 && videoElement.videoHeight > 0) {
|
|
@@ -18853,7 +18857,7 @@ const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
|
|
|
18853
18857
|
};
|
|
18854
18858
|
}
|
|
18855
18859
|
});
|
|
18856
|
-
const BackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-
|
|
18860
|
+
const BackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["__scopeId", "data-v-1410a1d9"]]);
|
|
18857
18861
|
const _hoisted_1$e = { class: "card-header" };
|
|
18858
18862
|
const _hoisted_2$b = { class: "room-title" };
|
|
18859
18863
|
const _hoisted_3$a = { class: "room-actions" };
|
|
@@ -34798,7 +34802,32 @@ async function joinLocalRoom({
|
|
|
34798
34802
|
);
|
|
34799
34803
|
});
|
|
34800
34804
|
}
|
|
34801
|
-
|
|
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 }) => {
|
|
34802
34831
|
try {
|
|
34803
34832
|
const {
|
|
34804
34833
|
screenPageLimit,
|
|
@@ -34926,14 +34955,8 @@ const updateRoomParametersClient = ({ parameters }) => {
|
|
|
34926
34955
|
vidCons = targetResolution == "hd" ? mediasfuShared.hdConsPort : targetResolution == "fhd" ? mediasfuShared.fhdConsPort : targetResolution == "qhd" ? mediasfuShared.qhdConsPort : targetResolution == "sd" ? mediasfuShared.sdConsPort : mediasfuShared.QnHDConsPort;
|
|
34927
34956
|
}
|
|
34928
34957
|
let frameRateValue = frameRate ? frameRate : 10;
|
|
34929
|
-
let vParamsValue =
|
|
34930
|
-
let hParamsValue =
|
|
34931
|
-
if (Object.keys(vParamsValue).length == 0) {
|
|
34932
|
-
vParamsValue = { ...mediasfuShared.vParams };
|
|
34933
|
-
}
|
|
34934
|
-
if (Object.keys(hParamsValue).length == 0) {
|
|
34935
|
-
hParamsValue = { ...mediasfuShared.hParams };
|
|
34936
|
-
}
|
|
34958
|
+
let vParamsValue = freshRoomVideoParams(vParams, mediasfuShared.vParams);
|
|
34959
|
+
let hParamsValue = freshRoomVideoParams(hParams, mediasfuShared.hParams);
|
|
34937
34960
|
if (targetResolution == "hd") {
|
|
34938
34961
|
frameRateValue = mediasfuShared.hdFrameRate;
|
|
34939
34962
|
vParamsValue.encodings.forEach((encoding) => {
|
|
@@ -34989,24 +35012,12 @@ const updateRoomParametersClient = ({ parameters }) => {
|
|
|
34989
35012
|
}
|
|
34990
35013
|
});
|
|
34991
35014
|
}
|
|
34992
|
-
|
|
34993
|
-
|
|
34994
|
-
|
|
34995
|
-
|
|
34996
|
-
|
|
34997
|
-
|
|
34998
|
-
hParamsValue.encodings.forEach((encoding) => {
|
|
34999
|
-
if (encoding.maxBitrate) {
|
|
35000
|
-
encoding.maxBitrate *= 1.2;
|
|
35001
|
-
}
|
|
35002
|
-
});
|
|
35003
|
-
if (hParamsValue.codecOptions && hParamsValue.codecOptions.videoGoogleStartBitrate) {
|
|
35004
|
-
hParamsValue.codecOptions.videoGoogleStartBitrate *= 1.2;
|
|
35005
|
-
}
|
|
35006
|
-
if (vParamsValue.codecOptions && vParamsValue.codecOptions.videoGoogleStartBitrate) {
|
|
35007
|
-
vParamsValue.codecOptions.videoGoogleStartBitrate *= 1.2;
|
|
35008
|
-
}
|
|
35009
|
-
}
|
|
35015
|
+
const singleCameraEncoding = cameraSimulcastOff(data.meetingRoomParams.type, data.capacity, {
|
|
35016
|
+
simulcastOff,
|
|
35017
|
+
roomCapacity
|
|
35018
|
+
});
|
|
35019
|
+
applyCameraEncodingPolicy(hParamsValue, singleCameraEncoding);
|
|
35020
|
+
applyCameraEncodingPolicy(vParamsValue, singleCameraEncoding);
|
|
35010
35021
|
updateVidCons(vidCons);
|
|
35011
35022
|
updateFrameRate(frameRateValue);
|
|
35012
35023
|
updateHParams(hParamsValue);
|
|
@@ -35259,6 +35270,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
35259
35270
|
returnUI: { type: Boolean, default: true },
|
|
35260
35271
|
renderUIExternally: { type: Boolean, default: false },
|
|
35261
35272
|
externalUITarget: { default: "#mediasfu-modern-head" },
|
|
35273
|
+
simulcastOff: { type: Boolean },
|
|
35274
|
+
roomCapacity: {},
|
|
35262
35275
|
noUIPreJoinOptions: { default: void 0 },
|
|
35263
35276
|
joinMediaSFURoom: { type: Function, default: void 0 },
|
|
35264
35277
|
createMediaSFURoom: { type: Function, default: void 0 },
|
|
@@ -39691,6 +39704,8 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
39691
39704
|
}
|
|
39692
39705
|
try {
|
|
39693
39706
|
updateRoomParametersClient({
|
|
39707
|
+
simulcastOff: props.simulcastOff,
|
|
39708
|
+
roomCapacity: props.roomCapacity ?? (props.noUIPreJoinOptions && "capacity" in props.noUIPreJoinOptions ? props.noUIPreJoinOptions.capacity : void 0),
|
|
39694
39709
|
parameters: {
|
|
39695
39710
|
...allParameters.value,
|
|
39696
39711
|
data: data2
|
|
@@ -41322,7 +41337,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
41322
41337
|
};
|
|
41323
41338
|
}
|
|
41324
41339
|
});
|
|
41325
|
-
const MediasfuGeneric = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
41340
|
+
const MediasfuGeneric = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-c05d7ce0"]]);
|
|
41326
41341
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
41327
41342
|
__name: "MediasfuBroadcast",
|
|
41328
41343
|
props: {
|
|
@@ -41339,6 +41354,8 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
41339
41354
|
returnUI: { type: Boolean },
|
|
41340
41355
|
renderUIExternally: { type: Boolean },
|
|
41341
41356
|
externalUITarget: {},
|
|
41357
|
+
simulcastOff: { type: Boolean },
|
|
41358
|
+
roomCapacity: {},
|
|
41342
41359
|
noUIPreJoinOptions: {},
|
|
41343
41360
|
joinMediaSFURoom: {},
|
|
41344
41361
|
createMediaSFURoom: {},
|
|
@@ -41379,6 +41396,8 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
41379
41396
|
returnUI: { type: Boolean },
|
|
41380
41397
|
renderUIExternally: { type: Boolean },
|
|
41381
41398
|
externalUITarget: {},
|
|
41399
|
+
simulcastOff: { type: Boolean },
|
|
41400
|
+
roomCapacity: {},
|
|
41382
41401
|
noUIPreJoinOptions: {},
|
|
41383
41402
|
joinMediaSFURoom: {},
|
|
41384
41403
|
createMediaSFURoom: {},
|
|
@@ -41419,6 +41438,8 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
41419
41438
|
returnUI: { type: Boolean },
|
|
41420
41439
|
renderUIExternally: { type: Boolean },
|
|
41421
41440
|
externalUITarget: {},
|
|
41441
|
+
simulcastOff: { type: Boolean },
|
|
41442
|
+
roomCapacity: {},
|
|
41422
41443
|
noUIPreJoinOptions: {},
|
|
41423
41444
|
joinMediaSFURoom: {},
|
|
41424
41445
|
createMediaSFURoom: {},
|
|
@@ -41459,6 +41480,8 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
41459
41480
|
returnUI: { type: Boolean },
|
|
41460
41481
|
renderUIExternally: { type: Boolean },
|
|
41461
41482
|
externalUITarget: {},
|
|
41483
|
+
simulcastOff: { type: Boolean },
|
|
41484
|
+
roomCapacity: {},
|
|
41462
41485
|
noUIPreJoinOptions: {},
|
|
41463
41486
|
joinMediaSFURoom: {},
|
|
41464
41487
|
createMediaSFURoom: {},
|
|
@@ -44867,6 +44890,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
44867
44890
|
isVisible: { type: Boolean },
|
|
44868
44891
|
onClose: {},
|
|
44869
44892
|
parameters: {},
|
|
44893
|
+
keepProcessingWhenHidden: { type: Boolean, default: true },
|
|
44870
44894
|
renderMode: { default: "modal" },
|
|
44871
44895
|
position: { default: "topLeft" },
|
|
44872
44896
|
backgroundColor: { default: void 0 },
|
|
@@ -44942,7 +44966,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
44942
44966
|
const saveBackgroundButtonRef = vue.ref(null);
|
|
44943
44967
|
const mainCanvasRef = vue.ref(null);
|
|
44944
44968
|
const previewLoopVersion = vue.ref(0);
|
|
44945
|
-
|
|
44969
|
+
let stopPreviewFrameLoop = null;
|
|
44946
44970
|
const previewCaptureTimeoutId = vue.ref(null);
|
|
44947
44971
|
const uploadFileName = vue.ref("No file selected");
|
|
44948
44972
|
const isAutoApplyBusy = vue.ref(false);
|
|
@@ -45299,6 +45323,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
45299
45323
|
prevKeepBackground.value = keepBackground.value;
|
|
45300
45324
|
props.parameters.updatePrevKeepBackground?.(keepBackground.value);
|
|
45301
45325
|
if (!doSegmentation) {
|
|
45326
|
+
stopPreviewProcessing();
|
|
45302
45327
|
processedStream.value?.getVideoTracks().forEach((track) => track.stop());
|
|
45303
45328
|
processedStream.value = null;
|
|
45304
45329
|
props.parameters.updateProcessedStream?.(null);
|
|
@@ -45312,20 +45337,17 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
45312
45337
|
stopPreviewProcessing();
|
|
45313
45338
|
const loopVersion = previewLoopVersion.value;
|
|
45314
45339
|
let startedProcessing = false;
|
|
45315
|
-
const processFrame = () => {
|
|
45316
|
-
if (loopVersion !== previewLoopVersion.value || !selfieSegmentation.value || pauseSegmentation.value || videoElement.videoWidth === 0 || videoElement.videoHeight === 0) {
|
|
45317
|
-
return;
|
|
45318
|
-
}
|
|
45319
|
-
try {
|
|
45320
|
-
void selfieSegmentation.value.send({ image: videoElement }).catch(() => void 0);
|
|
45321
|
-
} catch {
|
|
45322
|
-
}
|
|
45323
|
-
previewAnimationFrameId.value = requestAnimationFrame(processFrame);
|
|
45324
|
-
};
|
|
45325
45340
|
const startProcessing = () => {
|
|
45326
45341
|
if (startedProcessing) return;
|
|
45327
45342
|
startedProcessing = true;
|
|
45328
|
-
|
|
45343
|
+
const segmentation = selfieSegmentation.value;
|
|
45344
|
+
if (!segmentation) return;
|
|
45345
|
+
stopPreviewFrameLoop = mediasfuShared.startVirtualBackgroundFrameLoop({
|
|
45346
|
+
owner: segmentation,
|
|
45347
|
+
keepProcessingWhenHidden: props.keepProcessingWhenHidden,
|
|
45348
|
+
shouldContinue: () => loopVersion === previewLoopVersion.value && !pauseSegmentation.value && videoElement.srcObject?.getVideoTracks?.()[0]?.readyState === "live",
|
|
45349
|
+
processFrame: () => videoElement.videoWidth > 0 && videoElement.videoHeight > 0 ? segmentation.send({ image: videoElement }) : void 0
|
|
45350
|
+
});
|
|
45329
45351
|
};
|
|
45330
45352
|
videoElement.onloadeddata = startProcessing;
|
|
45331
45353
|
if (videoElement.readyState >= 2 && videoElement.videoWidth > 0 && videoElement.videoHeight > 0) {
|
|
@@ -45477,10 +45499,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
45477
45499
|
};
|
|
45478
45500
|
const stopPreviewProcessing = () => {
|
|
45479
45501
|
previewLoopVersion.value++;
|
|
45480
|
-
|
|
45481
|
-
|
|
45482
|
-
previewAnimationFrameId.value = null;
|
|
45483
|
-
}
|
|
45502
|
+
stopPreviewFrameLoop?.();
|
|
45503
|
+
stopPreviewFrameLoop = null;
|
|
45484
45504
|
if (previewCaptureTimeoutId.value !== null) {
|
|
45485
45505
|
clearTimeout(previewCaptureTimeoutId.value);
|
|
45486
45506
|
previewCaptureTimeoutId.value = null;
|
|
@@ -45812,7 +45832,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
45812
45832
|
display: "flex",
|
|
45813
45833
|
alignItems: "center",
|
|
45814
45834
|
justifyContent: "space-between",
|
|
45815
|
-
gap: "
|
|
45835
|
+
gap: "8px",
|
|
45816
45836
|
padding: "12px 16px 10px",
|
|
45817
45837
|
borderBottom: "1px solid var(--ms-modern-panel-border)",
|
|
45818
45838
|
background: panelGradientBackground$2
|
|
@@ -46050,15 +46070,16 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
46050
46070
|
const defaultApplyButtonProps = vue.computed(() => ({
|
|
46051
46071
|
class: "ms-modern-background-modal__apply",
|
|
46052
46072
|
style: {
|
|
46053
|
-
minHeight: "
|
|
46054
|
-
minWidth: "
|
|
46073
|
+
minHeight: "34px",
|
|
46074
|
+
minWidth: "110px",
|
|
46055
46075
|
borderRadius: "9999px",
|
|
46056
46076
|
border: "1px solid var(--ms-modern-panel-border)",
|
|
46057
|
-
paddingInline: "
|
|
46077
|
+
paddingInline: "14px",
|
|
46078
|
+
fontSize: "13px",
|
|
46058
46079
|
background: "var(--ms-modern-field-background)",
|
|
46059
46080
|
color: "var(--ms-modern-text-primary)",
|
|
46060
46081
|
fontFamily: "var(--ms-modern-font-family)",
|
|
46061
|
-
fontWeight:
|
|
46082
|
+
fontWeight: 600,
|
|
46062
46083
|
boxShadow: "var(--ms-modern-shadow-soft)",
|
|
46063
46084
|
cursor: "pointer"
|
|
46064
46085
|
}
|
|
@@ -46076,15 +46097,16 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
46076
46097
|
const defaultSaveButtonProps = vue.computed(() => ({
|
|
46077
46098
|
class: "ms-modern-background-modal__save",
|
|
46078
46099
|
style: {
|
|
46079
|
-
minHeight: "
|
|
46080
|
-
minWidth: "
|
|
46100
|
+
minHeight: "34px",
|
|
46101
|
+
minWidth: "110px",
|
|
46081
46102
|
borderRadius: "9999px",
|
|
46082
46103
|
border: "none",
|
|
46083
|
-
paddingInline: "
|
|
46104
|
+
paddingInline: "14px",
|
|
46105
|
+
fontSize: "13px",
|
|
46084
46106
|
background: "linear-gradient(135deg, var(--ms-modern-brand-primary) 0%, var(--ms-modern-brand-secondary) 55%, var(--ms-modern-accent) 100%)",
|
|
46085
46107
|
color: "#ffffff",
|
|
46086
46108
|
fontFamily: "var(--ms-modern-font-family)",
|
|
46087
|
-
fontWeight:
|
|
46109
|
+
fontWeight: 600,
|
|
46088
46110
|
boxShadow: "var(--ms-modern-shadow-soft)",
|
|
46089
46111
|
cursor: "pointer"
|
|
46090
46112
|
}
|
|
@@ -46480,7 +46502,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
46480
46502
|
};
|
|
46481
46503
|
}
|
|
46482
46504
|
});
|
|
46483
|
-
const ModernBackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
46505
|
+
const ModernBackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-fcfc461a"]]);
|
|
46484
46506
|
const panelGradientBackground$1 = "linear-gradient(180deg, var(--ms-modern-panel-surface-elevated) 0%, var(--ms-modern-panel-surface) 100%)";
|
|
46485
46507
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
46486
46508
|
__name: "ModernConfirmHereModal",
|
|
@@ -47219,6 +47241,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47219
47241
|
returnUI: { type: Boolean, default: true },
|
|
47220
47242
|
renderUIExternally: { type: Boolean },
|
|
47221
47243
|
externalUITarget: {},
|
|
47244
|
+
simulcastOff: { type: Boolean },
|
|
47245
|
+
roomCapacity: {},
|
|
47222
47246
|
noUIPreJoinOptions: {},
|
|
47223
47247
|
joinMediaSFURoom: {},
|
|
47224
47248
|
createMediaSFURoom: {},
|