@pexip/media-processor 21.0.0 → 22.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 +80 -0
- package/README.md +17 -10
- package/api-docs/README.mdx +40 -19
- package/api-docs/functions/assertMediaStreamVideoTrack.mdx +13 -0
- package/api-docs/functions/avg.mdx +1 -1
- package/api-docs/functions/createAnalyzerGraphNode.mdx +3 -1
- package/api-docs/functions/createAnalyzerSubscribableGraphNode.mdx +3 -1
- package/api-docs/functions/createAsyncCallbackLoop.mdx +6 -6
- package/api-docs/functions/createAudioDestinationGraphNode.mdx +1 -1
- package/api-docs/functions/createAudioSignalDetector.mdx +4 -4
- package/api-docs/functions/createAudioStats.mdx +1 -1
- package/api-docs/functions/createChannelMergerGraphNode.mdx +1 -1
- package/api-docs/functions/createChannelSplitterGraphNode.mdx +1 -1
- package/api-docs/functions/createDelayGraphNode.mdx +1 -1
- package/api-docs/functions/createDenoiseWorkletGraphNode.mdx +2 -2
- package/api-docs/functions/createFrameCallbackRequest.mdx +10 -4
- package/api-docs/functions/createGainGraphNode.mdx +3 -1
- package/api-docs/functions/createMediaElementSourceGraphNode.mdx +1 -1
- package/api-docs/functions/createMediaStreamTrackInputProcessAdaptor.mdx +10 -0
- package/api-docs/functions/createReadWritableStreamFallbackInputProcessAdaptor.mdx +17 -0
- package/api-docs/functions/createReadWritableStreamInputProcessAdaptor.mdx +10 -0
- package/api-docs/functions/createSegmenter.mdx +1 -1
- package/api-docs/functions/createStreamDestinationGraphNode.mdx +1 -1
- package/api-docs/functions/createStreamSourceGraphNode.mdx +1 -1
- package/api-docs/functions/createVADetector.mdx +3 -3
- package/api-docs/functions/createVideoProcessor.mdx +3 -3
- package/api-docs/functions/createVoiceDetectorFromProbability.mdx +1 -1
- package/api-docs/functions/createVoiceDetectorFromTimeData.mdx +3 -1
- package/api-docs/functions/createWindowedStats.mdx +2 -2
- package/api-docs/functions/getBezierCurveControlPoints.mdx +3 -1
- package/api-docs/functions/getDefaultInputProcessAdaptor.mdx +17 -0
- package/api-docs/functions/isMediaStreamVideoTrack.mdx +13 -0
- package/api-docs/functions/labelComponents.mdx +3 -1
- package/api-docs/functions/loadScript.mdx +1 -1
- package/api-docs/functions/loadWasms.mdx +1 -1
- package/api-docs/functions/nearestPowerOfTwo.mdx +1 -1
- package/api-docs/functions/playVideo.mdx +7 -5
- package/api-docs/functions/processAverageVolume.mdx +1 -1
- package/api-docs/functions/rms.mdx +1 -1
- package/api-docs/functions/subscribeWorkletNode.mdx +1 -1
- package/api-docs/functions/sum.mdx +1 -1
- package/api-docs/interfaces/Analyzer.mdx +4 -0
- package/api-docs/interfaces/AnalyzerSubscribableOptions.mdx +5 -3
- package/api-docs/interfaces/AudioGraph.mdx +2 -2
- package/api-docs/interfaces/AudioNodeInit.mdx +10 -6
- package/api-docs/interfaces/AudioNodeProps.mdx +3 -3
- package/api-docs/interfaces/Benchmark.mdx +17 -3
- package/api-docs/interfaces/Clock.mdx +1 -1
- package/api-docs/interfaces/Denoise.mdx +2 -2
- package/api-docs/interfaces/FrameTransformStats.mdx +9 -0
- package/api-docs/interfaces/Gain.mdx +4 -0
- package/api-docs/interfaces/ImageSegmenterOptions.mdx +0 -2
- package/api-docs/interfaces/InputProcessAdaptor.mdx +32 -0
- package/api-docs/interfaces/MPMask.mdx +1 -1
- package/api-docs/interfaces/Process.mdx +12 -7
- package/api-docs/interfaces/ProcessEventMute.mdx +6 -0
- package/api-docs/interfaces/ProcessWorkerDebugMessage.mdx +1 -1
- package/api-docs/interfaces/ProcessWorkerEventClosed.mdx +5 -0
- package/api-docs/interfaces/ProcessWorkerEventOpened.mdx +7 -0
- package/api-docs/interfaces/ProcessWorkerEventStats.mdx +6 -0
- package/api-docs/interfaces/ProcessWorkerEventUpdated.mdx +7 -0
- package/api-docs/interfaces/ProcessorEvent.mdx +3 -2
- package/api-docs/interfaces/ProcessorOptions.mdx +0 -1
- package/api-docs/interfaces/ProcessorProcessOptions.mdx +3 -1
- package/api-docs/interfaces/ProcessorUpdateOptions.mdx +17 -0
- package/api-docs/interfaces/ReadWritableStream.mdx +12 -0
- package/api-docs/interfaces/RenderEventHandlers.mdx +3 -3
- package/api-docs/interfaces/Renderer.mdx +5 -3
- package/api-docs/interfaces/RendererOptions.mdx +5 -9
- package/api-docs/interfaces/Runner.mdx +3 -3
- package/api-docs/interfaces/Segmentation.mdx +1 -1
- package/api-docs/interfaces/Segmenter.mdx +115 -16
- package/api-docs/interfaces/SegmenterOptions.mdx +0 -1
- package/api-docs/interfaces/VideoFrameLike.mdx +1 -1
- package/api-docs/interfaces/VideoProcessor.mdx +52 -8
- package/api-docs/interfaces/WorkletMessagePortOptions.mdx +2 -2
- package/api-docs/type-aliases/AsyncCallback.mdx +1 -1
- package/api-docs/type-aliases/Callback.mdx +2 -2
- package/api-docs/type-aliases/ExtractMessageEventType.mdx +1 -1
- package/api-docs/type-aliases/IncludeMessageEventDataType.mdx +1 -1
- package/api-docs/type-aliases/Logger.mdx +12 -0
- package/api-docs/type-aliases/OptionalKeys.mdx +1 -1
- package/api-docs/type-aliases/ProcessEvents.mdx +1 -0
- package/api-docs/type-aliases/ProcessInputType.mdx +3 -1
- package/api-docs/type-aliases/ProcessWorkerEvents.mdx +7 -4
- package/api-docs/type-aliases/ProcessorWorkerEvents.mdx +1 -1
- package/api-docs/type-aliases/RunnerCreator.mdx +3 -3
- package/api-docs/type-aliases/Struct.mdx +9 -0
- package/api-docs/type-aliases/TupleOf.mdx +1 -1
- package/api-docs/variables/FRAME_RATE.mdx +1 -1
- package/api-docs/variables/ImageFetchError.mdx +3 -0
- package/api-docs/variables/MediaStreamTrackTransferable.mdx +5 -0
- package/api-docs/variables/RENDERER_OPTIONS_STRUCT.mdx +3 -0
- package/api-docs/variables/cloneImageRecord.mdx +21 -0
- package/api-docs/variables/compareImageRecords.mdx +18 -0
- package/api-docs/variables/createLazyProps.mdx +1 -1
- package/api-docs/variables/createObjectUpdater.mdx +2 -2
- package/api-docs/variables/createRemoteImageBitmap.mdx +5 -5
- package/api-docs/variables/handleWebGLContextLoss.mdx +1 -1
- package/api-docs/variables/isRenderOptionsKey.mdx +13 -0
- package/api-docs/variables/isValidGpuAPI.mdx +13 -0
- package/api-docs/variables/urls.mdx +2 -2
- package/dist/common/backends/webgl/renderer.js +2 -12
- package/dist/common/backends/webgl/texture.d.ts +1 -2
- package/dist/common/backends/webgl/texture.js +2 -2
- package/dist/common/backends/webgl/webglUtils.js +8 -4
- package/dist/common/backends/webgpu/renderer.js +2 -12
- package/dist/common/backends/webgpu/tentBlur.js +1 -1
- package/dist/common/backends/webgpu/texture.d.ts +1 -2
- package/dist/common/backends/webgpu/texture.js +6 -2
- package/dist/common/constants.d.ts +3 -0
- package/dist/common/constants.js +4 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/common/tsconfig.tsbuildinfo +1 -1
- package/dist/common/typeGuards.d.ts +2 -0
- package/dist/common/typeGuards.js +7 -0
- package/dist/common/types/media.d.ts +5 -1
- package/dist/common/types/messageEvents.d.ts +34 -4
- package/dist/common/types/processor.d.ts +7 -4
- package/dist/common/types/render.d.ts +5 -2
- package/dist/common/types/render.js +23 -1
- package/dist/common/types/segmentation.d.ts +0 -12
- package/dist/common/utils.d.ts +13 -2
- package/dist/common/utils.js +54 -10
- package/dist/main/audio.js +3 -3
- package/dist/main/benchUtils.d.ts +2 -2
- package/dist/main/benchUtils.js +4 -4
- package/dist/main/index.d.ts +1 -1
- package/dist/main/index.js +1 -1
- package/dist/main/tsconfig.tsbuildinfo +1 -1
- package/dist/main/types.d.ts +0 -6
- package/dist/main/utils.d.ts +4 -0
- package/dist/main/utils.js +31 -0
- package/dist/main/video/constants.d.ts +1 -4
- package/dist/main/video/constants.js +1 -5
- package/dist/main/video/index.d.ts +2 -3
- package/dist/main/video/index.js +2 -3
- package/dist/main/video/inputProcessAdaptor.d.ts +30 -0
- package/dist/main/video/inputProcessAdaptor.js +198 -0
- package/dist/main/video/segmenter.d.ts +42 -0
- package/dist/main/video/{segmenters/mediapipe.js → segmenter.js} +130 -75
- package/dist/main/video/typeGuards.d.ts +2 -0
- package/dist/main/video/typeGuards.js +8 -1
- package/dist/main/video/types.d.ts +37 -17
- package/dist/main/video/utils.d.ts +5 -4
- package/dist/main/video/utils.js +49 -44
- package/dist/main/video/video.d.ts +30 -8
- package/dist/main/video/video.js +338 -32
- package/dist/workers/mediaWorker.js +24 -24
- package/dist/workers/tsconfig.tsbuildinfo +1 -1
- package/dist/worklets/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/api-docs/functions/createCanvasTransform.mdx +0 -14
- package/api-docs/functions/createVideoTrackProcessor.mdx +0 -9
- package/api-docs/functions/createVideoTrackProcessorWithFallback.mdx +0 -15
- package/api-docs/interfaces/Detector.mdx +0 -81
- package/api-docs/interfaces/SegmentationParams.mdx +0 -35
- package/api-docs/interfaces/Transform.mdx +0 -62
- package/api-docs/type-aliases/ProcessVideoTrack.mdx +0 -15
- package/api-docs/type-aliases/SegmentationTransform.mdx +0 -3
- package/dist/main/transformer.d.ts +0 -1
- package/dist/main/transformer.js +0 -4
- package/dist/main/video/canvasTransform.d.ts +0 -17
- package/dist/main/video/canvasTransform.js +0 -341
- package/dist/main/video/segmenters/mediapipe.d.ts +0 -22
- package/dist/main/video/transformer.d.ts +0 -9
- package/dist/main/video/transformer.js +0 -68
- package/dist/main/video/videoStreamTrackProcessor.d.ts +0 -20
- package/dist/main/video/videoStreamTrackProcessor.js +0 -86
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 22.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 136aa70: Fix race on close
|
|
8
|
+
- ad47e6a: Log Segmenter with different level
|
|
9
|
+
- Updated dependencies [44ad859]
|
|
10
|
+
- Updated dependencies [514c523]
|
|
11
|
+
- @pexip/utils@17.4.0
|
|
12
|
+
|
|
13
|
+
## 22.0.0
|
|
14
|
+
|
|
15
|
+
### Major Changes
|
|
16
|
+
|
|
17
|
+
- 498ff3b: A full architectural overhaul of the video processing pipeline:
|
|
18
|
+
|
|
19
|
+
BREAKING CHANGES:
|
|
20
|
+
|
|
21
|
+
- **`createCanvasTransform` removed**
|
|
22
|
+
- **`createVideoTrackProcessor` / `createVideoTrackProcessorWithFallback`
|
|
23
|
+
removed**
|
|
24
|
+
- **`createVideoProcessor` redesigned** — now accepts a `Segmenter` +
|
|
25
|
+
`InputProcessAdaptor` instead of an array of `Transform`s. Exposes
|
|
26
|
+
`update()`, `mute()`, `status`, `renderOptions`, and processing dimensions.
|
|
27
|
+
- **New `InputProcessAdaptor` system**:
|
|
28
|
+
- `createMediaStreamTrackInputProcessAdaptor` — uses native
|
|
29
|
+
`MediaStreamTrack` transfer (Safari v18+ compatible).
|
|
30
|
+
- `createReadWritableStreamInputProcessAdaptor` — uses
|
|
31
|
+
`MediaStreamTrackProcessor` + `MediaStreamTrackGenerator`.
|
|
32
|
+
- `createReadWritableStreamFallbackInputProcessAdaptor` — canvas/video
|
|
33
|
+
element fallback.
|
|
34
|
+
- `getDefaultInputProcessAdaptor` — picks the best path via feature
|
|
35
|
+
detection (`MediaStreamTrackTransferable`).
|
|
36
|
+
- **`createSegmenter` updated**
|
|
37
|
+
- Now processes `MediaStreamTrack` or `ReadWritableStream` directly (no more
|
|
38
|
+
`VideoFrameLike`).
|
|
39
|
+
- Added `mute()` method.
|
|
40
|
+
- Added `stats` callback for frame timing data.
|
|
41
|
+
- Worker is no longer re-created on every `open()`.
|
|
42
|
+
- **Worker rewritten**:
|
|
43
|
+
- Processing now uses `TransformStream` to pipe `VideoFrame`s through
|
|
44
|
+
segmentation.
|
|
45
|
+
- Supports both track-based
|
|
46
|
+
(`VideoTrackGenerator`/`MediaStreamTrackProcessor`) and ReadWritable
|
|
47
|
+
stream processing.
|
|
48
|
+
- Added frame timing stats (`FrameTransformStats`) batched and posted back
|
|
49
|
+
to main thread.
|
|
50
|
+
- Removes direct canvas-copy output (`directOutput`/`output`); renderer now
|
|
51
|
+
writes to `processCanvas` and creates a new `VideoFrame`.
|
|
52
|
+
- `close` and `suspend` separated; resource cleanup improved.
|
|
53
|
+
- Background image fetching is now abortable.
|
|
54
|
+
- **`Renderer.render()` signature simplified** — accepts `OffscreenCanvas` +
|
|
55
|
+
`VideoFrame` directly (no `VideoFrameLike` wrapper).
|
|
56
|
+
- **WebGL/WebGPU texture renderers** updated to accept
|
|
57
|
+
`VideoFrame | ImageBitmap | OffscreenCanvas` natively.
|
|
58
|
+
- **WebGL program release guard** added to prevent double-free.
|
|
59
|
+
- **`benchUtils`** extended to accept explicit timestamps in
|
|
60
|
+
`begin()`/`end()` + tests added.
|
|
61
|
+
- **`MediaStreamTrackTransferable`** feature-detection helper exported.
|
|
62
|
+
- **Default frame rate raised** from 20 → 30 fps.
|
|
63
|
+
- **Default backend changed** to `webgpu`.
|
|
64
|
+
|
|
65
|
+
- fe0a0a4: Set a max width of 300px of in meeting selfview.
|
|
66
|
+
|
|
67
|
+
Rename openEffectsModal prop on InMeetingSelfview to openEffects
|
|
68
|
+
|
|
69
|
+
Make selfview muted indicator look more like an indicator
|
|
70
|
+
|
|
71
|
+
Show tooltips for background effects button and upload background effect
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- f8bd1c5: Fix VideoProcessor and Segment open/update behavior
|
|
76
|
+
- 925cce6: Fix f16 issue
|
|
77
|
+
- fb41d4d: Changes related to Typescript V6 Upgrade
|
|
78
|
+
- Updated dependencies [498ff3b]
|
|
79
|
+
- Updated dependencies [fb41d4d]
|
|
80
|
+
- Updated dependencies [b99c070]
|
|
81
|
+
- @pexip/utils@17.3.0
|
|
82
|
+
|
|
3
83
|
## 21.0.0
|
|
4
84
|
|
|
5
85
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -106,10 +106,12 @@ await audioGraph.release();
|
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
108
|
import {
|
|
109
|
+
createMediaStreamTrackInputProcessAdaptor,
|
|
110
|
+
createReadWritableStreamFallbackInputProcessAdaptor,
|
|
111
|
+
createReadWritableStreamInputProcessAdaptor,
|
|
109
112
|
createSegmenter,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
createVideoTrackProcessorWithFallback,
|
|
113
|
+
createVideoProcessor,
|
|
114
|
+
getDefaultInputProcessAdaptor,
|
|
113
115
|
} from '@pexip/media-processor';
|
|
114
116
|
|
|
115
117
|
// Grab the user's camera stream
|
|
@@ -129,17 +131,22 @@ const modelAsset = {
|
|
|
129
131
|
modelName: 'selfie' as const,
|
|
130
132
|
};
|
|
131
133
|
|
|
132
|
-
const segmenter = createSegmenter(tasksVisionBasePath, {
|
|
133
|
-
//
|
|
134
|
-
const
|
|
135
|
-
|
|
134
|
+
const segmenter = createSegmenter(tasksVisionBasePath, {modelAsset});
|
|
135
|
+
// Choose the appropriate input process adaptor based on browser capabilities
|
|
136
|
+
const inputProcessAdaptor = getDefaultInputProcessAdaptor(true);
|
|
137
|
+
// Create a processor and set the effects to `blur`
|
|
138
|
+
const processor = createVideoProcessor(segmenter, inputProcessAdaptor);
|
|
136
139
|
|
|
137
140
|
// Start the processor
|
|
138
141
|
await videoProcessor.open();
|
|
139
142
|
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
// Start the processor with blur effects
|
|
144
|
+
await processor.open({renderOptions: {effects: 'blur'}});
|
|
145
|
+
|
|
146
|
+
// Process the video track and create a new stream
|
|
147
|
+
const videoTrack = stream.getVideoTracks()[0];
|
|
148
|
+
const processedTrack = await processor.process(videoTrack);
|
|
149
|
+
const processedStream = new MediaStream([processedTrack]);
|
|
143
150
|
```
|
|
144
151
|
|
|
145
152
|
## Profiling Web Audio
|
package/api-docs/README.mdx
CHANGED
|
@@ -106,10 +106,12 @@ await audioGraph.release();
|
|
|
106
106
|
|
|
107
107
|
```typescript
|
|
108
108
|
import {
|
|
109
|
+
createMediaStreamTrackInputProcessAdaptor,
|
|
110
|
+
createReadWritableStreamFallbackInputProcessAdaptor,
|
|
111
|
+
createReadWritableStreamInputProcessAdaptor,
|
|
109
112
|
createSegmenter,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
createVideoTrackProcessorWithFallback,
|
|
113
|
+
createVideoProcessor,
|
|
114
|
+
getDefaultInputProcessAdaptor,
|
|
113
115
|
} from '@pexip/media-processor';
|
|
114
116
|
|
|
115
117
|
// Grab the user's camera stream
|
|
@@ -129,17 +131,22 @@ const modelAsset = {
|
|
|
129
131
|
modelName: 'selfie' as const,
|
|
130
132
|
};
|
|
131
133
|
|
|
132
|
-
const segmenter = createSegmenter(tasksVisionBasePath, {
|
|
133
|
-
//
|
|
134
|
-
const
|
|
135
|
-
|
|
134
|
+
const segmenter = createSegmenter(tasksVisionBasePath, {modelAsset});
|
|
135
|
+
// Choose the appropriate input process adaptor based on browser capabilities
|
|
136
|
+
const inputProcessAdaptor = getDefaultInputProcessAdaptor(true);
|
|
137
|
+
// Create a processor and set the effects to `blur`
|
|
138
|
+
const processor = createVideoProcessor(segmenter, inputProcessAdaptor);
|
|
136
139
|
|
|
137
140
|
// Start the processor
|
|
138
141
|
await videoProcessor.open();
|
|
139
142
|
|
|
140
|
-
//
|
|
141
|
-
|
|
142
|
-
|
|
143
|
+
// Start the processor with blur effects
|
|
144
|
+
await processor.open({renderOptions: {effects: 'blur'}});
|
|
145
|
+
|
|
146
|
+
// Process the video track and create a new stream
|
|
147
|
+
const videoTrack = stream.getVideoTracks()[0];
|
|
148
|
+
const processedTrack = await processor.process(videoTrack);
|
|
149
|
+
const processedStream = new MediaStream([processedTrack]);
|
|
143
150
|
```
|
|
144
151
|
|
|
145
152
|
## Profiling Web Audio
|
|
@@ -193,11 +200,13 @@ A library for media analysis using Web APIs.
|
|
|
193
200
|
| Interface | Description |
|
|
194
201
|
| ------ | ------ |
|
|
195
202
|
| [Segmentation](interfaces/Segmentation.mdx) | - |
|
|
203
|
+
| [ReadWritableStream](interfaces/ReadWritableStream.mdx) | - |
|
|
196
204
|
| [VideoFrameLike](interfaces/VideoFrameLike.mdx) | - |
|
|
197
205
|
| [ImageRecord](interfaces/ImageRecord.mdx) | - |
|
|
198
206
|
| [Rect](interfaces/Rect.mdx) | - |
|
|
199
207
|
| [ProcessEventOpen](interfaces/ProcessEventOpen.mdx) | Message event to initializing the Processor |
|
|
200
208
|
| [ProcessEventProcess](interfaces/ProcessEventProcess.mdx) | Message event to process the video frame |
|
|
209
|
+
| [ProcessEventMute](interfaces/ProcessEventMute.mdx) | - |
|
|
201
210
|
| [ProcessEventUpdate](interfaces/ProcessEventUpdate.mdx) | Message event to update processor options |
|
|
202
211
|
| [ProcessEventClose](interfaces/ProcessEventClose.mdx) | Message event to stop the processing |
|
|
203
212
|
| [ProcessEventDestroy](interfaces/ProcessEventDestroy.mdx) | Message event to release all the resources |
|
|
@@ -205,8 +214,11 @@ A library for media analysis using Web APIs.
|
|
|
205
214
|
| [ProcessWorkerEventProcessed](interfaces/ProcessWorkerEventProcessed.mdx) | - |
|
|
206
215
|
| [ProcessWorkerEventOpened](interfaces/ProcessWorkerEventOpened.mdx) | - |
|
|
207
216
|
| [ProcessWorkerEventUpdated](interfaces/ProcessWorkerEventUpdated.mdx) | - |
|
|
217
|
+
| [ProcessWorkerEventClosed](interfaces/ProcessWorkerEventClosed.mdx) | - |
|
|
208
218
|
| [ProcessWorkerEvent](interfaces/ProcessWorkerEvent.mdx) | - |
|
|
209
219
|
| [ProcessWorkerEventDebug](interfaces/ProcessWorkerEventDebug.mdx) | - |
|
|
220
|
+
| [FrameTransformStats](interfaces/FrameTransformStats.mdx) | Frame transform statistic, i.e. the timing data for processing each frame |
|
|
221
|
+
| [ProcessWorkerEventStats](interfaces/ProcessWorkerEventStats.mdx) | - |
|
|
210
222
|
| [ProcessorOptions](interfaces/ProcessorOptions.mdx) | - |
|
|
211
223
|
| [ProcessorProcessOptions](interfaces/ProcessorProcessOptions.mdx) | - |
|
|
212
224
|
| [ProcessWorkerDebugMessage](interfaces/ProcessWorkerDebugMessage.mdx) | - |
|
|
@@ -242,13 +254,12 @@ A library for media analysis using Web APIs.
|
|
|
242
254
|
| [Clock](interfaces/Clock.mdx) | Clock interface to get the current time with now method, |
|
|
243
255
|
| [ThrottleOptions](interfaces/ThrottleOptions.mdx) | Limit the rate of flow in terms of millisecond, and provided Clock |
|
|
244
256
|
| [Runner](interfaces/Runner.mdx) | - |
|
|
245
|
-
| [Transform](interfaces/Transform.mdx) | - |
|
|
246
257
|
| [AsyncAssets](interfaces/AsyncAssets.mdx) | - |
|
|
247
258
|
| [Process](interfaces/Process.mdx) | - |
|
|
248
259
|
| [BackgroundImage](interfaces/BackgroundImage.mdx) | - |
|
|
249
260
|
| [Segmenter](interfaces/Segmenter.mdx) | - |
|
|
250
|
-
| [
|
|
251
|
-
| [
|
|
261
|
+
| [InputProcessAdaptor](interfaces/InputProcessAdaptor.mdx) | - |
|
|
262
|
+
| [ProcessorUpdateOptions](interfaces/ProcessorUpdateOptions.mdx) | - |
|
|
252
263
|
| [VideoProcessor](interfaces/VideoProcessor.mdx) | - |
|
|
253
264
|
|
|
254
265
|
## Type Aliases
|
|
@@ -266,6 +277,7 @@ A library for media analysis using Web APIs.
|
|
|
266
277
|
| [ProcessWorkerEvents](type-aliases/ProcessWorkerEvents.mdx) | Message events returned from the processor |
|
|
267
278
|
| [ProcessorEvents](type-aliases/ProcessorEvents.mdx) | - |
|
|
268
279
|
| [ProcessorWorkerEvents](type-aliases/ProcessorWorkerEvents.mdx) | - |
|
|
280
|
+
| [Struct](type-aliases/Struct.mdx) | - |
|
|
269
281
|
| [SegmentationModel](type-aliases/SegmentationModel.mdx) | - |
|
|
270
282
|
| [Delegate](type-aliases/Delegate.mdx) | - |
|
|
271
283
|
| [ExtractMessageEventType](type-aliases/ExtractMessageEventType.mdx) | - |
|
|
@@ -307,10 +319,9 @@ A library for media analysis using Web APIs.
|
|
|
307
319
|
| [Callback](type-aliases/Callback.mdx) | - |
|
|
308
320
|
| [RunnerCreator](type-aliases/RunnerCreator.mdx) | - |
|
|
309
321
|
| [WasmPaths](type-aliases/WasmPaths.mdx) | - |
|
|
322
|
+
| [Logger](type-aliases/Logger.mdx) | - |
|
|
310
323
|
| [Color](type-aliases/Color.mdx) | - |
|
|
311
324
|
| [InputFrame](type-aliases/InputFrame.mdx) | - |
|
|
312
|
-
| [SegmentationTransform](type-aliases/SegmentationTransform.mdx) | - |
|
|
313
|
-
| [ProcessVideoTrack](type-aliases/ProcessVideoTrack.mdx) | - |
|
|
314
325
|
|
|
315
326
|
## Variables
|
|
316
327
|
|
|
@@ -342,18 +353,24 @@ A library for media analysis using Web APIs.
|
|
|
342
353
|
| [RENDER\_EFFECT](variables/RENDER_EFFECT.mdx) | - |
|
|
343
354
|
| [RENDER\_BACKEND](variables/RENDER_BACKEND.mdx) | - |
|
|
344
355
|
| [RENDERING\_EVENTS](variables/RENDERING_EVENTS.mdx) | - |
|
|
356
|
+
| [isValidGpuAPI](variables/isValidGpuAPI.mdx) | - |
|
|
357
|
+
| [isRenderOptionsKey](variables/isRenderOptionsKey.mdx) | - |
|
|
358
|
+
| [RENDERER\_OPTIONS\_STRUCT](variables/RENDERER_OPTIONS_STRUCT.mdx) | - |
|
|
345
359
|
| [SEGMENTATION\_MODELS](variables/SEGMENTATION_MODELS.mdx) | - |
|
|
346
360
|
| [isSegmentationModel](variables/isSegmentationModel.mdx) | - |
|
|
347
361
|
| [isRenderingEvents](variables/isRenderingEvents.mdx) | - |
|
|
348
362
|
| [toRenderingEvents](variables/toRenderingEvents.mdx) | - |
|
|
349
363
|
| [getErrorMessage](variables/getErrorMessage.mdx) | - |
|
|
350
364
|
| [createObjectUpdater](variables/createObjectUpdater.mdx) | - |
|
|
365
|
+
| [ImageFetchError](variables/ImageFetchError.mdx) | - |
|
|
351
366
|
| [createRemoteImageBitmap](variables/createRemoteImageBitmap.mdx) | - |
|
|
352
367
|
| [clamping](variables/clamping.mdx) | - |
|
|
353
368
|
| [calculateMaxBlurPass](variables/calculateMaxBlurPass.mdx) | - |
|
|
354
369
|
| [resize](variables/resize.mdx) | Calculate the coordinates and size of the source and destination to fit the target aspect ratio. |
|
|
355
370
|
| [createLazyProps](variables/createLazyProps.mdx) | - |
|
|
356
371
|
| [handleWebGLContextLoss](variables/handleWebGLContextLoss.mdx) | - |
|
|
372
|
+
| [cloneImageRecord](variables/cloneImageRecord.mdx) | - |
|
|
373
|
+
| [compareImageRecords](variables/compareImageRecords.mdx) | Compare provided ImageRecord |
|
|
357
374
|
| [urls](variables/urls.mdx) | - |
|
|
358
375
|
| [SILENT\_THRESHOLD](variables/SILENT_THRESHOLD.mdx) | Default silent threshold At least one LSB 16-bit data (compare is on absolute value). |
|
|
359
376
|
| [MONO\_THRESHOLD](variables/MONO_THRESHOLD.mdx) | Default mono detection threshold Data must be identical within one LSB 16-bit to be identified as mono. |
|
|
@@ -361,6 +378,7 @@ A library for media analysis using Web APIs.
|
|
|
361
378
|
| [CLIP\_THRESHOLD](variables/CLIP_THRESHOLD.mdx) | Default clipping detection threshold |
|
|
362
379
|
| [VOICE\_PROBABILITY\_THRESHOLD](variables/VOICE_PROBABILITY_THRESHOLD.mdx) | Default Voice probability threshold |
|
|
363
380
|
| [CLIP\_COUNT\_THRESHOLD](variables/CLIP_COUNT_THRESHOLD.mdx) | Default clipping count threshold Number of consecutive clipThreshold level samples that indicate clipping. |
|
|
381
|
+
| [MediaStreamTrackTransferable](variables/MediaStreamTrackTransferable.mdx) | Result of the feature detection if `MediaStreamTrack` is `Transferable` |
|
|
364
382
|
| [FRAME\_RATE](variables/FRAME_RATE.mdx) | - |
|
|
365
383
|
| [PLAY\_VIDEO\_TIMEOUT](variables/PLAY_VIDEO_TIMEOUT.mdx) | - |
|
|
366
384
|
|
|
@@ -368,7 +386,7 @@ A library for media analysis using Web APIs.
|
|
|
368
386
|
|
|
369
387
|
| Function | Description |
|
|
370
388
|
| ------ | ------ |
|
|
371
|
-
| [nearestPowerOfTwo](functions/nearestPowerOfTwo.mdx) | Coerce any positive number to the nearest power of two within [minPow, maxPow] Example: nearestPowerOfTwo(13)
|
|
389
|
+
| [nearestPowerOfTwo](functions/nearestPowerOfTwo.mdx) | Coerce any positive number to the nearest power of two within [minPow, maxPow] Example: nearestPowerOfTwo(13) =\> 16; nearestPowerOfTwo(3.2) =\> 4 |
|
|
372
390
|
| [iou](functions/iou.mdx) | Intersection over Union (IoU), how much two masks overlap as a fraction of either's total. 1.0 = perfect match, 0 = no overlap. Used for stable, robust tracking of the main person between frames, especially with bystander removal and temporal instance switching. |
|
|
373
391
|
| [labelComponents](functions/labelComponents.mdx) | - |
|
|
374
392
|
| [scoreComponent](functions/scoreComponent.mdx) | - |
|
|
@@ -419,18 +437,21 @@ A library for media analysis using Web APIs.
|
|
|
419
437
|
| [isAudioNodeInit](functions/isAudioNodeInit.mdx) | - |
|
|
420
438
|
| [isAnalyzerNodeInit](functions/isAnalyzerNodeInit.mdx) | - |
|
|
421
439
|
| [createAsyncCallbackLoop](functions/createAsyncCallbackLoop.mdx) | Create an async callback loop to be called recursively with delay based on the `frameRate` |
|
|
422
|
-
| [
|
|
440
|
+
| [createReadWritableStreamInputProcessAdaptor](functions/createReadWritableStreamInputProcessAdaptor.mdx) | An implementation of `InputProcessAdaptor` which uses `MediaStreamTrackGenerator` and `MediaStreamTrackProcessor` APIs to create `ReadableStream` & `WritableStream` |
|
|
441
|
+
| [createReadWritableStreamFallbackInputProcessAdaptor](functions/createReadWritableStreamFallbackInputProcessAdaptor.mdx) | An implementation of `InputProcessAdaptor` which uses `HTMLCanvasElement` or `OffscreenCanvas` API to create `ReadableStream` & `WritableStream` |
|
|
442
|
+
| [createMediaStreamTrackInputProcessAdaptor](functions/createMediaStreamTrackInputProcessAdaptor.mdx) | An implementation of `InputProcessAdaptor` which adapts `MediaStreamTrack` directly as specified from the spec https://w3c.github.io/mediacapture-transform |
|
|
443
|
+
| [getDefaultInputProcessAdaptor](functions/getDefaultInputProcessAdaptor.mdx) | Get the supported InputProcessAdaptor based on feature detection and preference provided |
|
|
423
444
|
| [loadScript](functions/loadScript.mdx) | - |
|
|
424
445
|
| [loadWasms](functions/loadWasms.mdx) | - |
|
|
425
446
|
| [createSegmenter](functions/createSegmenter.mdx) | - |
|
|
426
447
|
| [isRenderEffects](functions/isRenderEffects.mdx) | - |
|
|
448
|
+
| [isMediaStreamVideoTrack](functions/isMediaStreamVideoTrack.mdx) | - |
|
|
449
|
+
| [assertMediaStreamVideoTrack](functions/assertMediaStreamVideoTrack.mdx) | - |
|
|
427
450
|
| [createCanvas](functions/createCanvas.mdx) | Create a Canvas element with provided width and height |
|
|
428
451
|
| [setVideoElementSrc](functions/setVideoElementSrc.mdx) | - |
|
|
429
452
|
| [playVideo](functions/playVideo.mdx) | - |
|
|
430
453
|
| [createFrameCallbackRequest](functions/createFrameCallbackRequest.mdx) | Create a callback loop for video frame processing using `requestVideoFrameCallback` under-the-hood when available otherwise our fallback implementation based on `setTimeout`. |
|
|
431
454
|
| [createVideoProcessor](functions/createVideoProcessor.mdx) | - |
|
|
432
|
-
| [createVideoTrackProcessor](functions/createVideoTrackProcessor.mdx) | Video track processor using MediaStreamTrackProcessor API |
|
|
433
|
-
| [createVideoTrackProcessorWithFallback](functions/createVideoTrackProcessorWithFallback.mdx) | Video track processor using Canvas[captureStream] API |
|
|
434
455
|
| [calculateDistance](functions/calculateDistance.mdx) | Calculate the distance between two Points |
|
|
435
456
|
| [getBezierCurveControlPoints](functions/getBezierCurveControlPoints.mdx) | Spline Interpolation for Bezier Curve |
|
|
436
457
|
| [line](functions/line.mdx) | Create a straight line path command |
|
|
@@ -12,16 +12,16 @@ the `frameRate`
|
|
|
12
12
|
|
|
13
13
|
| Type Parameter |
|
|
14
14
|
| ------ |
|
|
15
|
-
| `P
|
|
16
|
-
| `R
|
|
15
|
+
| `P extends unknown[]` |
|
|
16
|
+
| `R extends Promise<unknown>` |
|
|
17
17
|
|
|
18
18
|
## Parameters
|
|
19
19
|
|
|
20
20
|
| Parameter | Type | Description |
|
|
21
21
|
| ------ | ------ | ------ |
|
|
22
|
-
| `callback` | [`Callback
|
|
22
|
+
| `callback` | [`Callback<R, P>`](../type-aliases/Callback.mdx) | The callback to be invoked |
|
|
23
23
|
| `frameRate` | `number` | The rate to be expected to invoke the `callback` |
|
|
24
|
-
| `__namedParameters` | `Partial
|
|
24
|
+
| `__namedParameters` | `Partial<AsyncCallbackLoopOptions>` | - |
|
|
25
25
|
|
|
26
26
|
## Returns
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ the `frameRate`
|
|
|
29
29
|
|
|
30
30
|
| Name | Type |
|
|
31
31
|
| ------ | ------ |
|
|
32
|
-
| `start()` | (
|
|
33
|
-
| `stop()` | () =>
|
|
32
|
+
| `start()` | `(...params) => Promise<void>` |
|
|
33
|
+
| `stop()` | `() => void` |
|
|
34
34
|
| `get frameRate` | `number` |
|
|
35
35
|
| `set frameRate` | `void` |
|
|
@@ -18,8 +18,8 @@ lastCheck | silent | should call onSignalDetected
|
|
|
18
18
|
|
|
19
19
|
| Parameter | Type |
|
|
20
20
|
| ------ | ------ |
|
|
21
|
-
| `shouldDetect` | () =>
|
|
22
|
-
| `onDetected` | (
|
|
21
|
+
| `shouldDetect` | `() => boolean` |
|
|
22
|
+
| `onDetected` | `(silent) => void` |
|
|
23
23
|
|
|
24
24
|
## Returns
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ lastCheck | silent | should call onSignalDetected
|
|
|
31
31
|
|
|
32
32
|
| Parameter | Type |
|
|
33
33
|
| ------ | ------ |
|
|
34
|
-
| `buffer` | `Queue
|
|
34
|
+
| `buffer` | `Queue<number[]>` |
|
|
35
35
|
| `threshold?` | `number` |
|
|
36
36
|
|
|
37
37
|
### Returns
|
|
@@ -44,7 +44,7 @@ lastCheck | silent | should call onSignalDetected
|
|
|
44
44
|
|
|
45
45
|
| Parameter | Type |
|
|
46
46
|
| ------ | ------ |
|
|
47
|
-
| `samples` | `number
|
|
47
|
+
| `samples` | `number[]` |
|
|
48
48
|
|
|
49
49
|
#### Returns
|
|
50
50
|
|
|
@@ -9,7 +9,7 @@ AudioStats builder
|
|
|
9
9
|
| Parameter | Type | Description |
|
|
10
10
|
| ------ | ------ | ------ |
|
|
11
11
|
| `stats` | `Partial`\<[`AudioStats`](../interfaces/AudioStats.mdx)\> | overwrite the default attributes |
|
|
12
|
-
| `options` |
|
|
12
|
+
| `options` | `{ silentThreshold?: number; lowVolumeThreshold?: number; clipCountThreshold?: number; }` | `silentThreshold`, `lowVolumeThreshold` and `clipCountThreshold` |
|
|
13
13
|
| `options.silentThreshold?` | `number` | - |
|
|
14
14
|
| `options.lowVolumeThreshold?` | `number` | - |
|
|
15
15
|
| `options.clipCountThreshold?` | `number` | - |
|
|
@@ -12,7 +12,7 @@ Create a ChannelSplitterNode
|
|
|
12
12
|
|
|
13
13
|
## Returns
|
|
14
14
|
|
|
15
|
-
[`AudioNodeInit
|
|
15
|
+
[`AudioNodeInit<ChannelSplitterNode, ChannelSplitterNode>`](../interfaces/AudioNodeInit.mdx)
|
|
16
16
|
|
|
17
17
|
## See
|
|
18
18
|
|
|
@@ -9,8 +9,8 @@ Create a noise suppression node
|
|
|
9
9
|
| Parameter | Type | Description |
|
|
10
10
|
| ------ | ------ | ------ |
|
|
11
11
|
| `data` | `BufferSource` | WebAssembly source |
|
|
12
|
-
| `messageHandler?` | (
|
|
12
|
+
| `messageHandler?` | `(vads) => void` | - |
|
|
13
13
|
|
|
14
14
|
## Returns
|
|
15
15
|
|
|
16
|
-
[`AudioNodeInit
|
|
16
|
+
[`AudioNodeInit<AudioWorkletNode, AudioWorkletNode>`](../interfaces/AudioNodeInit.mdx)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
```ts
|
|
2
|
-
function createFrameCallbackRequest(
|
|
2
|
+
function createFrameCallbackRequest<T>(
|
|
3
3
|
callback,
|
|
4
4
|
frameRate,
|
|
5
5
|
__namedParameters): object;
|
|
@@ -9,11 +9,17 @@ Create a callback loop for video frame processing using
|
|
|
9
9
|
`requestVideoFrameCallback` under-the-hood when available otherwise our
|
|
10
10
|
fallback implementation based on `setTimeout`.
|
|
11
11
|
|
|
12
|
+
## Type Parameters
|
|
13
|
+
|
|
14
|
+
| Type Parameter |
|
|
15
|
+
| ------ |
|
|
16
|
+
| `T` |
|
|
17
|
+
|
|
12
18
|
## Parameters
|
|
13
19
|
|
|
14
20
|
| Parameter | Type | Description |
|
|
15
21
|
| ------ | ------ | ------ |
|
|
16
|
-
| `callback` | [`Callback`](../type-aliases/Callback.mdx)\<`Promise
|
|
22
|
+
| `callback` | [`Callback`](../type-aliases/Callback.mdx)\<`Promise<void>`, \[`T`\]\> | To be called by the loop |
|
|
17
23
|
| `frameRate` | `number` | A fallback frame rate when we are not able to get the rate from API |
|
|
18
24
|
| `__namedParameters` | `FrameCallbackRequestOptions` | - |
|
|
19
25
|
|
|
@@ -23,7 +29,7 @@ fallback implementation based on `setTimeout`.
|
|
|
23
29
|
|
|
24
30
|
| Name | Type |
|
|
25
31
|
| ------ | ------ |
|
|
26
|
-
| `start()` | (
|
|
27
|
-
| `stop()` | () =>
|
|
32
|
+
| `start()` | `(input) => Promise<void>` |
|
|
33
|
+
| `stop()` | `() => void` |
|
|
28
34
|
| `get frameRate` | `number` |
|
|
29
35
|
| `set frameRate` | `void` |
|
|
@@ -12,4 +12,4 @@ Create a MediaStreamAudioSourceNodeInit
|
|
|
12
12
|
|
|
13
13
|
## Returns
|
|
14
14
|
|
|
15
|
-
[`AudioNodeInit
|
|
15
|
+
[`AudioNodeInit<MediaElementAudioSourceNode, MediaElementAudioSourceNode>`](../interfaces/AudioNodeInit.mdx)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
function createMediaStreamTrackInputProcessAdaptor(): InputProcessAdaptor;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
An implementation of `InputProcessAdaptor` which adapts `MediaStreamTrack`
|
|
6
|
+
directly as specified from the spec https://w3c.github.io/mediacapture-transform
|
|
7
|
+
|
|
8
|
+
## Returns
|
|
9
|
+
|
|
10
|
+
[`InputProcessAdaptor`](../interfaces/InputProcessAdaptor.mdx)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
function createReadWritableStreamFallbackInputProcessAdaptor(__namedParameters): InputProcessAdaptor;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
An implementation of `InputProcessAdaptor` which uses `HTMLCanvasElement` or
|
|
6
|
+
`OffscreenCanvas` API to create `ReadableStream` & `WritableStream`
|
|
7
|
+
|
|
8
|
+
## Parameters
|
|
9
|
+
|
|
10
|
+
| Parameter | Type | Description |
|
|
11
|
+
| ------ | ------ | ------ |
|
|
12
|
+
| `__namedParameters` | `{ frameRate: number; }` | - |
|
|
13
|
+
| `__namedParameters.frameRate` | `number` | Fallback frame rate |
|
|
14
|
+
|
|
15
|
+
## Returns
|
|
16
|
+
|
|
17
|
+
[`InputProcessAdaptor`](../interfaces/InputProcessAdaptor.mdx)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
function createReadWritableStreamInputProcessAdaptor(): InputProcessAdaptor;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
An implementation of `InputProcessAdaptor` which uses `MediaStreamTrackGenerator` and
|
|
6
|
+
`MediaStreamTrackProcessor` APIs to create `ReadableStream` & `WritableStream`
|
|
7
|
+
|
|
8
|
+
## Returns
|
|
9
|
+
|
|
10
|
+
[`InputProcessAdaptor`](../interfaces/InputProcessAdaptor.mdx)
|
|
@@ -6,7 +6,7 @@ function createSegmenter(basePath, __namedParameters): Segmenter;
|
|
|
6
6
|
|
|
7
7
|
| Parameter | Type | Default value | Description |
|
|
8
8
|
| ------ | ------ | ------ | ------ |
|
|
9
|
-
| `basePath` | `string
|
|
9
|
+
| `basePath` | `string \| undefined` | `'/'` | A base path to specify the directory the Wasm files should be loaded from. If not provided, it will be loaded from the host's root directory. **See** [FileResolver](https://ai.google.dev/edge/api/mediapipe/js/tasks-vision.filesetresolver#filesetresolverforvisiontasks) |
|
|
10
10
|
| `__namedParameters` | `Options` | `...` | - |
|
|
11
11
|
|
|
12
12
|
## Returns
|
|
@@ -12,4 +12,4 @@ Create a MediaStreamAudioDestinationNodeInit
|
|
|
12
12
|
|
|
13
13
|
## Returns
|
|
14
14
|
|
|
15
|
-
[`AudioNodeInit
|
|
15
|
+
[`AudioNodeInit<MediaStreamAudioDestinationNode, MediaStreamAudioDestinationNode>`](../interfaces/AudioNodeInit.mdx)
|
|
@@ -13,4 +13,4 @@ Create a MediaStreamAudioSourceNodeInit
|
|
|
13
13
|
|
|
14
14
|
## Returns
|
|
15
15
|
|
|
16
|
-
[`AudioNodeInit
|
|
16
|
+
[`AudioNodeInit<MediaStreamAudioSourceNode, MediaStreamAudioSourceNode>`](../interfaces/AudioNodeInit.mdx)
|
|
@@ -11,8 +11,8 @@ Create a voice detector based on provided params
|
|
|
11
11
|
|
|
12
12
|
| Parameter | Type | Description |
|
|
13
13
|
| ------ | ------ | ------ |
|
|
14
|
-
| `onDetected` | () =>
|
|
15
|
-
| `shouldDetect` | () =>
|
|
14
|
+
| `onDetected` | `() => void` | When there is voice activity, this callback will be called |
|
|
15
|
+
| `shouldDetect` | `() => boolean` | When return `true`, voice activity will function, otherwise, not function |
|
|
16
16
|
| `options?` | [`ThrottleOptions`](../interfaces/ThrottleOptions.mdx) | |
|
|
17
17
|
|
|
18
18
|
## Returns
|
|
@@ -31,7 +31,7 @@ Create a voice detector based on provided params
|
|
|
31
31
|
|
|
32
32
|
| Parameter | Type |
|
|
33
33
|
| ------ | ------ |
|
|
34
|
-
| `isVoice` | [`IsVoice
|
|
34
|
+
| `isVoice` | [`IsVoice<T>`](../type-aliases/IsVoice.mdx) |
|
|
35
35
|
|
|
36
36
|
### Returns
|
|
37
37
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
```ts
|
|
2
|
-
function createVideoProcessor(
|
|
2
|
+
function createVideoProcessor(segmenter, inputProcessAdaptor): VideoProcessor;
|
|
3
3
|
```
|
|
4
4
|
|
|
5
5
|
## Parameters
|
|
6
6
|
|
|
7
7
|
| Parameter | Type |
|
|
8
8
|
| ------ | ------ |
|
|
9
|
-
| `
|
|
10
|
-
| `
|
|
9
|
+
| `segmenter` | [`Segmenter`](../interfaces/Segmenter.mdx) |
|
|
10
|
+
| `inputProcessAdaptor` | [`InputProcessAdaptor`](../interfaces/InputProcessAdaptor.mdx) |
|
|
11
11
|
|
|
12
12
|
## Returns
|
|
13
13
|
|