@pexip/media-control 21.0.0 → 22.0.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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 22.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 498ff3b: - **`extractConstraints` newly exported**
8
+ - **`videoSegmentationModel`** removed from `EXTENDED_CONSTRAIN_STRING_KEYS`
9
+ and `InputConstraintSet`.
10
+
11
+ ### Patch Changes
12
+
13
+ - fb41d4d: Changes related to Typescript V6 Upgrade
14
+ - Updated dependencies [498ff3b]
15
+ - Updated dependencies [fb41d4d]
16
+ - Updated dependencies [b99c070]
17
+ - @pexip/utils@17.3.0
18
+
3
19
  ## 21.0.0
4
20
 
5
21
  ### Minor Changes
@@ -319,6 +319,7 @@ which devices are delivered, fail, or exist.
319
319
  | [getFacingModeFromConstraintString](functions/getFacingModeFromConstraintString.mdx) | - |
320
320
  | [resolveMediaDeviceConstraints](functions/resolveMediaDeviceConstraints.mdx) | Resolve *constraints* and mediaTrackConstraints by checking the type and try to return the best possible from mediaTrackConstraints. |
321
321
  | [applyConstraints](functions/applyConstraints.mdx) | Call applyConstraints foreach track accordingly |
322
+ | [extractConstraints](functions/extractConstraints.mdx) | - |
322
323
  | [extractConstraintsWithKeys](functions/extractConstraintsWithKeys.mdx) | Extract the constraints with provided keys |
323
324
  | [findDeviceFromConstraints](functions/findDeviceFromConstraints.mdx) | Find device from the device list with provided constraints |
324
325
  | [relaxInputConstraint](functions/relaxInputConstraint.mdx) | Relax input constraints to enable looking up the device by `deviceId` as well as `label` as a fallback as a best effort to get a similar device when possible. If the the device is found we will use the `exact` constraint otherwise we will use the `ideal`. |
@@ -0,0 +1,87 @@
1
+ ## Call Signature
2
+
3
+ ```ts
4
+ function extractConstraints<T>(key): ExtractConstraintFn<ConstrainDeviceTuple>;
5
+ ```
6
+
7
+ ### Type Parameters
8
+
9
+ | Type Parameter |
10
+ | ------ |
11
+ | `T` *extends* `"device"` |
12
+
13
+ ### Parameters
14
+
15
+ | Parameter | Type |
16
+ | ------ | ------ |
17
+ | `key` | `T` |
18
+
19
+ ### Returns
20
+
21
+ `ExtractConstraintFn`\<`ConstrainDeviceTuple`\>
22
+
23
+ ## Call Signature
24
+
25
+ ```ts
26
+ function extractConstraints<T>(key): ExtractConstraintFn<ConstrainStringTuple>;
27
+ ```
28
+
29
+ ### Type Parameters
30
+
31
+ | Type Parameter |
32
+ | ------ |
33
+ | `T` *extends* \| `"deviceId"` \| `"groupId"` \| `"videoSegmentation"` \| `"backgroundImageUrl"` \| `"resizeMode"` \| `"contentHint"` \| `"facingMode"` |
34
+
35
+ ### Parameters
36
+
37
+ | Parameter | Type |
38
+ | ------ | ------ |
39
+ | `key` | `T` |
40
+
41
+ ### Returns
42
+
43
+ `ExtractConstraintFn`\<`ConstrainStringTuple`\>
44
+
45
+ ## Call Signature
46
+
47
+ ```ts
48
+ function extractConstraints<T>(key): ExtractConstraintFn<ConstrainNumberTuple>;
49
+ ```
50
+
51
+ ### Type Parameters
52
+
53
+ | Type Parameter |
54
+ | ------ |
55
+ | `T` *extends* `ConstrainNumberKeys` |
56
+
57
+ ### Parameters
58
+
59
+ | Parameter | Type |
60
+ | ------ | ------ |
61
+ | `key` | `T` |
62
+
63
+ ### Returns
64
+
65
+ `ExtractConstraintFn`\<`ConstrainNumberTuple`\>
66
+
67
+ ## Call Signature
68
+
69
+ ```ts
70
+ function extractConstraints<T>(key): ExtractConstraintFn<ConstrainBooleanTuple>;
71
+ ```
72
+
73
+ ### Type Parameters
74
+
75
+ | Type Parameter |
76
+ | ------ |
77
+ | `T` *extends* \| `"denoise"` \| `"vad"` \| `"asd"` \| `"mixWithAdditionalMedia"` \| `"excludeBystanders"` \| `"pan"` \| `"tilt"` \| `"zoom"` \| `"echoCancellation"` \| `"autoGainControl"` \| `"noiseSuppression"` |
78
+
79
+ ### Parameters
80
+
81
+ | Parameter | Type |
82
+ | ------ | ------ |
83
+ | `key` | `T` |
84
+
85
+ ### Returns
86
+
87
+ `ExtractConstraintFn`\<`ConstrainBooleanTuple`\>
@@ -8,7 +8,7 @@ Extract the constraints with provided keys
8
8
 
