mediasfu-vue 1.4.1 → 1.4.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 +6 -0
- package/dist/index.cjs +12 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -25
- package/dist/index.js.map +1 -1
- package/dist/mediasfu-vue.css +10 -10
- package/package.json +2 -2
- package/src/components/backgroundComponents/BackgroundModal.vue +9 -12
- package/src/modern/modal_components/ModernBackgroundModal.vue +149 -150
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.4.2 — 2026-10-30
|
|
4
|
+
|
|
5
|
+
- Requires `mediasfu-shared` 1.4.2 or later.
|
|
6
|
+
- **Background blur and virtual backgrounds on phones.** On phones held upright (Android Chrome, iOS Safari) the processed camera was sized from the track settings, which report landscape, so viewers saw the person stretched sideways. The processed video now follows the frames the camera actually delivers, including when the phone is turned. The segmentation model follows the frame shape.
|
|
7
|
+
- **Softer edges around the person.** The mask is smoothed and lightly feathered, and the blurred background is drawn in place rather than as an enlarged copy, which removes the hard outline around head and hands. Browsers without canvas `filter` support (some iOS Safari versions) now get a real blur instead of an unblurred background.
|
|
8
|
+
|
|
3
9
|
## 1.4.1 — 2026-10-27
|
|
4
10
|
|
|
5
11
|
- Requires `mediasfu-shared` 1.4.1 or later.
|
package/dist/index.cjs
CHANGED
|
@@ -19996,8 +19996,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
19996
19996
|
}
|
|
19997
19997
|
if (!mainCanvas || !refVideo || !previewVideo) return;
|
|
19998
19998
|
const mediaCanvas = mainCanvas;
|
|
19999
|
-
mediaCanvas
|
|
20000
|
-
mediaCanvas.height = refVideo.videoHeight;
|
|
19999
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
20001
20000
|
let ctx = mediaCanvas.getContext("2d");
|
|
20002
20001
|
let repeatMode = "no-repeat";
|
|
20003
20002
|
let firstFrameResolved = !doSegmentation;
|
|
@@ -20013,6 +20012,8 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
20013
20012
|
};
|
|
20014
20013
|
const onResults = (results) => {
|
|
20015
20014
|
try {
|
|
20015
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, results.image, refVideo);
|
|
20016
|
+
mediasfuShared.updateSegmentationModelForFrame(selfieSegmentation.value, mediaCanvas.width, mediaCanvas.height);
|
|
20016
20017
|
if (!pauseSegmentation.value && mediaCanvas && mediaCanvas.width > 0 && mediaCanvas.height > 0 && (useBlur || virtualImage && virtualImage.width > 0 && virtualImage.height > 0)) {
|
|
20017
20018
|
if (ctx) {
|
|
20018
20019
|
mediasfuShared.compositeVirtualBackgroundFrame({
|
|
@@ -20118,11 +20119,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
20118
20119
|
refVideo.play().catch(() => {
|
|
20119
20120
|
});
|
|
20120
20121
|
}
|
|
20121
|
-
|
|
20122
|
-
refVideo.width = currentSegmentVideo?.getVideoTracks()[0]?.getSettings().width || 0;
|
|
20123
|
-
refVideo.height = currentSegmentVideo?.getVideoTracks()[0]?.getSettings().height || 0;
|
|
20124
|
-
mediaCanvas.width = refVideo.width;
|
|
20125
|
-
mediaCanvas.height = refVideo.height;
|
|
20122
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
20126
20123
|
ctx = mediaCanvas.getContext("2d");
|
|
20127
20124
|
try {
|
|
20128
20125
|
if (doSegmentation) {
|
|
@@ -20171,11 +20168,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
20171
20168
|
}
|
|
20172
20169
|
}
|
|
20173
20170
|
}
|
|
20174
|
-
|
|
20175
|
-
refVideo.width = currentSegmentVideo?.getVideoTracks()[0]?.getSettings().width || 0;
|
|
20176
|
-
refVideo.height = currentSegmentVideo?.getVideoTracks()[0]?.getSettings().height || 0;
|
|
20177
|
-
mediaCanvas.width = refVideo.width;
|
|
20178
|
-
mediaCanvas.height = refVideo.height;
|
|
20171
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
20179
20172
|
ctx = mediaCanvas.getContext("2d");
|
|
20180
20173
|
try {
|
|
20181
20174
|
if (doSegmentation) {
|
|
@@ -20857,7 +20850,7 @@ const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
|
|
|
20857
20850
|
};
|
|
20858
20851
|
}
|
|
20859
20852
|
});
|
|
20860
|
-
const BackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-
|
|
20853
|
+
const BackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["__scopeId", "data-v-8a978fbd"]]);
|
|
20861
20854
|
const _hoisted_1$f = { class: "card-header" };
|
|
20862
20855
|
const _hoisted_2$c = { class: "room-title" };
|
|
20863
20856
|
const _hoisted_3$b = { class: "room-actions" };
|
|
@@ -47800,8 +47793,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47800
47793
|
});
|
|
47801
47794
|
}
|
|
47802
47795
|
const mediaCanvas = mainCanvas;
|
|
47803
|
-
mediaCanvas
|
|
47804
|
-
mediaCanvas.height = refVideo.videoHeight;
|
|
47796
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
47805
47797
|
const ctx = mediaCanvas.getContext("2d");
|
|
47806
47798
|
let repeatMode = "no-repeat";
|
|
47807
47799
|
let firstFrameResolved = !doSegmentation;
|
|
@@ -47817,6 +47809,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47817
47809
|
};
|
|
47818
47810
|
const onResults = (results) => {
|
|
47819
47811
|
try {
|
|
47812
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, results.image, refVideo);
|
|
47813
|
+
mediasfuShared.updateSegmentationModelForFrame(selfieSegmentation.value, mediaCanvas.width, mediaCanvas.height);
|
|
47820
47814
|
if (pauseSegmentation.value || !ctx || mediaCanvas.width <= 0 || mediaCanvas.height <= 0 || !useBlur && (virtualImage.width <= 0 || virtualImage.height <= 0)) {
|
|
47821
47815
|
return;
|
|
47822
47816
|
}
|
|
@@ -47920,10 +47914,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47920
47914
|
if (refVideo.paused) {
|
|
47921
47915
|
void refVideo.play().catch(() => void 0);
|
|
47922
47916
|
}
|
|
47923
|
-
|
|
47924
|
-
refVideo.height = segmentVideo.value?.getVideoTracks()[0]?.getSettings().height || 0;
|
|
47925
|
-
mediaCanvas.width = refVideo.width;
|
|
47926
|
-
mediaCanvas.height = refVideo.height;
|
|
47917
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
47927
47918
|
try {
|
|
47928
47919
|
if (doSegmentation) {
|
|
47929
47920
|
await segmentImage(refVideo);
|
|
@@ -47962,10 +47953,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47962
47953
|
void refVideo.play().catch(() => void 0);
|
|
47963
47954
|
}
|
|
47964
47955
|
}
|
|
47965
|
-
|
|
47966
|
-
refVideo.height = segmentVideo.value?.getVideoTracks()[0]?.getSettings().height || 0;
|
|
47967
|
-
mediaCanvas.width = refVideo.width;
|
|
47968
|
-
mediaCanvas.height = refVideo.height;
|
|
47956
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
47969
47957
|
try {
|
|
47970
47958
|
if (doSegmentation) {
|
|
47971
47959
|
await segmentImage(refVideo);
|
|
@@ -49032,7 +49020,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
49032
49020
|
};
|
|
49033
49021
|
}
|
|
49034
49022
|
});
|
|
49035
|
-
const ModernBackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
49023
|
+
const ModernBackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a2fde8df"]]);
|
|
49036
49024
|
const panelGradientBackground$1 = "linear-gradient(180deg, var(--ms-modern-panel-surface-elevated) 0%, var(--ms-modern-panel-surface) 100%)";
|
|
49037
49025
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
49038
49026
|
__name: "ModernConfirmHereModal",
|