@pexip/media 20.3.4 → 21.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 +71 -0
- package/api-docs/README.mdx +406 -0
- package/api-docs/enumerations/DeniedDevices.mdx +7 -0
- package/api-docs/enumerations/UserMediaStatus.mdx +49 -0
- package/api-docs/functions/applyContentHint.mdx +33 -0
- package/api-docs/functions/createAudioMixingProcess.mdx +20 -0
- package/api-docs/functions/createAudioStreamProcess.mdx +15 -0
- package/api-docs/functions/createGetDisplayMedia.mdx +26 -0
- package/api-docs/functions/createMedia.mdx +20 -0
- package/api-docs/functions/createMediaSignal.mdx +42 -0
- package/api-docs/functions/createMediaSignals.mdx +33 -0
- package/api-docs/functions/createPreviewStreamController.mdx +13 -0
- package/api-docs/functions/createVideoStreamProcess.mdx +13 -0
- package/api-docs/functions/deriveInitialPermissionStatus.mdx +14 -0
- package/api-docs/functions/getBlurKernelSize.mdx +25 -0
- package/api-docs/functions/getPermissionStatus.mdx +34 -0
- package/api-docs/functions/getTentBlurSize.mdx +24 -0
- package/api-docs/functions/isAnalyzerNodeInitProp.mdx +13 -0
- package/api-docs/functions/isAudioContentHint.mdx +13 -0
- package/api-docs/functions/isMedia.mdx +13 -0
- package/api-docs/functions/isNonNullObject.mdx +13 -0
- package/api-docs/functions/isUserMediaStatus.mdx +13 -0
- package/api-docs/functions/isVideoContentHint.mdx +13 -0
- package/api-docs/functions/isVideoStreamTrackProcessorAPIs.mdx +13 -0
- package/api-docs/functions/setLogger.mdx +13 -0
- package/api-docs/functions/toDeniedDevices.mdx +13 -0
- package/api-docs/interfaces/AudioDetectionSignals.mdx +6 -0
- package/api-docs/interfaces/AudioSignalDetectionOptions.mdx +6 -0
- package/api-docs/interfaces/DenoiseParams.mdx +9 -0
- package/api-docs/interfaces/ExtendedMediaTrackSettings.mdx +38 -0
- package/api-docs/interfaces/Media.mdx +316 -0
- package/api-docs/interfaces/MediaAttributes.mdx +19 -0
- package/api-docs/interfaces/MediaChangesSignals.mdx +15 -0
- package/api-docs/interfaces/MediaController.mdx +11 -0
- package/api-docs/interfaces/MediaInit.mdx +14 -0
- package/api-docs/interfaces/MediaOptions.mdx +10 -0
- package/api-docs/interfaces/MediaProps.mdx +9 -0
- package/api-docs/interfaces/MediaSettings.mdx +6 -0
- package/api-docs/interfaces/MediaTrack.mdx +121 -0
- package/api-docs/interfaces/MediaTrackInit.mdx +29 -0
- package/api-docs/interfaces/PreviewControllerProps.mdx +14 -0
- package/api-docs/interfaces/PreviewEventHandler.mdx +19 -0
- package/api-docs/interfaces/PreviewStreamController.mdx +350 -0
- package/api-docs/interfaces/PreviewStreamParams.mdx +15 -0
- package/api-docs/interfaces/VoiceActivityDetectionOptions.mdx +6 -0
- package/api-docs/type-aliases/AudioContentHint.mdx +3 -0
- package/api-docs/type-aliases/CreatePreviewStreamController.mdx +3 -0
- package/api-docs/type-aliases/ExtendedMediaTrackSettingsKey.mdx +3 -0
- package/api-docs/type-aliases/GeneratedMediaSignals.mdx +9 -0
- package/api-docs/type-aliases/GetDisplayMedia.mdx +3 -0
- package/api-docs/type-aliases/GetUserMediaProcess.mdx +19 -0
- package/api-docs/type-aliases/MediaSignals.mdx +3 -0
- package/api-docs/type-aliases/MediaSignalsOptional.mdx +3 -0
- package/api-docs/type-aliases/MediaSignalsRequired.mdx +3 -0
- package/api-docs/type-aliases/PreviewInput.mdx +3 -0
- package/api-docs/type-aliases/Process.mdx +19 -0
- package/api-docs/type-aliases/Segmenters.mdx +3 -0
- package/api-docs/type-aliases/TrackProcessor.mdx +3 -0
- package/api-docs/type-aliases/Unsubscribe.mdx +7 -0
- package/api-docs/type-aliases/UserMediaValidator.mdx +13 -0
- package/api-docs/type-aliases/VideoContentHint.mdx +3 -0
- package/api-docs/type-aliases/VideoRenderParams.mdx +17 -0
- package/api-docs/type-aliases/VideoStreamTrackProcessorAPIs.mdx +7 -0
- package/api-docs/variables/AUDIO_CONTENT_HINTS.mdx +17 -0
- package/api-docs/variables/REQUIRED_SIGNAL_KEYS.mdx +3 -0
- package/api-docs/variables/VIDEO_CONTENT_HINTS.mdx +17 -0
- package/api-docs/variables/areBothGranted.mdx +3 -0
- package/api-docs/variables/hasNoAudioDevices.mdx +3 -0
- package/api-docs/variables/hasNoDevice.mdx +3 -0
- package/api-docs/variables/hasNoVideoDevices.mdx +3 -0
- package/api-docs/variables/internalSignals.mdx +13 -0
- package/api-docs/variables/isAudioDeviceInUse.mdx +3 -0
- package/api-docs/variables/isDeviceInUse.mdx +3 -0
- package/api-docs/variables/isDevicesInUse.mdx +3 -0
- package/api-docs/variables/isFallback.mdx +3 -0
- package/api-docs/variables/isFallbackAudio.mdx +3 -0
- package/api-docs/variables/isFallbackVideo.mdx +3 -0
- package/api-docs/variables/isGranted.mdx +3 -0
- package/api-docs/variables/isGrantedAudio.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyAudio.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyAudioNoVideoDevices.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyVideo.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyVideoNoAudioDevices.mdx +3 -0
- package/api-docs/variables/isGrantedVideo.mdx +3 -0
- package/api-docs/variables/isInitial.mdx +3 -0
- package/api-docs/variables/isInitialPermissions.mdx +3 -0
- package/api-docs/variables/isInitialPermissionsGranted.mdx +3 -0
- package/api-docs/variables/isInitialPermissionsNotGranted.mdx +3 -0
- package/api-docs/variables/isOnlyAudioError.mdx +3 -0
- package/api-docs/variables/isOnlyVideoError.mdx +3 -0
- package/api-docs/variables/isOverConstrained.mdx +3 -0
- package/api-docs/variables/isPromptAudio.mdx +3 -0
- package/api-docs/variables/isPromptVideo.mdx +3 -0
- package/api-docs/variables/isRejected.mdx +3 -0
- package/api-docs/variables/isRejectedOnlyAudio.mdx +3 -0
- package/api-docs/variables/isRejectedOnlyVideo.mdx +3 -0
- package/api-docs/variables/isRequestPermissionNeeded.mdx +3 -0
- package/api-docs/variables/isUnknownError.mdx +3 -0
- package/api-docs/variables/isVideoDeviceInUse.mdx +3 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/previewController.js +1 -1
- package/dist/types.d.ts +3 -1
- package/dist/userMedia.d.ts +4 -1
- package/dist/userMedia.js +15 -11
- package/dist/utils.d.ts +17 -6
- package/dist/utils.js +27 -13
- package/dist/videoProcessor.d.ts +3 -3
- package/dist/videoProcessor.js +172 -30
- package/package.json +17 -12
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from './signals';
|
|
|
4
4
|
export * from './status';
|
|
5
5
|
export * from './typeGuard';
|
|
6
6
|
export * from './types';
|
|
7
|
-
export { applyContentHint } from './utils';
|
|
7
|
+
export { applyContentHint, getBlurKernelSize, getTentBlurSize } from './utils';
|
|
8
8
|
export { createAudioMixingProcess } from './audioMixingProcessor';
|
|
9
9
|
export { createAudioStreamProcess } from './audioProcessor';
|
|
10
10
|
export { createMedia } from './media';
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export * from './signals';
|
|
|
4
4
|
export * from './status';
|
|
5
5
|
export * from './typeGuard';
|
|
6
6
|
export * from './types';
|
|
7
|
-
export { applyContentHint } from './utils';
|
|
7
|
+
export { applyContentHint, getBlurKernelSize, getTentBlurSize } from './utils';
|
|
8
8
|
export { createAudioMixingProcess } from './audioMixingProcessor';
|
|
9
9
|
export { createAudioStreamProcess } from './audioProcessor';
|
|
10
10
|
export { createMedia } from './media';
|
|
@@ -373,7 +373,7 @@ export const createPreviewStreamController = ({ getCurrentDevices, getCurrentMed
|
|
|
373
373
|
const audioSettings = extractFeaturesToConstraints(AUDIO_SETTINGS_KEYS, previewAudio);
|
|
374
374
|
// Omit the width & height settings from the preview so that the one
|
|
375
375
|
// from the main can be applied
|
|
376
|
-
const { width: _width, height: _height, ...videoSettings } = extractFeaturesToConstraints(VIDEO_SETTINGS_KEYS, previewVideo);
|
|
376
|
+
const { width: _width, height: _height, edgeBlurAmount: _edgeBlurAmount, lightWrapBlurAmount: _lightWrapBlurAmount, backgroundBlurAmount: _backgroundBlurAmount, ...videoSettings } = extractFeaturesToConstraints(VIDEO_SETTINGS_KEYS, previewVideo);
|
|
377
377
|
logger.info({ audioInput, videoInput, audioSettings, videoSettings }, 'Apply changes to main');
|
|
378
378
|
try {
|
|
379
379
|
await replaceMainStream({
|
package/dist/types.d.ts
CHANGED
|
@@ -531,7 +531,7 @@ export interface MediaController {
|
|
|
531
531
|
*/
|
|
532
532
|
tryAndGetUserMedia: (constraints: MediaDeviceRequest) => void;
|
|
533
533
|
}
|
|
534
|
-
export type VideoRenderParams = Omit<RendererOptions, 'effects'> & {
|
|
534
|
+
export type VideoRenderParams = Omit<RendererOptions, 'effects' | 'personCenter'> & {
|
|
535
535
|
/**
|
|
536
536
|
* Target frame rate for the video segmentation
|
|
537
537
|
*/
|
|
@@ -545,6 +545,8 @@ export type VideoRenderParams = Omit<RendererOptions, 'effects'> & {
|
|
|
545
545
|
pan?: boolean;
|
|
546
546
|
tilt?: boolean;
|
|
547
547
|
zoom?: boolean;
|
|
548
|
+
personCenterX?: number;
|
|
549
|
+
personCenterY?: number;
|
|
548
550
|
};
|
|
549
551
|
export interface MediaChangesSignals {
|
|
550
552
|
onAddTrack: Signal<MediaStreamTrack>;
|
package/dist/userMedia.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ export declare const toSameDeviceStatus: ({ audio, video, }: {
|
|
|
11
11
|
audio: boolean;
|
|
12
12
|
video: boolean;
|
|
13
13
|
}) => UserMediaStatus.PermissionsGranted | UserMediaStatus.PermissionsGrantedFallback | UserMediaStatus.PermissionsGrantedFallbackAudioinput | UserMediaStatus.PermissionsGrantedFallbackVideoinput;
|
|
14
|
-
export declare const toOnlyDeviceStatus: (kind: "audioinput" | "videoinput",
|
|
14
|
+
export declare const toOnlyDeviceStatus: (kind: "audioinput" | "videoinput", streamedRequestedDevices: {
|
|
15
|
+
audio: boolean;
|
|
16
|
+
video: boolean;
|
|
17
|
+
}, devices: IndexedDevices) => UserMediaStatus.PermissionsRejectedAudioInput | UserMediaStatus.PermissionsRejectedVideoInput | UserMediaStatus.PermissionsOnlyAudioinput | UserMediaStatus.PermissionsOnlyAudioinputNoVideoDevices | UserMediaStatus.PermissionsOnlyAudioinputFallback | UserMediaStatus.PermissionsOnlyAudioinputFallbackNoVideoDevices | UserMediaStatus.PermissionsOnlyVideoinput | UserMediaStatus.PermissionsOnlyVideoinputNoAudioDevices | UserMediaStatus.PermissionsOnlyVideoinputFallback | UserMediaStatus.PermissionsOnlyVideoinputFallbackNoAudioDevices;
|
|
15
18
|
/**
|
|
16
19
|
* Check if there is any track match with the `kind`
|
|
17
20
|
*/
|
package/dist/userMedia.js
CHANGED
|
@@ -71,12 +71,16 @@ export const toSameDeviceStatus = ({ audio, video, }) => {
|
|
|
71
71
|
}
|
|
72
72
|
return UserMediaStatus.PermissionsGrantedFallback;
|
|
73
73
|
};
|
|
74
|
-
export const toOnlyDeviceStatus = (kind,
|
|
75
|
-
const
|
|
76
|
-
const
|
|
74
|
+
export const toOnlyDeviceStatus = (kind, streamedRequestedDevices, devices) => {
|
|
75
|
+
const [self, other] = kind === 'audioinput' ? ['audio', 'video'] : ['video', 'audio'];
|
|
76
|
+
const otherKind = kind === 'audioinput' ? 'videoinput' : 'audioinput';
|
|
77
|
+
const matched = streamedRequestedDevices[self];
|
|
78
|
+
const anotherDeviceRequested = streamedRequestedDevices[other];
|
|
79
|
+
const hasAnotherTypeOfAuthorizedDevice = devices.anyAuthorizedDevice(otherKind);
|
|
80
|
+
const hasAnotherTypeOfDevice = devices.size(otherKind) > 0;
|
|
77
81
|
if (matched) {
|
|
78
82
|
if (hasAnotherTypeOfDevice) {
|
|
79
|
-
if (hasAnotherTypeOfAuthorizedDevice) {
|
|
83
|
+
if (hasAnotherTypeOfAuthorizedDevice || !anotherDeviceRequested) {
|
|
80
84
|
return kind === 'audioinput'
|
|
81
85
|
? UserMediaStatus.PermissionsOnlyAudioinput
|
|
82
86
|
: UserMediaStatus.PermissionsOnlyVideoinput;
|
|
@@ -90,7 +94,7 @@ export const toOnlyDeviceStatus = (kind, matched, devices) => {
|
|
|
90
94
|
: UserMediaStatus.PermissionsOnlyVideoinputNoAudioDevices;
|
|
91
95
|
}
|
|
92
96
|
if (hasAnotherTypeOfDevice) {
|
|
93
|
-
if (hasAnotherTypeOfAuthorizedDevice) {
|
|
97
|
+
if (hasAnotherTypeOfAuthorizedDevice || !anotherDeviceRequested) {
|
|
94
98
|
return kind === 'audioinput'
|
|
95
99
|
? UserMediaStatus.PermissionsOnlyAudioinputFallback
|
|
96
100
|
: UserMediaStatus.PermissionsOnlyVideoinputFallback;
|
|
@@ -421,10 +425,10 @@ export const requestUserMedia = (getCurrentDevices, getMedia = getUserMedia) =>
|
|
|
421
425
|
? constraints.video
|
|
422
426
|
: false,
|
|
423
427
|
});
|
|
424
|
-
const
|
|
425
|
-
const onlyAudioStatus = toOnlyDeviceStatus('audioinput',
|
|
426
|
-
const onlyVideoStatus = toOnlyDeviceStatus('videoinput',
|
|
427
|
-
const status = deriveDeviceStatus(onlyAudioStatus, onlyVideoStatus, toSameDeviceStatus(
|
|
428
|
+
const streamedRequestedDevices = isStreamingRequestedDevices(constraints, stream, devices);
|
|
429
|
+
const onlyAudioStatus = toOnlyDeviceStatus('audioinput', streamedRequestedDevices, devices);
|
|
430
|
+
const onlyVideoStatus = toOnlyDeviceStatus('videoinput', streamedRequestedDevices, devices);
|
|
431
|
+
const status = deriveDeviceStatus(onlyAudioStatus, onlyVideoStatus, toSameDeviceStatus(streamedRequestedDevices));
|
|
428
432
|
return [stream, status];
|
|
429
433
|
}
|
|
430
434
|
catch (error) {
|
|
@@ -521,10 +525,10 @@ export const createGetUserMediaProcess = ({ getCurrentDevices, getUserMedia, sco
|
|
|
521
525
|
}));
|
|
522
526
|
}
|
|
523
527
|
const relaxedConstraints = {};
|
|
524
|
-
if (constraints.audio) {
|
|
528
|
+
if (constraints.audio !== undefined) {
|
|
525
529
|
relaxedConstraints.audio = relaxInputConstraint('audioinput', constraints.audio, currentDevices);
|
|
526
530
|
}
|
|
527
|
-
if (constraints.video) {
|
|
531
|
+
if (constraints.video !== undefined) {
|
|
528
532
|
relaxedConstraints.video = relaxInputConstraint('videoinput', constraints.video, currentDevices);
|
|
529
533
|
}
|
|
530
534
|
const [stream, status] = await getUserMedia(relaxedConstraints);
|
package/dist/utils.d.ts
CHANGED
|
@@ -54,17 +54,28 @@ export declare const getSettingsFromKeys: (keys: ExtendedMediaTrackSettingsKey[]
|
|
|
54
54
|
export declare const diffSettings: (keysToLookFor: ExtendedMediaTrackSettingsKey[]) => (settingsA: ExtendedMediaTrackSettings | undefined, settingsB: ExtendedMediaTrackSettings | undefined) => ExtendedMediaTrackSettings | undefined;
|
|
55
55
|
export declare const mergeSettings: (settingsA: ExtendedMediaTrackSettings | undefined, settingsB: ExtendedMediaTrackSettings | undefined) => ExtendedMediaTrackSettings | undefined;
|
|
56
56
|
/**
|
|
57
|
-
* A function to get the blur kernel size of image height
|
|
57
|
+
* A function to get the blur kernel size of image height based on
|
|
58
|
+
* Kawase blur algorithm
|
|
58
59
|
*
|
|
59
|
-
* @param
|
|
60
|
-
*
|
|
61
|
-
* @param height - The image height
|
|
62
|
-
* @param lowestProcessingHeight - The lowest image height that is processed by the consumer, used to adjust the blur kernel size across different resolutions
|
|
60
|
+
* @param norm - [0-100] The normalized blur amount
|
|
61
|
+
* @param heightRef - The reference image height
|
|
62
|
+
* @param height - The current image height
|
|
63
63
|
* @param max - The upper bound
|
|
64
64
|
*
|
|
65
65
|
* @returns blur kernel size
|
|
66
66
|
*/
|
|
67
|
-
export declare const getBlurKernelSize: (
|
|
67
|
+
export declare const getBlurKernelSize: (norm: number, heightRef: number, height: number, max?: number) => number;
|
|
68
|
+
/**
|
|
69
|
+
* A function to get the Tent blur size of image height
|
|
70
|
+
*
|
|
71
|
+
* @param norm - [0-100] The normalized blur amount
|
|
72
|
+
* @param heightRef - The reference image height
|
|
73
|
+
* @param height - The current image height
|
|
74
|
+
* @param max - The upper bound
|
|
75
|
+
*
|
|
76
|
+
* @returns tent blur size
|
|
77
|
+
*/
|
|
78
|
+
export declare const getTentBlurSize: (norm: number, heightRef: number, height: number, max?: number) => number;
|
|
68
79
|
/**
|
|
69
80
|
* Apply the content hint to the track
|
|
70
81
|
*
|
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { createStreamTrackEventSubscriptions, createTrackDevicesChanges, extractConstraintsWithKeys, findDeviceFromConstraints, relaxInputConstraint, resolveMediaDeviceConstraints, shouldRequestDevice, toMediaDeviceInputKind, } from '@pexip/media-control';
|
|
2
|
-
import { calculateMaxBlurPass } from '@pexip/media-processor';
|
|
2
|
+
import { calculateMaxBlurPass, clamping, } from '@pexip/media-processor';
|
|
3
3
|
import { hasOwn, assert, isEmpty } from '@pexip/utils';
|
|
4
4
|
import { internalSignals } from './signals';
|
|
5
|
+
import { MAX_TENT_BLUR_SIZE } from './constants';
|
|
5
6
|
export const makeDeriveDeviceStatus = (constraints) => (audio, video, both) => {
|
|
6
7
|
if (constraints.audio) {
|
|
7
8
|
if (constraints.video) {
|
|
@@ -684,26 +685,39 @@ export const mergeSettings = (settingsA, settingsB) => {
|
|
|
684
685
|
}
|
|
685
686
|
return { ...settingsA, ...settingsB };
|
|
686
687
|
};
|
|
688
|
+
const clampNorm = clamping(0, 100);
|
|
687
689
|
/**
|
|
688
|
-
* A function to get the blur kernel size of image height
|
|
690
|
+
* A function to get the blur kernel size of image height based on
|
|
691
|
+
* Kawase blur algorithm
|
|
689
692
|
*
|
|
690
|
-
* @param
|
|
691
|
-
*
|
|
692
|
-
* @param height - The image height
|
|
693
|
-
* @param lowestProcessingHeight - The lowest image height that is processed by the consumer, used to adjust the blur kernel size across different resolutions
|
|
693
|
+
* @param norm - [0-100] The normalized blur amount
|
|
694
|
+
* @param heightRef - The reference image height
|
|
695
|
+
* @param height - The current image height
|
|
694
696
|
* @param max - The upper bound
|
|
695
697
|
*
|
|
696
698
|
* @returns blur kernel size
|
|
697
699
|
*/
|
|
698
|
-
export const getBlurKernelSize = (
|
|
699
|
-
if (height <= 0 ||
|
|
700
|
+
export const getBlurKernelSize = (norm, heightRef, height, max = calculateMaxBlurPass(height)) => {
|
|
701
|
+
if (height <= 0 || norm <= 0 || max <= 0 || heightRef <= 0) {
|
|
700
702
|
return 0;
|
|
701
703
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
704
|
+
return clamping(0, max)(Math.round(clampNorm(norm) * 0.01 * max - Math.log2(heightRef / height)));
|
|
705
|
+
};
|
|
706
|
+
/**
|
|
707
|
+
* A function to get the Tent blur size of image height
|
|
708
|
+
*
|
|
709
|
+
* @param norm - [0-100] The normalized blur amount
|
|
710
|
+
* @param heightRef - The reference image height
|
|
711
|
+
* @param height - The current image height
|
|
712
|
+
* @param max - The upper bound
|
|
713
|
+
*
|
|
714
|
+
* @returns tent blur size
|
|
715
|
+
*/
|
|
716
|
+
export const getTentBlurSize = (norm, heightRef, height, max = MAX_TENT_BLUR_SIZE) => {
|
|
717
|
+
if (height <= 0 || norm <= 0 || heightRef <= 0 || max <= 0) {
|
|
718
|
+
return 0;
|
|
719
|
+
}
|
|
720
|
+
return clamping(0, max)(Math.round((norm * 0.01 * max * height) / heightRef));
|
|
707
721
|
};
|
|
708
722
|
/**
|
|
709
723
|
* Apply the content hint to the track
|
package/dist/videoProcessor.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ interface VideoStreamProcessOptions extends Partial<VideoRenderParams>, Omit<Pro
|
|
|
18
18
|
* Whether or to enable this processor
|
|
19
19
|
*/
|
|
20
20
|
shouldEnable: () => boolean;
|
|
21
|
-
|
|
21
|
+
referenceProcessingHeight?: number;
|
|
22
22
|
processingWidth: number;
|
|
23
23
|
processingHeight: number;
|
|
24
24
|
hasInitializedDeps?: boolean;
|
|
@@ -34,9 +34,9 @@ interface VideoStreamProcessProps extends Partial<VideoRenderParams>, Required<P
|
|
|
34
34
|
hasInitialized: boolean;
|
|
35
35
|
contentHint?: VideoContentHint;
|
|
36
36
|
}
|
|
37
|
-
declare const FEATURE_KEYS: readonly ["backgroundBlurAmount", "backgroundImageUrl", "maskCombineRatio", "edgeBlurAmount", "foregroundThreshold", "frameRate", "videoSegmentation", "videoSegmentationModel", "width", "height", "pan", "tilt", "zoom", "contentHint"];
|
|
37
|
+
declare const FEATURE_KEYS: readonly ["backgroundBlurAmount", "backgroundImageUrl", "backgroundThreshold", "maskCombineRatio", "edgeBlurAmount", "foregroundThreshold", "frameRate", "videoSegmentation", "videoSegmentationModel", "width", "height", "pan", "tilt", "zoom", "contentHint", "sigmaSpace", "sigmaRangeLo", "sigmaRangeHi", "excludeBystanders", "personCenterX", "personCenterY", "morphErodeRadiusPx", "morphPass", "morphDilateRadiusPx", "lightWrapIntensity", "lightWrapTightness", "lightWrapEdgeBand", "lightWrapBlurAmount", "downSampleFactor"];
|
|
38
38
|
type FeaturePropKeys = (typeof FEATURE_KEYS)[number];
|
|
39
39
|
type FeatureProps = Pick<Partial<VideoStreamProcessProps>, FeaturePropKeys>;
|
|
40
40
|
export declare const updateFeatureProps: (constraints: MediaDeviceRequest["video"], props: FeatureProps) => FeatureProps;
|
|
41
|
-
export declare const createVideoStreamProcess: ({ backgroundImageUrl, dynamicProcessingDimensions,
|
|
41
|
+
export declare const createVideoStreamProcess: ({ backgroundImageUrl, dynamicProcessingDimensions, backgroundThreshold, downSampleFactor, foregroundThreshold, lightWrapEdgeBand, lightWrapIntensity, lightWrapTightness, morphDilateRadiusPx, morphErodeRadiusPx, morphPass, personCenterX, personCenterY, sigmaSpace, sigmaRangeHi, sigmaRangeLo, frameRate, gpuAPI, label, referenceProcessingHeight, maskCombineRatio, processingHeight, processingWidth, shouldEnable, stopAsMute, trackProcessorAPI, videoSegmentation, signals, ...options }: VideoStreamProcessOptions) => TrackProcessor;
|
|
42
42
|
export {};
|