9
9
  | Type Parameter |
10
10
  | ------ |
11
- | `T` *extends* \| `"deviceId"` \| `"groupId"` \| `"device"` \| `"videoSegmentation"` \| `"videoSegmentationModel"` \| `"denoise"` \| `"vad"` \| `"asd"` \| `"mixWithAdditionalMedia"` \| `"backgroundImageUrl"` \| `"excludeBystanders"` \| `"resizeMode"` \| `"pan"` \| `"tilt"` \| `"zoom"` \| `"contentHint"` \| `"facingMode"` \| `"echoCancellation"` \| `"autoGainControl"` \| `"noiseSuppression"` \| `ConstrainNumberKeys` |
11
+ | `T` *extends* \| `"deviceId"` \| `"groupId"` \| `"device"` \| `"videoSegmentation"` \| `"denoise"` \| `"vad"` \| `"asd"` \| `"mixWithAdditionalMedia"` \| `"backgroundImageUrl"` \| `"excludeBystanders"` \| `"resizeMode"` \| `"pan"` \| `"tilt"` \| `"zoom"` \| `"contentHint"` \| `"facingMode"` \| `"echoCancellation"` \| `"autoGainControl"` \| `"noiseSuppression"` \| `ConstrainNumberKeys` |
12
12
 
13
13
  ## Parameters
14
14
 
@@ -8,7 +8,6 @@
8
8
  | ------ | ------ | ------ | ------ |
9
9
  | <a id="device"></a> `device?` | `DeviceConstraint` \| `ConstraintDeviceParameters` | Same purpose as `deviceId` but it gives more information about the device so that we can have extra tolerance on device selection | - |
10
10
  | <a id="videosegmentation"></a> `videoSegmentation?` | `ConstrainDOMString` | Whether or not using video segmentation, e.g. background blur/replacement, to specify the effects, intended to be applied to the segment. Available effects are `none`, `blur`, `overlay` or `remove` | - |
11
- | <a id="videosegmentationmodel"></a> `videoSegmentationModel?` | `ConstrainDOMString` | Segmentation model to be used for video segmentation, currently only supports `mediapipeSelfie` and `personify` | - |
12
11
  | <a id="denoise"></a> `denoise?` | `ConstrainBoolean` | Whether or not using our own noise suppression | - |
13
12
  | <a id="vad"></a> `vad?` | `ConstrainBoolean` | Voice Activity Detection | - |
14
13
  | <a id="asd"></a> `asd?` | `ConstrainBoolean` | Audio Signal Detection for the purpose of checking if the audio input is hardware muted or unusable | - |
@@ -38,15 +37,13 @@
38
37
  | <a id="tilt"></a> `tilt?` | `boolean` | - | - |
39
38
  | <a id="zoom"></a> `zoom?` | `boolean` | - | - |
40
39
  | <a id="contenthint"></a> `contentHint?` | `ConstrainDOMString` | Content Hint for the track to apply | - |
41
- | <a id="volume"></a> `volume?` | `ConstrainNumber` | - | `MediaTrackConstraints.volume` |
42
- | <a id="latency"></a> `latency?` | `ConstrainNumber` | - | `MediaTrackConstraints.latency` |
43
40
  | <a id="aspectratio"></a> `aspectRatio?` | `ConstrainDouble` | - | `MediaTrackConstraints.aspectRatio` |
44
41
  | <a id="autogaincontrol"></a> `autoGainControl?` | `ConstrainBoolean` | - | `MediaTrackConstraints.autoGainControl` |
