@pexip/media-processor 20.3.4 → 20.3.5

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.
Files changed (206) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/api-docs/README.mdx +411 -0
  3. package/api-docs/enumerations/AbortReason.mdx +5 -0
  4. package/api-docs/functions/avg.mdx +15 -0
  5. package/api-docs/functions/calculateDistance.mdx +18 -0
  6. package/api-docs/functions/closedCurve.mdx +27 -0
  7. package/api-docs/functions/copyByteBufferToFloatBuffer.mdx +16 -0
  8. package/api-docs/functions/createAnalyzerGraphNode.mdx +19 -0
  9. package/api-docs/functions/createAnalyzerSubscribableGraphNode.mdx +15 -0
  10. package/api-docs/functions/createAsyncCallbackLoop.mdx +35 -0
  11. package/api-docs/functions/createAudioContext.mdx +22 -0
  12. package/api-docs/functions/createAudioDestinationGraphNode.mdx +9 -0
  13. package/api-docs/functions/createAudioGraph.mdx +28 -0
  14. package/api-docs/functions/createAudioGraphProxy.mdx +14 -0
  15. package/api-docs/functions/createAudioSignalDetector.mdx +51 -0
  16. package/api-docs/functions/createAudioStats.mdx +19 -0
  17. package/api-docs/functions/createBenchmark.mdx +14 -0
  18. package/api-docs/functions/createCanvas.mdx +16 -0
  19. package/api-docs/functions/createCanvasTransform.mdx +14 -0
  20. package/api-docs/functions/createChannelMergerGraphNode.mdx +19 -0
  21. package/api-docs/functions/createChannelSplitterGraphNode.mdx +19 -0
  22. package/api-docs/functions/createDelayGraphNode.mdx +19 -0
  23. package/api-docs/functions/createDenoiseWorkletGraphNode.mdx +16 -0
  24. package/api-docs/functions/createFrameCallbackRequest.mdx +29 -0
  25. package/api-docs/functions/createGainGraphNode.mdx +15 -0
  26. package/api-docs/functions/createMediaElementSourceGraphNode.mdx +15 -0
  27. package/api-docs/functions/createSegmenter.mdx +14 -0
  28. package/api-docs/functions/createStreamDestinationGraphNode.mdx +15 -0
  29. package/api-docs/functions/createStreamSourceGraphNode.mdx +16 -0
  30. package/api-docs/functions/createVADetector.mdx +54 -0
  31. package/api-docs/functions/createVideoProcessor.mdx +14 -0
  32. package/api-docs/functions/createVideoTrackProcessor.mdx +9 -0
  33. package/api-docs/functions/createVideoTrackProcessorWithFallback.mdx +15 -0
  34. package/api-docs/functions/createVoiceDetectorFromProbability.mdx +15 -0
  35. package/api-docs/functions/createVoiceDetectorFromTimeData.mdx +19 -0
  36. package/api-docs/functions/curve.mdx +15 -0
  37. package/api-docs/functions/fromByteToFloat.mdx +27 -0
  38. package/api-docs/functions/fromFloatToByte.mdx +27 -0
  39. package/api-docs/functions/getAudioStats.mdx +19 -0
  40. package/api-docs/functions/getBezierCurveControlPoints.mdx +26 -0
  41. package/api-docs/functions/isAnalyzerNodeInit.mdx +13 -0
  42. package/api-docs/functions/isAudioNode.mdx +13 -0
  43. package/api-docs/functions/isAudioNodeInit.mdx +13 -0
  44. package/api-docs/functions/isAudioParam.mdx +13 -0
  45. package/api-docs/functions/isClipping.mdx +18 -0
  46. package/api-docs/functions/isEqualSize.mdx +22 -0
  47. package/api-docs/functions/isLowVolume.mdx +19 -0
  48. package/api-docs/functions/isMono.mdx +22 -0
  49. package/api-docs/functions/isRenderEffects.mdx +13 -0
  50. package/api-docs/functions/isSilent.mdx +22 -0
  51. package/api-docs/functions/isVoiceActivity.mdx +29 -0
  52. package/api-docs/functions/line.mdx +15 -0
  53. package/api-docs/functions/loadScript.mdx +14 -0
  54. package/api-docs/functions/loadWasms.mdx +13 -0
  55. package/api-docs/functions/pow.mdx +29 -0
  56. package/api-docs/functions/processAverageVolume.mdx +15 -0
  57. package/api-docs/functions/resumeAudioOnInterruption.mdx +23 -0
  58. package/api-docs/functions/resumeAudioOnUnmute.mdx +27 -0
  59. package/api-docs/functions/rms.mdx +15 -0
  60. package/api-docs/functions/round.mdx +23 -0
  61. package/api-docs/functions/subscribeTimeoutAnalyzerNode.mdx +22 -0
  62. package/api-docs/functions/subscribeWorkletNode.mdx +28 -0
  63. package/api-docs/functions/sum.mdx +15 -0
  64. package/api-docs/functions/toDecibel.mdx +18 -0
  65. package/api-docs/interfaces/Analyzer.mdx +368 -0
  66. package/api-docs/interfaces/AnalyzerSubscribableOptions.mdx +11 -0
  67. package/api-docs/interfaces/AsyncAssets.mdx +7 -0
  68. package/api-docs/interfaces/AudioGraph.mdx +92 -0
  69. package/api-docs/interfaces/AudioGraphOptions.mdx +6 -0
  70. package/api-docs/interfaces/AudioNodeInit.mdx +127 -0
  71. package/api-docs/interfaces/AudioNodeProps.mdx +15 -0
  72. package/api-docs/interfaces/AudioStats.mdx +16 -0
  73. package/api-docs/interfaces/BackgroundImage.mdx +6 -0
  74. package/api-docs/interfaces/Benchmark.mdx +35 -0
  75. package/api-docs/interfaces/Clock.mdx +11 -0
  76. package/api-docs/interfaces/Denoise.mdx +50 -0
  77. package/api-docs/interfaces/Detector.mdx +81 -0
  78. package/api-docs/interfaces/Frame.mdx +11 -0
  79. package/api-docs/interfaces/Gain.mdx +227 -0
  80. package/api-docs/interfaces/ImageRecord.mdx +6 -0
  81. package/api-docs/interfaces/ImageSegmenterOptions.mdx +8 -0
  82. package/api-docs/interfaces/MPMask.mdx +145 -0
  83. package/api-docs/interfaces/Point.mdx +10 -0
  84. package/api-docs/interfaces/Process.mdx +46 -0
  85. package/api-docs/interfaces/ProcessEventClose.mdx +7 -0
  86. package/api-docs/interfaces/ProcessEventDebug.mdx +14 -0
  87. package/api-docs/interfaces/ProcessEventDestroy.mdx +7 -0
  88. package/api-docs/interfaces/ProcessEventOpen.mdx +14 -0
  89. package/api-docs/interfaces/ProcessEventProcess.mdx +14 -0
  90. package/api-docs/interfaces/ProcessEventUpdate.mdx +14 -0
  91. package/api-docs/interfaces/ProcessWorkerDebugMessage.mdx +6 -0
  92. package/api-docs/interfaces/ProcessWorkerEvent.mdx +12 -0
  93. package/api-docs/interfaces/ProcessWorkerEventDebug.mdx +12 -0
  94. package/api-docs/interfaces/ProcessWorkerEventOpened.mdx +5 -0
  95. package/api-docs/interfaces/ProcessWorkerEventProcessed.mdx +12 -0
  96. package/api-docs/interfaces/ProcessWorkerEventUpdated.mdx +5 -0
  97. package/api-docs/interfaces/ProcessorEvent.mdx +7 -0
  98. package/api-docs/interfaces/ProcessorOptions.mdx +16 -0
  99. package/api-docs/interfaces/ProcessorProcessOptions.mdx +6 -0
  100. package/api-docs/interfaces/Rect.mdx +8 -0
  101. package/api-docs/interfaces/RenderEventHandlers.mdx +7 -0
  102. package/api-docs/interfaces/Renderer.mdx +64 -0
  103. package/api-docs/interfaces/RendererOptions.mdx +15 -0
  104. package/api-docs/interfaces/Runner.mdx +41 -0
  105. package/api-docs/interfaces/Segmentation.mdx +5 -0
  106. package/api-docs/interfaces/SegmentationModelAsset.mdx +8 -0
  107. package/api-docs/interfaces/SegmentationParams.mdx +18 -0
  108. package/api-docs/interfaces/SegmentationSmoothingConfig.mdx +5 -0
  109. package/api-docs/interfaces/Segmenter.mdx +121 -0
  110. package/api-docs/interfaces/SegmenterOptions.mdx +13 -0
  111. package/api-docs/interfaces/Size.mdx +10 -0
  112. package/api-docs/interfaces/StatsOptions.mdx +10 -0
  113. package/api-docs/interfaces/SubscribableOptions.mdx +9 -0
  114. package/api-docs/interfaces/ThrottleOptions.mdx +8 -0
  115. package/api-docs/interfaces/Transform.mdx +62 -0
  116. package/api-docs/interfaces/VideoFrameLike.mdx +8 -0
  117. package/api-docs/interfaces/VideoProcessor.mdx +38 -0
  118. package/api-docs/interfaces/WorkletMessagePortOptions.mdx +16 -0
  119. package/api-docs/interfaces/WorkletModule.mdx +6 -0
  120. package/api-docs/type-aliases/AnalyzerNodeInit.mdx +3 -0
  121. package/api-docs/type-aliases/AsyncCallback.mdx +7 -0
  122. package/api-docs/type-aliases/AudioBufferBytes.mdx +5 -0
  123. package/api-docs/type-aliases/AudioBufferFloats.mdx +6 -0
  124. package/api-docs/type-aliases/AudioDestinationNodeInit.mdx +3 -0
  125. package/api-docs/type-aliases/AudioNodeConnectParam.mdx +3 -0
  126. package/api-docs/type-aliases/AudioNodeInitConnectParam.mdx +3 -0
  127. package/api-docs/type-aliases/AudioNodeInitConnection.mdx +3 -0
  128. package/api-docs/type-aliases/AudioNodeInitConnections.mdx +3 -0
  129. package/api-docs/type-aliases/AudioNodeParam.mdx +3 -0
  130. package/api-docs/type-aliases/AudioSamples.mdx +17 -0
  131. package/api-docs/type-aliases/BaseAudioNode.mdx +3 -0
  132. package/api-docs/type-aliases/Callback.mdx +20 -0
  133. package/api-docs/type-aliases/Canvas.mdx +3 -0
  134. package/api-docs/type-aliases/CanvasContext.mdx +3 -0
  135. package/api-docs/type-aliases/ChannelSplitterNodeInit.mdx +3 -0
  136. package/api-docs/type-aliases/Color.mdx +12 -0
  137. package/api-docs/type-aliases/ConnectInitParamBaseType.mdx +3 -0
  138. package/api-docs/type-aliases/ConnectInitParamType.mdx +3 -0
  139. package/api-docs/type-aliases/ConnectParamBase.mdx +11 -0
  140. package/api-docs/type-aliases/ConnectParamBaseType.mdx +3 -0
  141. package/api-docs/type-aliases/ConnectParamType.mdx +3 -0
  142. package/api-docs/type-aliases/DelayNodeInit.mdx +3 -0
  143. package/api-docs/type-aliases/Delegate.mdx +3 -0
  144. package/api-docs/type-aliases/DenoiseWorkletNodeInit.mdx +3 -0
  145. package/api-docs/type-aliases/ExtractMessageEventType.mdx +9 -0
  146. package/api-docs/type-aliases/GainNodeInit.mdx +3 -0
  147. package/api-docs/type-aliases/ImageMapIterable.mdx +3 -0
  148. package/api-docs/type-aliases/ImageType.mdx +6 -0
  149. package/api-docs/type-aliases/IncludeMessageEventDataType.mdx +10 -0
  150. package/api-docs/type-aliases/InputFrame.mdx +3 -0
  151. package/api-docs/type-aliases/IsVoice.mdx +19 -0
  152. package/api-docs/type-aliases/MediaElementAudioSourceNodeInit.mdx +3 -0
  153. package/api-docs/type-aliases/MediaStreamAudioDestinationNodeInit.mdx +3 -0
  154. package/api-docs/type-aliases/MediaStreamAudioSourceNodeInit.mdx +3 -0
  155. package/api-docs/type-aliases/Node.mdx +3 -0
  156. package/api-docs/type-aliases/NodeConnectionAction.mdx +3 -0
  157. package/api-docs/type-aliases/Nodes.mdx +3 -0
  158. package/api-docs/type-aliases/ProcessEvents.mdx +17 -0
  159. package/api-docs/type-aliases/ProcessInputType.mdx +3 -0
  160. package/api-docs/type-aliases/ProcessStatus.mdx +3 -0
  161. package/api-docs/type-aliases/ProcessVideoTrack.mdx +15 -0
  162. package/api-docs/type-aliases/ProcessWorkerEvents.mdx +18 -0
  163. package/api-docs/type-aliases/ProcessorEvents.mdx +3 -0
  164. package/api-docs/type-aliases/ProcessorWorkerEvents.mdx +3 -0
  165. package/api-docs/type-aliases/RenderBackend.mdx +3 -0
  166. package/api-docs/type-aliases/RenderEffects.mdx +3 -0
  167. package/api-docs/type-aliases/RenderingEvents.mdx +3 -0
  168. package/api-docs/type-aliases/RunnerCreator.mdx +21 -0
  169. package/api-docs/type-aliases/SegmentationModel.mdx +3 -0
  170. package/api-docs/type-aliases/SegmentationTransform.mdx +3 -0
  171. package/api-docs/type-aliases/TupleOf.mdx +12 -0
  172. package/api-docs/type-aliases/UniversalAudioContextState.mdx +6 -0
  173. package/api-docs/type-aliases/Unsubscribe.mdx +9 -0
  174. package/api-docs/type-aliases/WasmPaths.mdx +3 -0
  175. package/api-docs/variables/BACKGROUND_BLUR_AMOUNT.mdx +3 -0
  176. package/api-docs/variables/CLIP_COUNT_THRESHOLD.mdx +6 -0
  177. package/api-docs/variables/CLIP_THRESHOLD.mdx +5 -0
  178. package/api-docs/variables/EDGE_BLUR_AMOUNT.mdx +3 -0
  179. package/api-docs/variables/FOREGROUND_THRESHOLD.mdx +3 -0
  180. package/api-docs/variables/FRAME_RATE.mdx +3 -0
  181. package/api-docs/variables/LOW_VOLUME_THRESHOLD.mdx +5 -0
  182. package/api-docs/variables/MASK_COMBINE_RATIO.mdx +3 -0
  183. package/api-docs/variables/MONO_THRESHOLD.mdx +6 -0
  184. package/api-docs/variables/PLAY_VIDEO_TIMEOUT.mdx +3 -0
  185. package/api-docs/variables/PROCESSING_HEIGHT.mdx +3 -0
  186. package/api-docs/variables/PROCESSING_WIDTH.mdx +3 -0
  187. package/api-docs/variables/PROCESS_STATUS.mdx +22 -0
  188. package/api-docs/variables/RENDERING_EVENTS.mdx +14 -0
  189. package/api-docs/variables/RENDER_BACKEND.mdx +10 -0
  190. package/api-docs/variables/RENDER_EFFECT.mdx +11 -0
  191. package/api-docs/variables/SEGMENTATION_MODELS.mdx +10 -0
  192. package/api-docs/variables/SILENT_THRESHOLD.mdx +6 -0
  193. package/api-docs/variables/VOICE_PROBABILITY_THRESHOLD.mdx +5 -0
  194. package/api-docs/variables/calculateMaxBlurPass.mdx +13 -0
  195. package/api-docs/variables/clamping.mdx +26 -0
  196. package/api-docs/variables/createLazyProps.mdx +19 -0
  197. package/api-docs/variables/createObjectUpdater.mdx +31 -0
  198. package/api-docs/variables/createRemoteImageBitmap.mdx +21 -0
  199. package/api-docs/variables/getErrorMessage.mdx +13 -0
  200. package/api-docs/variables/handleWebGLContextLoss.mdx +21 -0
  201. package/api-docs/variables/isRenderingEvents.mdx +13 -0
  202. package/api-docs/variables/isSegmentationModel.mdx +13 -0
  203. package/api-docs/variables/resize.mdx +30 -0
  204. package/api-docs/variables/toRenderingEvents.mdx +13 -0
  205. package/api-docs/variables/urls.mdx +10 -0
  206. package/package.json +14 -9
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ChannelSplitterNodeInit = AudioNodeInit<ChannelSplitterNode, ChannelSplitterNode>;
3
+ ```
@@ -0,0 +1,12 @@
1
+ ```ts
2
+ type Color = object;
3
+ ```
4
+
5
+ ## Properties
6
+
7
+ | Property | Type |
8
+ | ------ | ------ |
9
+ | <a id="r"></a> `r` | `number` |
10
+ | <a id="g"></a> `g` | `number` |
11
+ | <a id="b"></a> `b` | `number` |
12
+ | <a id="a"></a> `a` | `number` |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ConnectInitParamBaseType = AudioParam | AudioNodeInit;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ConnectInitParamType = ConnectInitParamBaseType | undefined;
3
+ ```
@@ -0,0 +1,11 @@
1
+ ```ts
2
+ type ConnectParamBase<T> =
3
+ | [T, T extends undefined ? undefined : AudioNodeOutputIndex, T extends undefined ? undefined : AudioNodeInputIndex]
4
+ | T;
5
+ ```
6
+
7
+ ## Type Parameters
8
+
9
+ | Type Parameter |
10
+ | ------ |
11
+ | `T` *extends* \| [`ConnectParamType`](ConnectParamType.mdx) \| [`ConnectInitParamType`](ConnectInitParamType.mdx) |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ConnectParamBaseType = AudioParam | BaseAudioNode;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ConnectParamType = ConnectParamBaseType | undefined;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type DelayNodeInit = AudioNodeInit<DelayNode, DelayNode>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type Delegate = "CPU" | "GPU" | undefined;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type DenoiseWorkletNodeInit = AudioNodeInit<AudioWorkletNode>;
3
+ ```
@@ -0,0 +1,9 @@
1
+ ```ts
2
+ type ExtractMessageEventType<T> = T extends object ? O : never;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `T` *extends* `object` |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type GainNodeInit = AudioNodeInit<GainNode, Gain>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ImageMapIterable = Iterable<readonly [string, ImageBitmap]>;
3
+ ```
@@ -0,0 +1,6 @@
1
+ ```ts
2
+ type ImageType =
3
+ | CanvasImageSource
4
+ | ProcessInputType
5
+ | VideoFrame;
6
+ ```
@@ -0,0 +1,10 @@
1
+ ```ts
2
+ type IncludeMessageEventDataType<E, I> = E extends object ? A extends I ? D : never : E extends object ? B extends I ? void : never : never;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `E` *extends* `object` |
10
+ | `I` |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type InputFrame = HTMLCanvasElement | OffscreenCanvas | VideoFrame | ImageBitmap;
3
+ ```
@@ -0,0 +1,19 @@
1
+ ```ts
2
+ type IsVoice<T> = (data) => boolean;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `T` |
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type |
14
+ | ------ | ------ |
15
+ | `data` | `T` |
16
+
17
+ ## Returns
18
+
19
+ `boolean`
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type MediaElementAudioSourceNodeInit = AudioNodeInit<MediaElementAudioSourceNode, MediaElementAudioSourceNode>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type MediaStreamAudioDestinationNodeInit = AudioNodeInit<MediaStreamAudioDestinationNode, MediaStreamAudioDestinationNode>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type MediaStreamAudioSourceNodeInit = AudioNodeInit<MediaStreamAudioSourceNode, MediaStreamAudioSourceNode>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type Node = AudioNode | AudioParam;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type NodeConnectionAction = "connect" | "disconnect";
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type Nodes = Node[];
3
+ ```
@@ -0,0 +1,17 @@
1
+ ```ts
2
+ type ProcessEvents<T, I> =
3
+ | ProcessEventOpen<T>
4
+ | ProcessEventProcess<I>
5
+ | ProcessEventUpdate<T>
6
+ | ProcessEventClose
7
+ | ProcessEventDestroy;
8
+ ```
9
+
10
+ Message events to be sent to the Processor
11
+
12
+ ## Type Parameters
13
+
14
+ | Type Parameter |
15
+ | ------ |
16
+ | `T` |
17
+ | `I` |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ProcessInputType = VideoFrame | ImageData | OffscreenCanvas | ImageBitmap;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ProcessStatus = ExtractValueTypes<typeof PROCESS_STATUS>;
3
+ ```
@@ -0,0 +1,15 @@
1
+ ```ts
2
+ type ProcessVideoTrack = (track, transformers, options?) => Promise<Track>;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `track` | `MediaStreamVideoTrack` |
10
+ | `transformers` | `Transformer`\<[`InputFrame`](InputFrame.mdx), [`InputFrame`](InputFrame.mdx)\>[] |
11
+ | `options?` | `Options` |
12
+
13
+ ## Returns
14
+
15
+ `Promise`\<`Track`\>
@@ -0,0 +1,18 @@
1
+ ```ts
2
+ type ProcessWorkerEvents<T, E, D> =
3
+ | ProcessWorkerEventProcessed<T>
4
+ | ProcessWorkerEventOpened
5
+ | ProcessWorkerEventUpdated
6
+ | ProcessWorkerEvent<E>
7
+ | ProcessWorkerEventDebug<D>;
8
+ ```
9
+
10
+ Message events returned from the processor
11
+
12
+ ## Type Parameters
13
+
14
+ | Type Parameter |
15
+ | ------ |
16
+ | `T` |
17
+ | `E` |
18
+ | `D` |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ProcessorEvents = ProcessEvents<ProcessorOptions, ProcessorProcessOptions>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ProcessorWorkerEvents = ProcessWorkerEvents<VideoFrameLike, ProcessorEvent, ProcessWorkerDebugMessage>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type RenderBackend = ExtractValueTypes<typeof RENDER_BACKEND>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type RenderEffects = ExtractValueTypes<typeof RENDER_EFFECT>;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type RenderingEvents = ExtractValueTypes<typeof RENDERING_EVENTS>;
3
+ ```
@@ -0,0 +1,21 @@
1
+ ```ts
2
+ type RunnerCreator<P, R> = (callback, frameRate) => Runner<P>;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `P` *extends* `unknown`[] |
10
+ | `R` |
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type |
15
+ | ------ | ------ |
16
+ | `callback` | [`Callback`](Callback.mdx)\<`R`, `P`\> |
17
+ | `frameRate` | `number` |
18
+
19
+ ## Returns
20
+
21
+ [`Runner`](../interfaces/Runner.mdx)\<`P`\>
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type SegmentationModel = typeof SEGMENTATION_MODELS[keyof typeof SEGMENTATION_MODELS];
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type SegmentationTransform = Transform<InputFrame, InputFrame> & SegmentationParams & Pick<Segmenter, "update"> & Omit<Process, "open">;
3
+ ```
@@ -0,0 +1,12 @@
1
+ ```ts
2
+ type TupleOf<T, N> = N extends N ? number extends N ? T[] : _TupleOf<T, N, []> : never;
3
+ ```
4
+
5
+ From https://github.com/Microsoft/TypeScript/issues/26223#issuecomment-674500430
6
+
7
+ ## Type Parameters
8
+
9
+ | Type Parameter |
10
+ | ------ |
11
+ | `T` |
12
+ | `N` *extends* `number` |
@@ -0,0 +1,6 @@
1
+ ```ts
2
+ type UniversalAudioContextState = AudioContextState | "interrupted";
3
+ ```
4
+
5
+ We need to add the missing type def to work with AudioContextState in Safari
6
+ See https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/state#resuming_interrupted_play_states_in_ios_safari
@@ -0,0 +1,9 @@
1
+ ```ts
2
+ type Unsubscribe = () => void;
3
+ ```
4
+
5
+ Unsubscribe the subscription
6
+
7
+ ## Returns
8
+
9
+ `void`
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type WasmPaths = [string, string | undefined];
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const BACKGROUND_BLUR_AMOUNT: 3 = 3;
3
+ ```
@@ -0,0 +1,6 @@
1
+ ```ts
2
+ const CLIP_COUNT_THRESHOLD: 6 = 6.0;
3
+ ```
4
+
5
+ Default clipping count threshold
6
+ Number of consecutive clipThreshold level samples that indicate clipping.
@@ -0,0 +1,5 @@
1
+ ```ts
2
+ const CLIP_THRESHOLD: 0.98 = 0.98;
3
+ ```
4
+
5
+ Default clipping detection threshold
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const EDGE_BLUR_AMOUNT: 3 = 3;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const FOREGROUND_THRESHOLD: 0.5 = 0.5;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const FRAME_RATE: 20 = 20;
3
+ ```
@@ -0,0 +1,5 @@
1
+ ```ts
2
+ const LOW_VOLUME_THRESHOLD: -60 = -60;
3
+ ```
4
+
5
+ Default low volume detection threshold
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const MASK_COMBINE_RATIO: 0.5 = 0.5;
3
+ ```
@@ -0,0 +1,6 @@
1
+ ```ts
2
+ const MONO_THRESHOLD: number;
3
+ ```
4
+
5
+ Default mono detection threshold
6
+ Data must be identical within one LSB 16-bit to be identified as mono.
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const PLAY_VIDEO_TIMEOUT: 6000 = 6000;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const PROCESSING_HEIGHT: 432 = 432;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const PROCESSING_WIDTH: 768 = 768;
3
+ ```
@@ -0,0 +1,22 @@
1
+ ```ts
2
+ const PROCESS_STATUS: object;
3
+ ```
4
+
5
+ Process status
6
+
7
+ ## Type Declaration
8
+
9
+ | Name | Type |
10
+ | ------ | ------ |
11
+ | <a id="closed"></a> `Closed` | `"closed"` |
12
+ | <a id="closing"></a> `Closing` | `"closing"` |
13
+ | <a id="destroyed"></a> `Destroyed` | `"destroyed"` |
14
+ | <a id="destroying"></a> `Destroying` | `"destroying"` |
15
+ | <a id="error"></a> `Error` | `"Error"` |
16
+ | <a id="idle"></a> `Idle` | `"idle"` |
17
+ | <a id="new"></a> `New` | `"new"` |
18
+ | <a id="opened"></a> `Opened` | `"opened"` |
19
+ | <a id="opening"></a> `Opening` | `"opening"` |
20
+ | <a id="processing"></a> `Processing` | `"processing"` |
21
+ | <a id="updated"></a> `Updated` | `"updated"` |
22
+ | <a id="updating"></a> `Updating` | `"updating"` |
@@ -0,0 +1,14 @@
1
+ ```ts
2
+ const RENDERING_EVENTS: object;
3
+ ```
4
+
5
+ ## Type Declaration
6
+
7
+ | Name | Type | Description |
8
+ | ------ | ------ | ------ |
9
+ | <a id="contextcreationerror"></a> `ContextCreationError` | `"ContextCreationError"` | Triggered when failed to create a context |
10
+ | <a id="contextlost"></a> `ContextLost` | `"ContextLost"` | Triggered when context is lost |
11
+ | <a id="contextrestored"></a> `ContextRestored` | `"ContextRestored"` | Triggered when context is restored |
12
+ | <a id="error"></a> `Error` | `"Error"` | Triggered when there is unknown error |
13
+ | <a id="processorrestarted"></a> `ProcessorRestarted` | `"ProcessorRestarted"` | Triggered when the processor is restarted |
14
+ | <a id="samplingerror"></a> `SamplingError` | `"SamplingError"` | Triggered when sampling error occurs |
@@ -0,0 +1,10 @@
1
+ ```ts
2
+ const RENDER_BACKEND: object;
3
+ ```
4
+
5
+ ## Type Declaration
6
+
7
+ | Name | Type |
8
+ | ------ | ------ |
9
+ | <a id="webgl"></a> `WebGL` | `"webgl"` |
10
+ | <a id="webgpu"></a> `WebGPU` | `"webgpu"` |
@@ -0,0 +1,11 @@
1
+ ```ts
2
+ const RENDER_EFFECT: object;
3
+ ```
4
+
5
+ ## Type Declaration
6
+
7
+ | Name | Type |
8
+ | ------ | ------ |
9
+ | <a id="none"></a> `None` | `"none"` |
10
+ | <a id="blur"></a> `Blur` | `"blur"` |
11
+ | <a id="overlay"></a> `Overlay` | `"overlay"` |
@@ -0,0 +1,10 @@
1
+ ```ts
2
+ const SEGMENTATION_MODELS: object;
3
+ ```
4
+
5
+ ## Type Declaration
6
+
7
+ | Name | Type |
8
+ | ------ | ------ |
9
+ | <a id="mediapipeselfie"></a> `MediapipeSelfie` | `"selfie"` |
10
+ | <a id="deeplabv3"></a> `DeepLabV3` | `"deeplabV3"` |
@@ -0,0 +1,6 @@
1
+ ```ts
2
+ const SILENT_THRESHOLD: number;
3
+ ```
4
+
5
+ Default silent threshold
6
+ At least one LSB 16-bit data (compare is on absolute value).
@@ -0,0 +1,5 @@
1
+ ```ts
2
+ const VOICE_PROBABILITY_THRESHOLD: 0.3 = 0.3;
3
+ ```
4
+
5
+ Default Voice probability threshold
@@ -0,0 +1,13 @@
1
+ ```ts
2
+ const calculateMaxBlurPass: (height) => number;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `height` | `number` |
10
+
11
+ ## Returns
12
+
13
+ `number`
@@ -0,0 +1,26 @@
1
+ ```ts
2
+ const clamping: (min, max) => (value) => number;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `min` | `number` |
10
+ | `max` | `number` |
11
+
12
+ ## Returns
13
+
14
+ ```ts
15
+ (value): number;
16
+ ```
17
+
18
+ ### Parameters
19
+
20
+ | Parameter | Type |
21
+ | ------ | ------ |
22
+ | `value` | `number` |
23
+
24
+ ### Returns
25
+
26
+ `number`
@@ -0,0 +1,19 @@
1
+ ```ts
2
+ const createLazyProps: <T>(stateBuilder) => T;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `T` *extends* `Record`\<`string`, `unknown`\> |
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type |
14
+ | ------ | ------ |
15
+ | `stateBuilder` | `{ [K in keyof T]: (s: Partial<T>) => T[K] }` |
16
+
17
+ ## Returns
18
+
19
+ `T`
@@ -0,0 +1,31 @@
1
+ ```ts
2
+ const createObjectUpdater: <T>(original) => (another) => void;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `T` *extends* `{ [K in keyof T]: unknown }` |
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type |
14
+ | ------ | ------ |
15
+ | `original` | `T` |
16
+
17
+ ## Returns
18
+
19
+ ```ts
20
+ (another): void;
21
+ ```
22
+
23
+ ### Parameters
24
+
25
+ | Parameter | Type |
26
+ | ------ | ------ |
27
+ | `another` | `Partial`\<`T`\> |
28
+
29
+ ### Returns
30
+
31
+ `void`
@@ -0,0 +1,21 @@
1
+ ```ts
2
+ const createRemoteImageBitmap: (map?) => object;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `map?` | [`ImageMapIterable`](../type-aliases/ImageMapIterable.mdx) |
10
+
11
+ ## Returns
12
+
13
+ `object`
14
+
15
+ | Name | Type |
16
+ | ------ | ------ |
17
+ | `tryFetchingImage()` | (`uri`) => `Promise`\<`ImageBitmap` \| `null`\> |
18
+ | `setImage()` | (`uri`, `image`) => `void` |
19
+ | `getImage()` | (`uri`) => `ImageBitmap` \| `null` |
20
+ | `removeImage()` | (`uri`) => `boolean` |
21
+ | `clear()` | () => `void` |
@@ -0,0 +1,13 @@
1
+ ```ts
2
+ const getErrorMessage: (error) => string;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `error` | `unknown` |
10
+
11
+ ## Returns
12
+
13
+ `string`
@@ -0,0 +1,21 @@
1
+ ```ts
2
+ const handleWebGLContextLoss: (canvas, eventHandlers, contextLostCb?) => () => void;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `canvas` | `OffscreenCanvas` |
10
+ | `eventHandlers` | [`RenderEventHandlers`](../interfaces/RenderEventHandlers.mdx) |
11
+ | `contextLostCb?` | () => `void` |
12
+
13
+ ## Returns
14
+
15
+ ```ts
16
+ (): void;
17
+ ```
18
+
19
+ ### Returns
20
+
21
+ `void`