@pexip/media-control 17.4.0 → 18.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 18.1.0
4
+
5
+ ## 18.0.0
6
+
7
+ ### Minor Changes
8
+
9
+ - 79d02d8: Allow triggering new GUM if the track is muted.
10
+ - bfb8058: Add `maskCombineRatio` Constraint
11
+
12
+ - Add `maskCombineRatio` Constraint
13
+ - Rename bgImageUrl to backgroundImageUrl
14
+ https://gitlab.com/pexip/zoo/-/issues/2776
15
+ - Remove `flipHorizontal`
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [bfb8058]
20
+ - @pexip/utils@16.11.0
21
+
3
22
  ## 17.4.0
4
23
 
5
24
  ### Minor Changes
@@ -143,7 +143,7 @@ type Constraints = ConstrainStrings & ConstrainNumbers & ConstrainBooleans & Con
143
143
  * expect(noiseSuppressionParam).toEqual('ideal');
144
144
  * ```
145
145
  */
146
- export declare const extractConstraintsWithKeys: <T extends "deviceId" | "groupId" | "device" | "videoSegmentation" | "videoSegmentationModel" | "denoise" | "vad" | "asd" | "mixWithAdditionalMedia" | "flipHorizontal" | "bgImageUrl" | "resizeMode" | "pan" | "tilt" | "zoom" | "contentHint" | "facingMode" | "echoCancellation" | "autoGainControl" | "noiseSuppression" | ConstrainNumberKeys>(keys: T[]) => (constraints: InputDeviceConstraint | undefined) => Pick<Constraints, T>;
146
+ export declare const extractConstraintsWithKeys: <T extends "deviceId" | "groupId" | "device" | "videoSegmentation" | "videoSegmentationModel" | "denoise" | "vad" | "asd" | "mixWithAdditionalMedia" | "backgroundImageUrl" | "resizeMode" | "pan" | "tilt" | "zoom" | "contentHint" | "facingMode" | "echoCancellation" | "autoGainControl" | "noiseSuppression" | ConstrainNumberKeys>(keys: readonly T[]) => (constraints: InputDeviceConstraint | undefined) => Pick<Constraints, T>;
147
147
  /**
148
148
  * Extract deviceId from constraints
149
149
  */
package/dist/devices.js CHANGED
@@ -340,7 +340,7 @@ export const shouldRequestDevice = (request, tracks, currentDevices) => {
340
340
  }
341
341
  const [track] = tracks;
342
342
  if (tracks.length === 0 ||
343
- tracks.some(track => track.readyState === 'ended')) {
343
+ tracks.some(track => track.readyState === 'ended' || track.muted)) {
344
344
  return true;
345
345
  }
346
346
  if (isRequestedInputTrack(request, track)) {
@@ -17,7 +17,7 @@ export declare const isFloat: (t: unknown) => t is number;
17
17
  * Reference https://w3c.github.io/mediacapture-main/#dom-mediatrackconstraintset
18
18
  */
19
19
  export declare const CONSTRAIN_STRING_KEYS: readonly ["facingMode", "resizeMode", "deviceId", "groupId"];
20
- export declare const EXTENDED_CONSTRAIN_STRING_KEYS: readonly ["videoSegmentation", "videoSegmentationModel", "bgImageUrl", "contentHint"];
20
+ export declare const EXTENDED_CONSTRAIN_STRING_KEYS: readonly ["videoSegmentation", "videoSegmentationModel", "backgroundImageUrl", "contentHint"];
21
21
  export type ExtendedConstrainStringKeys = (typeof EXTENDED_CONSTRAIN_STRING_KEYS)[number];
22
22
  export type ConstrainStringKeys = (typeof CONSTRAIN_STRING_KEYS)[number];
23
23
  export declare const CONSTRAIN_U_LONG_KEYS: readonly ["width", "height", "sampleRate", "sampleSize", "channelCount"];
@@ -25,7 +25,7 @@ export declare const EXTENDED_CONSTRAIN_U_LONG_KEYS: readonly ["backgroundBlurAm
25
25
  export type ExtendedConstrainULongKeys = (typeof EXTENDED_CONSTRAIN_U_LONG_KEYS)[number];
26
26
  export type ConstrainULongKeys = (typeof CONSTRAIN_U_LONG_KEYS)[number];
27
27
  export declare const CONSTRAIN_DOUBLE_KEYS: readonly ["aspectRatio", "frameRate", "latency"];
28
- export declare const EXTENDED_CONSTRAIN_DOUBLE_KEYS: readonly ["foregroundThreshold"];
28
+ export declare const EXTENDED_CONSTRAIN_DOUBLE_KEYS: readonly ["foregroundThreshold", "maskCombineRatio"];
29
29
  export type ExtendedConstrainDoubleKeys = (typeof EXTENDED_CONSTRAIN_DOUBLE_KEYS)[number];
30
30
  export type ConstrainDoubleKeys = (typeof CONSTRAIN_DOUBLE_KEYS)[number];
31
31
  export declare const CONSTRAIN_BOOLEAN_KEYS: readonly ["echoCancellation", "autoGainControl", "noiseSuppression", "pan", "tilt", "zoom"];
@@ -33,7 +33,7 @@ export declare const CONSTRAIN_BOOLEAN_KEYS: readonly ["echoCancellation", "auto
33
33
  * Extends boolean constraint keys for our own implementation of the media
34
34
  * feature
35
35
  */
36
- export declare const EXTENDED_CONSTRAIN_BOOLEAN_KEYS: readonly ["vad", "asd", "mixWithAdditionalMedia", "denoise", "flipHorizontal"];
36
+ export declare const EXTENDED_CONSTRAIN_BOOLEAN_KEYS: readonly ["vad", "asd", "mixWithAdditionalMedia", "denoise"];
37
37
  export type ExtendedConstrainBooleanKeys = (typeof EXTENDED_CONSTRAIN_BOOLEAN_KEYS)[number];
38
38
  export type ConstrainBooleanKeys = (typeof CONSTRAIN_BOOLEAN_KEYS)[number];
39
39
  /**
@@ -41,13 +41,13 @@ export type ConstrainBooleanKeys = (typeof CONSTRAIN_BOOLEAN_KEYS)[number];
41
41
  */
42
42
  export declare const CONSTRAINT_SET_KEYS: readonly ["aspectRatio", "frameRate", "latency", "width", "height", "sampleRate", "sampleSize", "channelCount", "facingMode", "resizeMode", "deviceId", "groupId", "echoCancellation", "autoGainControl", "noiseSuppression", "pan", "tilt", "zoom"];
43
43
  export declare const isConstrainStringKeys: (t: unknown) => t is "deviceId" | "groupId" | "resizeMode" | "facingMode";
44
- export declare const isExtendedConstrainStringKeys: (t: unknown) => t is "videoSegmentation" | "videoSegmentationModel" | "bgImageUrl" | "contentHint";
44
+ export declare const isExtendedConstrainStringKeys: (t: unknown) => t is "videoSegmentation" | "videoSegmentationModel" | "backgroundImageUrl" | "contentHint";
45
45
  export declare const isConstrainULongKeys: (t: unknown) => t is "width" | "height" | "sampleRate" | "sampleSize" | "channelCount";
46
46
  export declare const isExtendedConstrainULongKeys: (t: unknown) => t is "backgroundBlurAmount" | "edgeBlurAmount";
47
47
  export declare const isConstrainDoubleKeys: (t: unknown) => t is "aspectRatio" | "frameRate" | "latency";
48
- export declare const isExtendedConstrainDoubleKeys: (t: unknown) => t is "foregroundThreshold";
48
+ export declare const isExtendedConstrainDoubleKeys: (t: unknown) => t is "foregroundThreshold" | "maskCombineRatio";
49
49
  export declare const isConstrainBooleanKeys: (t: unknown) => t is "pan" | "tilt" | "zoom" | "echoCancellation" | "autoGainControl" | "noiseSuppression";
50
- export declare const isExtendedConstrainBooleanKeys: (t: unknown) => t is "denoise" | "vad" | "asd" | "mixWithAdditionalMedia" | "flipHorizontal";
50
+ export declare const isExtendedConstrainBooleanKeys: (t: unknown) => t is "denoise" | "vad" | "asd" | "mixWithAdditionalMedia";
51
51
  export declare const isMediaTrackConstraintSetKey: (t: string) => t is keyof MediaTrackConstraintSet;
52
52
  export declare const isMediaTrackConstraintsKey: (t: string) => t is keyof MediaTrackConstraints;
53
53
  export declare const isMediaTrackConstraints: (t: unknown) => t is MediaTrackConstraints;
@@ -26,7 +26,7 @@ export const CONSTRAIN_STRING_KEYS = [
26
26
  export const EXTENDED_CONSTRAIN_STRING_KEYS = [
27
27
  'videoSegmentation',
28
28
  'videoSegmentationModel',
29
- 'bgImageUrl',
29
+ 'backgroundImageUrl',
30
30
  'contentHint',
31
31
  ];
32
32
  export const CONSTRAIN_U_LONG_KEYS = [
@@ -45,7 +45,10 @@ export const CONSTRAIN_DOUBLE_KEYS = [
45
45
  'frameRate',
46
46
  'latency',
47
47
  ];
48
- export const EXTENDED_CONSTRAIN_DOUBLE_KEYS = ['foregroundThreshold'];
48
+ export const EXTENDED_CONSTRAIN_DOUBLE_KEYS = [
49
+ 'foregroundThreshold',
50
+ 'maskCombineRatio',
51
+ ];
49
52
  export const CONSTRAIN_BOOLEAN_KEYS = [
50
53
  'echoCancellation',
51
54
  'autoGainControl',
@@ -67,8 +70,6 @@ export const EXTENDED_CONSTRAIN_BOOLEAN_KEYS = [
67
70
  'mixWithAdditionalMedia',
68
71
  // Noise Suppression using our own impl
69
72
  'denoise',
70
- // Flip the video horizontally
71
- 'flipHorizontal',
72
73
  ];
73
74
  /**
74
75
  * The keys from the `MediaTrackConstraintSet`
package/dist/types.d.ts CHANGED
@@ -51,10 +51,6 @@ export interface InputConstraintSet extends MediaTrackConstraints {
51
51
  * hardware muted or unusable
52
52
  */
53
53
  mixWithAdditionalMedia?: ConstrainBoolean;
54
- /**
55
- * Flip the video horizontally
56
- */
57
- flipHorizontal?: ConstrainBoolean;
58
54
  /**
59
55
  * Blur size/level parameter when using video segmentation with `blur`
60
56
  * effects
@@ -71,7 +67,11 @@ export interface InputConstraintSet extends MediaTrackConstraints {
71
67
  /**
72
68
  * Image Url that is being used for video overlay effects
73
69
  */
74
- bgImageUrl?: ConstrainDOMString;
70
+ backgroundImageUrl?: ConstrainDOMString;
71
+ /**
72
+ * The ratio to be used for smoothing segmentation mask
73
+ */
74
+ maskCombineRatio?: ConstrainDouble;
75
75
  /**
76
76
  * Image Url that is being used for video overlay effects
77
77
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pexip/media-control",
3
- "version": "17.4.0",
3
+ "version": "18.1.0",
4
4
  "homepage": "https://gitlab.com/pexip/zoo",
5
5
  "bugs": "https://gitlab.com/pexip/zoo/issues",
6
6
  "repository": {
@@ -26,11 +26,11 @@
26
26
  "typecheck": "yarn tsc --noEmit -p tsconfig.build.json"
27
27
  },
28
28
  "dependencies": {
29
- "@pexip/utils": "16.10.0"
29
+ "@pexip/utils": "16.11.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@jest/globals": "^29.7.0",
33
- "@pexip/bundler": "16.6.0",
33
+ "@pexip/bundler": "16.6.1",
34
34
  "@types/core-js": "^2.5.3",
35
35
  "@types/prettier": "^2.0.2",
36
36
  "@types/uuid": "^8.3.0",