45
42
  | <a id="backgroundblur"></a> `backgroundBlur?` | `ConstrainBoolean` | - | `MediaTrackConstraints.backgroundBlur` |
46
43
  | <a id="channelcount"></a> `channelCount?` | `ConstrainULong` | - | `MediaTrackConstraints.channelCount` |
47
44
  | <a id="deviceid"></a> `deviceId?` | `ConstrainDOMString` | - | `MediaTrackConstraints.deviceId` |
48
45
  | <a id="displaysurface"></a> `displaySurface?` | `ConstrainDOMString` | - | `MediaTrackConstraints.displaySurface` |
49
- | <a id="echocancellation"></a> `echoCancellation?` | `ConstrainBoolean` | - | `MediaTrackConstraints.echoCancellation` |
46
+ | <a id="echocancellation"></a> `echoCancellation?` | `ConstrainBooleanOrDOMString` | - | `MediaTrackConstraints.echoCancellation` |
50
47
  | <a id="facingmode"></a> `facingMode?` | `ConstrainDOMString` | - | `MediaTrackConstraints.facingMode` |
51
48
  | <a id="framerate"></a> `frameRate?` | `ConstrainDouble` | - | `MediaTrackConstraints.frameRate` |
52
49
  | <a id="groupid"></a> `groupId?` | `ConstrainDOMString` | - | `MediaTrackConstraints.groupId` |
@@ -213,7 +213,6 @@ export const extractConstrainBoolean = (key) => (constraints) => {
213
213
  return NONE;
214
214
  };
