mediasfu-vue 1.4.0 → 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 +12 -1
- package/dist/index.cjs +18 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -42
- package/dist/index.js.map +1 -1
- package/dist/mediasfu-vue.css +93 -93
- package/dist/types/ProducerClient/producerClientEmits/roomVideoPolicy.d.ts +1 -8
- package/dist/types/ProducerClient/producerClientEmits/updateRoomParametersClient.d.ts +1 -6
- package/dist/types/components/mediasfuComponents/MediasfuGeneric.vue.d.ts +0 -2
- package/package.json +2 -2
- package/src/ProducerClient/producerClientEmits/roomVideoPolicy.ts +5 -12
- package/src/ProducerClient/producerClientEmits/updateRoomParametersClient.ts +4 -8
- package/src/components/backgroundComponents/BackgroundModal.vue +9 -12
- package/src/components/mediasfuComponents/MediasfuGeneric.vue +0 -3
- package/src/modern/modal_components/ModernBackgroundModal.vue +149 -150
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
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
|
+
|
|
9
|
+
## 1.4.1 — 2026-10-27
|
|
10
|
+
|
|
11
|
+
- Requires `mediasfu-shared` 1.4.1 or later.
|
|
12
|
+
- **Camera bitrates are set by MediaSFU.** The `videoBitrateProfile` option added in 1.4.0 is removed; camera bitrates follow the room's quality tier. Apps that still pass it are unaffected: the value is ignored.
|
|
13
|
+
|
|
3
14
|
## 1.4.0 — 2026-10-27
|
|
4
15
|
|
|
5
16
|
- Requires `mediasfu-shared` 1.4.0 or later.
|
|
6
|
-
- **Leaner camera bitrates
|
|
17
|
+
- **Leaner camera bitrates.** Rooms now use camera bitrates sized for webcam content at each tier's frame rate (HD 2.25×, FHD 3× the SD ladder instead of 4× and 8×). This lowers bandwidth and cost and holds up better on weak links.
|
|
7
18
|
- **Smarter language pickers.** The translation settings modal groups listener languages by measured quality (natural voice, captions with a basic voice, captions only) and marks speaker languages as supported, beta or not offered. Ratings follow the room's preset, or a custom `{ stt, llm, tts }` stack passed as `languageCapabilityStack`.
|
|
8
19
|
- **From `mediasfu-shared` 1.4.0:** HLS playback failover (`getHlsPlaybackCandidates`, `fallbackSources` on `attachPlayback`), and leaving a room no longer throws when the disconnect handler mutes a stream that is already gone.
|
|
9
20
|
|
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" };
|
|
@@ -36952,13 +36945,9 @@ function applyCameraEncodingPolicy(params, singleEncoding) {
|
|
|
36952
36945
|
params.encodings = [encoding];
|
|
36953
36946
|
return params;
|
|
36954
36947
|
}
|
|
36955
|
-
const CAMERA_BITRATE_FACTORS = {
|
|
36956
|
-
|
|
36957
|
-
|
|
36958
|
-
};
|
|
36959
|
-
function cameraBitrateFactor(targetResolution, profile = "lean") {
|
|
36960
|
-
const table = CAMERA_BITRATE_FACTORS[profile === "rich" ? "rich" : "lean"];
|
|
36961
|
-
return table[String(targetResolution)] ?? table.sd;
|
|
36948
|
+
const CAMERA_BITRATE_FACTORS = { QnHD: 0.125, sd: 0.5625, hd: 2.25, fhd: 3, qhd: 10 };
|
|
36949
|
+
function cameraBitrateFactor(targetResolution) {
|
|
36950
|
+
return CAMERA_BITRATE_FACTORS[String(targetResolution)] ?? CAMERA_BITRATE_FACTORS.sd;
|
|
36962
36951
|
}
|
|
36963
36952
|
function scaleCameraBitrates(params, factor) {
|
|
36964
36953
|
if (factor === 1) return params;
|
|
@@ -36982,7 +36971,7 @@ function freshRoomVideoParams(current, fallback) {
|
|
|
36982
36971
|
baseParams.set(fresh, base);
|
|
36983
36972
|
return fresh;
|
|
36984
36973
|
}
|
|
36985
|
-
const updateRoomParametersClient = ({ parameters, simulcastOff = parameters.simulcastOff, roomCapacity = parameters.roomCapacity
|
|
36974
|
+
const updateRoomParametersClient = ({ parameters, simulcastOff = parameters.simulcastOff, roomCapacity = parameters.roomCapacity }) => {
|
|
36986
36975
|
try {
|
|
36987
36976
|
const {
|
|
36988
36977
|
screenPageLimit,
|
|
@@ -37123,7 +37112,7 @@ const updateRoomParametersClient = ({ parameters, simulcastOff = parameters.simu
|
|
|
37123
37112
|
} else if (targetResolution == "qhd") {
|
|
37124
37113
|
frameRateValue = mediasfuShared.qhdFrameRate;
|
|
37125
37114
|
}
|
|
37126
|
-
const bitrateFactor = cameraBitrateFactor(targetResolution
|
|
37115
|
+
const bitrateFactor = cameraBitrateFactor(targetResolution);
|
|
37127
37116
|
scaleCameraBitrates(vParamsValue, bitrateFactor);
|
|
37128
37117
|
scaleCameraBitrates(hParamsValue, bitrateFactor);
|
|
37129
37118
|
const singleCameraEncoding = cameraSimulcastOff(data.meetingRoomParams.type, data.capacity, {
|
|
@@ -37768,7 +37757,6 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
37768
37757
|
renderUIExternally: { type: Boolean, default: false },
|
|
37769
37758
|
externalUITarget: { default: "#mediasfu-modern-head" },
|
|
37770
37759
|
simulcastOff: { type: Boolean },
|
|
37771
|
-
videoBitrateProfile: {},
|
|
37772
37760
|
roomCapacity: {},
|
|
37773
37761
|
noUIPreJoinOptions: { default: void 0 },
|
|
37774
37762
|
joinMediaSFURoom: { type: Function, default: void 0 },
|
|
@@ -42225,7 +42213,6 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
42225
42213
|
try {
|
|
42226
42214
|
updateRoomParametersClient({
|
|
42227
42215
|
simulcastOff: props.simulcastOff,
|
|
42228
|
-
videoBitrateProfile: props.videoBitrateProfile,
|
|
42229
42216
|
roomCapacity: props.roomCapacity ?? (props.noUIPreJoinOptions && "capacity" in props.noUIPreJoinOptions ? props.noUIPreJoinOptions.capacity : void 0),
|
|
42230
42217
|
parameters: {
|
|
42231
42218
|
...allParameters.value,
|
|
@@ -43861,7 +43848,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
43861
43848
|
};
|
|
43862
43849
|
}
|
|
43863
43850
|
});
|
|
43864
|
-
const MediasfuGeneric = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-
|
|
43851
|
+
const MediasfuGeneric = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-545c61b9"]]);
|
|
43865
43852
|
const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
43866
43853
|
__name: "MediasfuBroadcast",
|
|
43867
43854
|
props: {
|
|
@@ -43879,7 +43866,6 @@ const _sfc_main$q = /* @__PURE__ */ vue.defineComponent({
|
|
|
43879
43866
|
renderUIExternally: { type: Boolean },
|
|
43880
43867
|
externalUITarget: {},
|
|
43881
43868
|
simulcastOff: { type: Boolean },
|
|
43882
|
-
videoBitrateProfile: {},
|
|
43883
43869
|
roomCapacity: {},
|
|
43884
43870
|
noUIPreJoinOptions: {},
|
|
43885
43871
|
joinMediaSFURoom: {},
|
|
@@ -43925,7 +43911,6 @@ const _sfc_main$p = /* @__PURE__ */ vue.defineComponent({
|
|
|
43925
43911
|
renderUIExternally: { type: Boolean },
|
|
43926
43912
|
externalUITarget: {},
|
|
43927
43913
|
simulcastOff: { type: Boolean },
|
|
43928
|
-
videoBitrateProfile: {},
|
|
43929
43914
|
roomCapacity: {},
|
|
43930
43915
|
noUIPreJoinOptions: {},
|
|
43931
43916
|
joinMediaSFURoom: {},
|
|
@@ -43971,7 +43956,6 @@ const _sfc_main$o = /* @__PURE__ */ vue.defineComponent({
|
|
|
43971
43956
|
renderUIExternally: { type: Boolean },
|
|
43972
43957
|
externalUITarget: {},
|
|
43973
43958
|
simulcastOff: { type: Boolean },
|
|
43974
|
-
videoBitrateProfile: {},
|
|
43975
43959
|
roomCapacity: {},
|
|
43976
43960
|
noUIPreJoinOptions: {},
|
|
43977
43961
|
joinMediaSFURoom: {},
|
|
@@ -44017,7 +44001,6 @@ const _sfc_main$n = /* @__PURE__ */ vue.defineComponent({
|
|
|
44017
44001
|
renderUIExternally: { type: Boolean },
|
|
44018
44002
|
externalUITarget: {},
|
|
44019
44003
|
simulcastOff: { type: Boolean },
|
|
44020
|
-
videoBitrateProfile: {},
|
|
44021
44004
|
roomCapacity: {},
|
|
44022
44005
|
noUIPreJoinOptions: {},
|
|
44023
44006
|
joinMediaSFURoom: {},
|
|
@@ -47810,8 +47793,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47810
47793
|
});
|
|
47811
47794
|
}
|
|
47812
47795
|
const mediaCanvas = mainCanvas;
|
|
47813
|
-
mediaCanvas
|
|
47814
|
-
mediaCanvas.height = refVideo.videoHeight;
|
|
47796
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
47815
47797
|
const ctx = mediaCanvas.getContext("2d");
|
|
47816
47798
|
let repeatMode = "no-repeat";
|
|
47817
47799
|
let firstFrameResolved = !doSegmentation;
|
|
@@ -47827,6 +47809,8 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47827
47809
|
};
|
|
47828
47810
|
const onResults = (results) => {
|
|
47829
47811
|
try {
|
|
47812
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, results.image, refVideo);
|
|
47813
|
+
mediasfuShared.updateSegmentationModelForFrame(selfieSegmentation.value, mediaCanvas.width, mediaCanvas.height);
|
|
47830
47814
|
if (pauseSegmentation.value || !ctx || mediaCanvas.width <= 0 || mediaCanvas.height <= 0 || !useBlur && (virtualImage.width <= 0 || virtualImage.height <= 0)) {
|
|
47831
47815
|
return;
|
|
47832
47816
|
}
|
|
@@ -47930,10 +47914,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47930
47914
|
if (refVideo.paused) {
|
|
47931
47915
|
void refVideo.play().catch(() => void 0);
|
|
47932
47916
|
}
|
|
47933
|
-
|
|
47934
|
-
refVideo.height = segmentVideo.value?.getVideoTracks()[0]?.getSettings().height || 0;
|
|
47935
|
-
mediaCanvas.width = refVideo.width;
|
|
47936
|
-
mediaCanvas.height = refVideo.height;
|
|
47917
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
47937
47918
|
try {
|
|
47938
47919
|
if (doSegmentation) {
|
|
47939
47920
|
await segmentImage(refVideo);
|
|
@@ -47972,10 +47953,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
47972
47953
|
void refVideo.play().catch(() => void 0);
|
|
47973
47954
|
}
|
|
47974
47955
|
}
|
|
47975
|
-
|
|
47976
|
-
refVideo.height = segmentVideo.value?.getVideoTracks()[0]?.getSettings().height || 0;
|
|
47977
|
-
mediaCanvas.width = refVideo.width;
|
|
47978
|
-
mediaCanvas.height = refVideo.height;
|
|
47956
|
+
mediasfuShared.syncVirtualBackgroundCanvasSize(mediaCanvas, refVideo);
|
|
47979
47957
|
try {
|
|
47980
47958
|
if (doSegmentation) {
|
|
47981
47959
|
await segmentImage(refVideo);
|
|
@@ -49042,7 +49020,7 @@ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
|
|
|
49042
49020
|
};
|
|
49043
49021
|
}
|
|
49044
49022
|
});
|
|
49045
|
-
const ModernBackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
49023
|
+
const ModernBackgroundModal = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a2fde8df"]]);
|
|
49046
49024
|
const panelGradientBackground$1 = "linear-gradient(180deg, var(--ms-modern-panel-surface-elevated) 0%, var(--ms-modern-panel-surface) 100%)";
|
|
49047
49025
|
const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
|
|
49048
49026
|
__name: "ModernConfirmHereModal",
|
|
@@ -49782,7 +49760,6 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
49782
49760
|
renderUIExternally: { type: Boolean },
|
|
49783
49761
|
externalUITarget: {},
|
|
49784
49762
|
simulcastOff: { type: Boolean },
|
|
49785
|
-
videoBitrateProfile: {},
|
|
49786
49763
|
roomCapacity: {},
|
|
49787
49764
|
noUIPreJoinOptions: {},
|
|
49788
49765
|
joinMediaSFURoom: {},
|