215
215
  export const extractConstrainNumber = (key) => (constraints) => {
216
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- @typescript-eslint and Typescript 5 issue.
217
216
  const constraint = constraints[key];
218
217
  if (constraint === undefined || constraint === null) {
219
218
  return NONE;
package/dist/devices.js CHANGED
@@ -441,7 +441,6 @@ export const queryPermissionFallback = async (name, everActiveTrack = false, get
441
441
  };
442
442
  export const queryPermission = async (name, everActiveTrack = false, getDevices = () => navigator.mediaDevices.enumerateDevices()) => {
443
443
  try {
444
- // @ts-expect-error -- Typings/dom.d.ts change blocks upgrade to typescript 4.4
445
444
  const { state } = await navigator.permissions.query({ name });
446
445
  // Firefox v133 added permission API but always returns granted but
447
446
  // based on the device label, it is actually not granted, so we need to
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { DeviceChangedChanges, areMultipleFacingModeSupported, areTracksEnabled, createTrackDevicesChanges, deviceChanged, findAudioInputDevices, findAudioOutputDevices, findCurrentAudioOutputId, findCurrentVideoInputDeviceIdFromStream, findDeviceWithDeviceId, findDevicesByKind, findMediaInputFromMediaStreamTrack, findMediaInputFromStream, findPermissionGrantedDevices, findVideoInputDevices, getDevices, getInputDevicePermissionState, hasAnyGrantedInput, hasAnyInputs, hasAudioInputs, hasAudioOrVideoInputs, hasChangedInput, hasRequestingDevice, hasVideoInputs, interpretCurrentFacingMode, isRequestedInputDevice, isRequestedInputTrack, isRequestedResolution, isStreamingRequestedDevices, isStreamingRequestedDevicesBase, isStreamingRequestingDevice, isTrackMutedOrEnded, muteStreamTrack, shouldRequestDevice, stopMediaStream, toKey, toMediaDeviceInfo, toMediaDeviceInfoLike, toMediaDeviceInputKind } from './devices';
11
11
  import { compareDevices, createIndexedDevices, findDevice, getDeviceId, isAudioInput, isAudioOutput, isDeviceGranted, isVideoInput, reverseDeviceId } from './utils';
12
- import { applyConstraints, extractConstrainDevice, extractConstraintsWithKeys, findDeviceFromConstraints, getFacingModeFromConstraintString, getValueFromConstrainNumber, isExactDeviceConstraint, mergeConstraints, relaxInputConstraint, resolveMediaDeviceConstraints } from './constraints';
12
+ import { applyConstraints, extractConstrainDevice, extractConstraints, extractConstraintsWithKeys, findDeviceFromConstraints, getFacingModeFromConstraintString, getValueFromConstrainNumber, isExactDeviceConstraint, mergeConstraints, relaxInputConstraint, resolveMediaDeviceConstraints } from './constraints';
13
13
  import { MediaEvent, Events, MediaEventType } from './eventEmitter';
14
14
  import { createStreamTrackEventSubscriptions } from './streams';
15
15
  import { DisplayMediaOptions, FacingMode, IndexedDevices, InputConstraintSet, InputDeviceConstraint, MediaDeviceFailure, MediaDeviceInfoLike, MediaDeviceKinds, MediaDeviceRequest, MediaInput, MediaStreamTrackLike, StreamTrackEventHandlers, Unsubscribe } from './types';
@@ -33,7 +33,7 @@ setDefaultConstraints: (newConstraints: MediaStreamConstraints) => void,
33
33
  */
34
34
  subscribe: (listener: (event: MediaEvent) => void) => () => void;
35
35
  export { getUserMedia, setDefaultConstraints, subscribe };
36
- export { DeviceChangedChanges, DisplayMediaOptions, Events, FacingMode, IndexedDevices, InputConstraintSet, InputDeviceConstraint, MediaDeviceFailure, MediaDeviceInfoLike, MediaDeviceKinds, MediaDeviceRequest, MediaEvent, MediaEventType, MediaInput, MediaStreamTrackLike, StreamTrackEventHandlers, Unsubscribe, applyConstraints, areMultipleFacingModeSupported, areTracksEnabled, compareDevices, createIndexedDevices, createStreamTrackEventSubscriptions, createTrackDevicesChanges, deviceChanged, extractConstrainDevice, extractConstraintsWithKeys, findAudioInputDevices, findAudioOutputDevices, findCurrentAudioOutputId, findCurrentVideoInputDeviceIdFromStream, findDevice, findDeviceFromConstraints, findDeviceWithDeviceId, findDevicesByKind, findMediaInputFromMediaStreamTrack, findMediaInputFromStream, findPermissionGrantedDevices, findVideoInputDevices, getDeviceId, getDevices, getFacingModeFromConstraintString, getInputDevicePermissionState, getValueFromConstrainNumber, hasAnyGrantedInput, hasAnyInputs, hasAudioInputs, hasAudioOrVideoInputs, hasChangedInput, hasRequestingDevice, hasVideoInputs, interpretCurrentFacingMode, isAudioInput, isAudioOutput, isDeviceGranted, isExactDeviceConstraint, isFacingMode, isIndexedDevices, isInputConstraintSet, isMediaDeviceInfo, isMediaDeviceInfoArray, isMediaStreamTrack, isRequestedInputDevice, isRequestedInputTrack, isRequestedResolution, isStreamingRequestedDevices, isStreamingRequestedDevicesBase, isStreamingRequestingDevice, isTrackMutedOrEnded, isVideoInput, mergeConstraints, muteStreamTrack, relaxInputConstraint, resolveMediaDeviceConstraints, reverseDeviceId, shouldRequestDevice, stopMediaStream, toKey, toMediaDeviceInfo, toMediaDeviceInfoLike, toMediaDeviceInputKind, };
36
+ export { DeviceChangedChanges, DisplayMediaOptions, Events, FacingMode, IndexedDevices, InputConstraintSet, InputDeviceConstraint, MediaDeviceFailure, MediaDeviceInfoLike, MediaDeviceKinds, MediaDeviceRequest, MediaEvent, MediaEventType, MediaInput, MediaStreamTrackLike, StreamTrackEventHandlers, Unsubscribe, applyConstraints, areMultipleFacingModeSupported, areTracksEnabled, compareDevices, createIndexedDevices, createStreamTrackEventSubscriptions, createTrackDevicesChanges, deviceChanged, extractConstrainDevice, extractConstraints, extractConstraintsWithKeys, findAudioInputDevices, findAudioOutputDevices, findCurrentAudioOutputId, findCurrentVideoInputDeviceIdFromStream, findDevice, findDeviceFromConstraints, findDeviceWithDeviceId, findDevicesByKind, findMediaInputFromMediaStreamTrack, findMediaInputFromStream, findPermissionGrantedDevices, findVideoInputDevices, getDeviceId, getDevices, getFacingModeFromConstraintString, getInputDevicePermissionState, getValueFromConstrainNumber, hasAnyGrantedInput, hasAnyInputs, hasAudioInputs, hasAudioOrVideoInputs, hasChangedInput, hasRequestingDevice, hasVideoInputs, interpretCurrentFacingMode, isAudioInput, isAudioOutput, isDeviceGranted, isExactDeviceConstraint, isFacingMode, isIndexedDevices, isInputConstraintSet, isMediaDeviceInfo, isMediaDeviceInfoArray, isMediaStreamTrack, isRequestedInputDevice, isRequestedInputTrack, isRequestedResolution, isStreamingRequestedDevices, isStreamingRequestedDevicesBase, isStreamingRequestingDevice, isTrackMutedOrEnded, isVideoInput, mergeConstraints, muteStreamTrack, relaxInputConstraint, resolveMediaDeviceConstraints, reverseDeviceId, shouldRequestDevice, stopMediaStream, toKey, toMediaDeviceInfo, toMediaDeviceInfoLike, toMediaDeviceInputKind, };
37
37
  export * from './constants';
38
38
  export * from './displayMedia';
39
39
  /**
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { areMultipleFacingModeSupported, areTracksEnabled, createTrackDevicesChanges, deviceChanged, findAudioInputDevices, findAudioOutputDevices, findCurrentAudioOutputId, findCurrentVideoInputDeviceIdFromStream, findDeviceWithDeviceId, findDevicesByKind, findMediaInputFromMediaStreamTrack, findMediaInputFromStream, findPermissionGrantedDevices, findVideoInputDevices, getDevices, getInputDevicePermissionState, hasAnyGrantedInput, hasAnyInputs, hasAudioInputs, hasAudioOrVideoInputs, hasChangedInput, hasRequestingDevice, hasVideoInputs, interpretCurrentFacingMode, isRequestedInputDevice, isRequestedInputTrack, isRequestedResolution, isStreamingRequestedDevices, isStreamingRequestedDevicesBase, isStreamingRequestingDevice, isTrackMutedOrEnded, muteStreamTrack, shouldRequestDevice, stopMediaStream, toKey, toMediaDeviceInfo, toMediaDeviceInfoLike, toMediaDeviceInputKind, } from './devices';
11
11
  import { compareDevices, createIndexedDevices, findDevice, getDeviceId, isAudioInput, isAudioOutput, isDeviceGranted, isVideoInput, reverseDeviceId, } from './utils';
12
- import { applyConstraints, extractConstrainDevice, extractConstraintsWithKeys, findDeviceFromConstraints, getConstraintsHandlers, getFacingModeFromConstraintString, getValueFromConstrainNumber, isExactDeviceConstraint, mergeConstraints, relaxInputConstraint, resolveMediaDeviceConstraints, } from './constraints';
12
+ import { applyConstraints, extractConstrainDevice, extractConstraints, extractConstraintsWithKeys, findDeviceFromConstraints, getConstraintsHandlers, getFacingModeFromConstraintString, getValueFromConstrainNumber, isExactDeviceConstraint, mergeConstraints, relaxInputConstraint, resolveMediaDeviceConstraints, } from './constraints';
13
13
  import { eventEmitter, MediaEventType } from './eventEmitter';
14
14
  import { handleMediaStream, createStreamTrackEventSubscriptions, } from './streams';
15
15
  import { MediaDeviceFailure, MediaDeviceKinds, } from './types';
@@ -91,6 +91,6 @@ setDefaultConstraints,
91
91
  */
92
92
  subscribe, } = state();
93
93
  export { getUserMedia, setDefaultConstraints, subscribe };
94
- export { MediaDeviceFailure, MediaDeviceKinds, MediaEventType, applyConstraints, areMultipleFacingModeSupported, areTracksEnabled, compareDevices, createIndexedDevices, createStreamTrackEventSubscriptions, createTrackDevicesChanges, deviceChanged, extractConstrainDevice, extractConstraintsWithKeys, findAudioInputDevices, findAudioOutputDevices, findCurrentAudioOutputId, findCurrentVideoInputDeviceIdFromStream, findDevice, findDeviceFromConstraints, findDeviceWithDeviceId, findDevicesByKind, findMediaInputFromMediaStreamTrack, findMediaInputFromStream, findPermissionGrantedDevices, findVideoInputDevices, getDeviceId, getDevices, getFacingModeFromConstraintString, getInputDevicePermissionState, getValueFromConstrainNumber, hasAnyGrantedInput, hasAnyInputs, hasAudioInputs, hasAudioOrVideoInputs, hasChangedInput, hasRequestingDevice, hasVideoInputs, interpretCurrentFacingMode, isAudioInput, isAudioOutput, isDeviceGranted, isExactDeviceConstraint, isFacingMode, isIndexedDevices, isInputConstraintSet, isMediaDeviceInfo, isMediaDeviceInfoArray, isMediaStreamTrack, isRequestedInputDevice, isRequestedInputTrack, isRequestedResolution, isStreamingRequestedDevices, isStreamingRequestedDevicesBase, isStreamingRequestingDevice, isTrackMutedOrEnded, isVideoInput, mergeConstraints, muteStreamTrack, relaxInputConstraint, resolveMediaDeviceConstraints, reverseDeviceId, shouldRequestDevice, stopMediaStream, toKey, toMediaDeviceInfo, toMediaDeviceInfoLike, toMediaDeviceInputKind, };
94
+ export { MediaDeviceFailure, MediaDeviceKinds, MediaEventType, applyConstraints, areMultipleFacingModeSupported, areTracksEnabled, compareDevices, createIndexedDevices, createStreamTrackEventSubscriptions, createTrackDevicesChanges, deviceChanged, extractConstrainDevice, extractConstraints, extractConstraintsWithKeys, findAudioInputDevices, findAudioOutputDevices, findCurrentAudioOutputId, findCurrentVideoInputDeviceIdFromStream, findDevice, findDeviceFromConstraints, findDeviceWithDeviceId, findDevicesByKind, findMediaInputFromMediaStreamTrack, findMediaInputFromStream, findPermissionGrantedDevices, findVideoInputDevices, getDeviceId, getDevices, getFacingModeFromConstraintString, getInputDevicePermissionState, getValueFromConstrainNumber, hasAnyGrantedInput, hasAnyInputs, hasAudioInputs, hasAudioOrVideoInputs, hasChangedInput, hasRequestingDevice, hasVideoInputs, interpretCurrentFacingMode, isAudioInput, isAudioOutput, isDeviceGranted, isExactDeviceConstraint, isFacingMode, isIndexedDevices, isInputConstraintSet, isMediaDeviceInfo, isMediaDeviceInfoArray, isMediaStreamTrack, isRequestedInputDevice, isRequestedInputTrack, isRequestedResolution, isStreamingRequestedDevices, isStreamingRequestedDevicesBase, isStreamingRequestingDevice, isTrackMutedOrEnded, isVideoInput, mergeConstraints, muteStreamTrack, relaxInputConstraint, resolveMediaDeviceConstraints, reverseDeviceId, shouldRequestDevice, stopMediaStream, toKey, toMediaDeviceInfo, toMediaDeviceInfoLike, toMediaDeviceInputKind, };
95
95
  export * from './constants';
96
96
  export * from './displayMedia';
@@ -17,14 +17,14 @@ 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", "backgroundImageUrl", "contentHint"];
20
+ export declare const EXTENDED_CONSTRAIN_STRING_KEYS: readonly ["videoSegmentation", "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"];
24
24
  export declare const EXTENDED_CONSTRAIN_U_LONG_KEYS: readonly ["backgroundBlurAmount", "edgeBlurAmount", "morphErodeRadiusPx", "morphPass", "morphDilateRadiusPx", "lightWrapBlurAmount", "downSampleFactor"];
25
25
  export type ExtendedConstrainULongKeys = (typeof EXTENDED_CONSTRAIN_U_LONG_KEYS)[number];
26
26
  export type ConstrainULongKeys = (typeof CONSTRAIN_U_LONG_KEYS)[number];
27
- export declare const CONSTRAIN_DOUBLE_KEYS: readonly ["aspectRatio", "frameRate", "latency"];
27
+ export declare const CONSTRAIN_DOUBLE_KEYS: readonly ["aspectRatio", "frameRate"];
28
28
  export declare const EXTENDED_CONSTRAIN_DOUBLE_KEYS: readonly ["foregroundThreshold", "backgroundThreshold", "sigmaSpace", "sigmaRangeLo", "sigmaRangeHi", "maskCombineRatio", "personCenterX", "personCenterY", "lightWrapIntensity", "lightWrapTightness", "lightWrapEdgeBand"];
29
29
  export type ExtendedConstrainDoubleKeys = (typeof EXTENDED_CONSTRAIN_DOUBLE_KEYS)[number];
30
30
  export type ConstrainDoubleKeys = (typeof CONSTRAIN_DOUBLE_KEYS)[number];
@@ -39,7 +39,7 @@ export type ConstrainBooleanKeys = (typeof CONSTRAIN_BOOLEAN_KEYS)[number];
39
39
  /**
40
40
  * The keys from the `MediaTrackConstraintSet`
41
41
  */
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"];
42
+ export declare const CONSTRAINT_SET_KEYS: readonly ["aspectRatio", "frameRate", "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 ConstrainStringKeys;
44
44
  export declare const isExtendedConstrainStringKeys: (t: unknown) => t is ExtendedConstrainStringKeys;
45
45
  export declare const isConstrainULongKeys: (t: unknown) => t is ConstrainULongKeys;
@@ -25,7 +25,6 @@ export const CONSTRAIN_STRING_KEYS = [
25
25
  ];
26
26
  export const EXTENDED_CONSTRAIN_STRING_KEYS = [
27
27
  'videoSegmentation',
28
- 'videoSegmentationModel',
29
28
  'backgroundImageUrl',
30
29
  'contentHint',
31
30
  ];
@@ -45,11 +44,7 @@ export const EXTENDED_CONSTRAIN_U_LONG_KEYS = [
45
44
  'lightWrapBlurAmount',
46
45
  'downSampleFactor',
47
46
  ];
48
- export const CONSTRAIN_DOUBLE_KEYS = [
49
- 'aspectRatio',
50
- 'frameRate',
51
- 'latency',
52
- ];
47
+ export const CONSTRAIN_DOUBLE_KEYS = ['aspectRatio', 'frameRate'];
53
48
  export const EXTENDED_CONSTRAIN_DOUBLE_KEYS = [
54
49
  'foregroundThreshold',
55
50
  'backgroundThreshold',
package/dist/types.d.ts CHANGED
@@ -66,11 +66,6 @@ export interface InputConstraintSet extends MediaTrackConstraints {
66
66
  * segment. Available effects are `none`, `blur`, `overlay` or `remove`
67
67
  */
68
68
  videoSegmentation?: ConstrainDOMString;
69
- /**
70
- * Segmentation model to be used for video segmentation, currently only
71
- * supports `mediapipeSelfie` and `personify`
72
- */
73
- videoSegmentationModel?: ConstrainDOMString;
74
69
  /**
75
70
  * Whether or not using our own noise suppression
76
71
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pexip/media-control",
3
- "version": "21.0.0",
3
+ "version": "22.0.0",
4
4
  "homepage": "https://developer.pexip.com",
5
5
  "bugs": "https://gitlab.com/pexip/zoo/issues",
6
6
  "repository": {
@@ -48,11 +48,11 @@
48
48
  "docs": "typedoc"
49
49
  },
50
50
  "dependencies": {
51
- "@pexip/utils": "17.2.0"
51
+ "@pexip/utils": "17.3.0"
52
52
  },
53
53
  "devDependencies": {
54
- "@jest/globals": "^30.2.0",
55
- "@pexip/bundler": "18.2.0",
54
+ "@jest/globals": "^29.5.12",
55
+ "@pexip/bundler": "18.2.1",
56
56
  "@swc/core": "^1.10.12",
57
57
  "@swc/jest": "^0.2.39",
58
58
  "@types/uuid": "^8.3.0",
@@ -60,9 +60,9 @@
60
60
  "jest": "^29.5.12",
61
61
  "jest-junit": "^16.0.0",
62
62
  "prettier": "^3.2.5",
63
- "typedoc": "^0.28.15",
64
- "typedoc-plugin-markdown": "^4.9.0",
65
- "typescript": "~5.7.3",
63
+ "typedoc": "^0.28.18",
64
+ "typedoc-plugin-markdown": "^4.11.0",
65
+ "typescript": "~6.0.2",
66
66
  "uuid": "^11.0.0"
67
67
  },
68
68
  "publishConfig": {