@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.
Files changed (112) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/api-docs/README.mdx +406 -0
  3. package/api-docs/enumerations/DeniedDevices.mdx +7 -0
  4. package/api-docs/enumerations/UserMediaStatus.mdx +49 -0
  5. package/api-docs/functions/applyContentHint.mdx +33 -0
  6. package/api-docs/functions/createAudioMixingProcess.mdx +20 -0
  7. package/api-docs/functions/createAudioStreamProcess.mdx +15 -0
  8. package/api-docs/functions/createGetDisplayMedia.mdx +26 -0
  9. package/api-docs/functions/createMedia.mdx +20 -0
  10. package/api-docs/functions/createMediaSignal.mdx +42 -0
  11. package/api-docs/functions/createMediaSignals.mdx +33 -0
  12. package/api-docs/functions/createPreviewStreamController.mdx +13 -0
  13. package/api-docs/functions/createVideoStreamProcess.mdx +13 -0
  14. package/api-docs/functions/deriveInitialPermissionStatus.mdx +14 -0
  15. package/api-docs/functions/getBlurKernelSize.mdx +25 -0
  16. package/api-docs/functions/getPermissionStatus.mdx +34 -0
  17. package/api-docs/functions/getTentBlurSize.mdx +24 -0
  18. package/api-docs/functions/isAnalyzerNodeInitProp.mdx +13 -0
  19. package/api-docs/functions/isAudioContentHint.mdx +13 -0
  20. package/api-docs/functions/isMedia.mdx +13 -0
  21. package/api-docs/functions/isNonNullObject.mdx +13 -0
  22. package/api-docs/functions/isUserMediaStatus.mdx +13 -0
  23. package/api-docs/functions/isVideoContentHint.mdx +13 -0
  24. package/api-docs/functions/isVideoStreamTrackProcessorAPIs.mdx +13 -0
  25. package/api-docs/functions/setLogger.mdx +13 -0
  26. package/api-docs/functions/toDeniedDevices.mdx +13 -0
  27. package/api-docs/interfaces/AudioDetectionSignals.mdx +6 -0
  28. package/api-docs/interfaces/AudioSignalDetectionOptions.mdx +6 -0
  29. package/api-docs/interfaces/DenoiseParams.mdx +9 -0
  30. package/api-docs/interfaces/ExtendedMediaTrackSettings.mdx +38 -0
  31. package/api-docs/interfaces/Media.mdx +316 -0
  32. package/api-docs/interfaces/MediaAttributes.mdx +19 -0
  33. package/api-docs/interfaces/MediaChangesSignals.mdx +15 -0
  34. package/api-docs/interfaces/MediaController.mdx +11 -0
  35. package/api-docs/interfaces/MediaInit.mdx +14 -0
  36. package/api-docs/interfaces/MediaOptions.mdx +10 -0
  37. package/api-docs/interfaces/MediaProps.mdx +9 -0
  38. package/api-docs/interfaces/MediaSettings.mdx +6 -0
  39. package/api-docs/interfaces/MediaTrack.mdx +121 -0
  40. package/api-docs/interfaces/MediaTrackInit.mdx +29 -0
  41. package/api-docs/interfaces/PreviewControllerProps.mdx +14 -0
  42. package/api-docs/interfaces/PreviewEventHandler.mdx +19 -0
  43. package/api-docs/interfaces/PreviewStreamController.mdx +350 -0
  44. package/api-docs/interfaces/PreviewStreamParams.mdx +15 -0
  45. package/api-docs/interfaces/VoiceActivityDetectionOptions.mdx +6 -0
  46. package/api-docs/type-aliases/AudioContentHint.mdx +3 -0
  47. package/api-docs/type-aliases/CreatePreviewStreamController.mdx +3 -0
  48. package/api-docs/type-aliases/ExtendedMediaTrackSettingsKey.mdx +3 -0
  49. package/api-docs/type-aliases/GeneratedMediaSignals.mdx +9 -0
  50. package/api-docs/type-aliases/GetDisplayMedia.mdx +3 -0
  51. package/api-docs/type-aliases/GetUserMediaProcess.mdx +19 -0
  52. package/api-docs/type-aliases/MediaSignals.mdx +3 -0
  53. package/api-docs/type-aliases/MediaSignalsOptional.mdx +3 -0
  54. package/api-docs/type-aliases/MediaSignalsRequired.mdx +3 -0
  55. package/api-docs/type-aliases/PreviewInput.mdx +3 -0
  56. package/api-docs/type-aliases/Process.mdx +19 -0
  57. package/api-docs/type-aliases/Segmenters.mdx +3 -0
  58. package/api-docs/type-aliases/TrackProcessor.mdx +3 -0
  59. package/api-docs/type-aliases/Unsubscribe.mdx +7 -0
  60. package/api-docs/type-aliases/UserMediaValidator.mdx +13 -0
  61. package/api-docs/type-aliases/VideoContentHint.mdx +3 -0
  62. package/api-docs/type-aliases/VideoRenderParams.mdx +17 -0
  63. package/api-docs/type-aliases/VideoStreamTrackProcessorAPIs.mdx +7 -0
  64. package/api-docs/variables/AUDIO_CONTENT_HINTS.mdx +17 -0
  65. package/api-docs/variables/REQUIRED_SIGNAL_KEYS.mdx +3 -0
  66. package/api-docs/variables/VIDEO_CONTENT_HINTS.mdx +17 -0
  67. package/api-docs/variables/areBothGranted.mdx +3 -0
  68. package/api-docs/variables/hasNoAudioDevices.mdx +3 -0
  69. package/api-docs/variables/hasNoDevice.mdx +3 -0
  70. package/api-docs/variables/hasNoVideoDevices.mdx +3 -0
  71. package/api-docs/variables/internalSignals.mdx +13 -0
  72. package/api-docs/variables/isAudioDeviceInUse.mdx +3 -0
  73. package/api-docs/variables/isDeviceInUse.mdx +3 -0
  74. package/api-docs/variables/isDevicesInUse.mdx +3 -0
  75. package/api-docs/variables/isFallback.mdx +3 -0
  76. package/api-docs/variables/isFallbackAudio.mdx +3 -0
  77. package/api-docs/variables/isFallbackVideo.mdx +3 -0
  78. package/api-docs/variables/isGranted.mdx +3 -0
  79. package/api-docs/variables/isGrantedAudio.mdx +3 -0
  80. package/api-docs/variables/isGrantedOnlyAudio.mdx +3 -0
  81. package/api-docs/variables/isGrantedOnlyAudioNoVideoDevices.mdx +3 -0
  82. package/api-docs/variables/isGrantedOnlyVideo.mdx +3 -0
  83. package/api-docs/variables/isGrantedOnlyVideoNoAudioDevices.mdx +3 -0
  84. package/api-docs/variables/isGrantedVideo.mdx +3 -0
  85. package/api-docs/variables/isInitial.mdx +3 -0
  86. package/api-docs/variables/isInitialPermissions.mdx +3 -0
  87. package/api-docs/variables/isInitialPermissionsGranted.mdx +3 -0
  88. package/api-docs/variables/isInitialPermissionsNotGranted.mdx +3 -0
  89. package/api-docs/variables/isOnlyAudioError.mdx +3 -0
  90. package/api-docs/variables/isOnlyVideoError.mdx +3 -0
  91. package/api-docs/variables/isOverConstrained.mdx +3 -0
  92. package/api-docs/variables/isPromptAudio.mdx +3 -0
  93. package/api-docs/variables/isPromptVideo.mdx +3 -0
  94. package/api-docs/variables/isRejected.mdx +3 -0
  95. package/api-docs/variables/isRejectedOnlyAudio.mdx +3 -0
  96. package/api-docs/variables/isRejectedOnlyVideo.mdx +3 -0
  97. package/api-docs/variables/isRequestPermissionNeeded.mdx +3 -0
  98. package/api-docs/variables/isUnknownError.mdx +3 -0
  99. package/api-docs/variables/isVideoDeviceInUse.mdx +3 -0
  100. package/dist/constants.d.ts +1 -0
  101. package/dist/constants.js +1 -0
  102. package/dist/index.d.ts +1 -1
  103. package/dist/index.js +1 -1
  104. package/dist/previewController.js +1 -1
  105. package/dist/types.d.ts +3 -1
  106. package/dist/userMedia.d.ts +4 -1
  107. package/dist/userMedia.js +15 -11
  108. package/dist/utils.d.ts +17 -6
  109. package/dist/utils.js +27 -13
  110. package/dist/videoProcessor.d.ts +3 -3
  111. package/dist/videoProcessor.js +172 -30
  112. package/package.json +17 -12
@@ -0,0 +1,350 @@
1
+ ## Properties
2
+
3
+ | Property | Type |
4
+ | ------ | ------ |
5
+ | <a id="media"></a> `media` | [`Media`](Media.mdx) \| `undefined` |
6
+ | <a id="audioinputchanged"></a> `audioInputChanged` | `boolean` |
7
+ | <a id="videoinputchanged"></a> `videoInputChanged` | `boolean` |
8
+ | <a id="inputchanged"></a> `inputChanged` | `boolean` |
9
+ | <a id="audioinput"></a> `audioInput` | [`PreviewInput`](../type-aliases/PreviewInput.mdx) |
10
+ | <a id="videoinput"></a> `videoInput` | [`PreviewInput`](../type-aliases/PreviewInput.mdx) |
11
+ | <a id="updatingmain"></a> `updatingMain` | `boolean` |
12
+ | <a id="updatingpreviewaudio"></a> `updatingPreviewAudio` | `boolean` |
13
+ | <a id="updatingpreviewvideo"></a> `updatingPreviewVideo` | `boolean` |
14
+ | <a id="cleanup"></a> `cleanup` | () => `Promise`\<`void`\> |
15
+
16
+ ## Methods
17
+
18
+ ### updatePreviewInput()
19
+
20
+ ```ts
21
+ updatePreviewInput(input): void;
22
+ ```
23
+
24
+ #### Parameters
25
+
26
+ | Parameter | Type |
27
+ | ------ | ------ |
28
+ | `input` | [`PreviewInput`](../type-aliases/PreviewInput.mdx) |
29
+
30
+ #### Returns
31
+
32
+ `void`
33
+
34
+ ***
35
+
36
+ ### updateAudioInput()
37
+
38
+ ```ts
39
+ updateAudioInput(id): void;
40
+ ```
41
+
42
+ #### Parameters
43
+
44
+ | Parameter | Type |
45
+ | ------ | ------ |
46
+ | `id` | `string` |
47
+
48
+ #### Returns
49
+
50
+ `void`
51
+
52
+ ***
53
+
54
+ ### updateVideoInput()
55
+
56
+ ```ts
57
+ updateVideoInput(id): void;
58
+ ```
59
+
60
+ #### Parameters
61
+
62
+ | Parameter | Type |
63
+ | ------ | ------ |
64
+ | `id` | `string` |
65
+
66
+ #### Returns
67
+
68
+ `void`
69
+
70
+ ***
71
+
72
+ ### applyChanges()
73
+
74
+ ```ts
75
+ applyChanges(force?): Promise<void>;
76
+ ```
77
+
78
+ #### Parameters
79
+
80
+ | Parameter | Type |
81
+ | ------ | ------ |
82
+ | `force?` | `boolean` |
83
+
84
+ #### Returns
85
+
86
+ `Promise`\<`void`\>
87
+
88
+ ***
89
+
90
+ ### revertChanges()
91
+
92
+ ```ts
93
+ revertChanges(): Promise<void>;
94
+ ```
95
+
96
+ #### Returns
97
+
98
+ `Promise`\<`void`\>
99
+
100
+ ***
101
+
102
+ ### onMediaChanged()
103
+
104
+ ```ts
105
+ onMediaChanged(callback): Unsubscribe;
106
+ ```
107
+
108
+ #### Parameters
109
+
110
+ | Parameter | Type |
111
+ | ------ | ------ |
112
+ | `callback` | `EventCallback`\<[`Media`](Media.mdx)\> |
113
+
114
+ #### Returns
115
+
116
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
117
+
118
+ ***
119
+
120
+ ### onAudioInputChanged()
121
+
122
+ ```ts
123
+ onAudioInputChanged(callback): Unsubscribe;
124
+ ```
125
+
126
+ #### Parameters
127
+
128
+ | Parameter | Type |
129
+ | ------ | ------ |
130
+ | `callback` | `EventCallback`\<[`PreviewInput`](../type-aliases/PreviewInput.mdx)\> |
131
+
132
+ #### Returns
133
+
134
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
135
+
136
+ ***
137
+
138
+ ### onVideoInputChanged()
139
+
140
+ ```ts
141
+ onVideoInputChanged(callback): Unsubscribe;
142
+ ```
143
+
144
+ #### Parameters
145
+
146
+ | Parameter | Type |
147
+ | ------ | ------ |
148
+ | `callback` | `EventCallback`\<[`PreviewInput`](../type-aliases/PreviewInput.mdx)\> |
149
+
150
+ #### Returns
151
+
152
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
153
+
154
+ ***
155
+
156
+ ### onUpdatingPreviewAudio()
157
+
158
+ ```ts
159
+ onUpdatingPreviewAudio(callback): Unsubscribe;
160
+ ```
161
+
162
+ #### Parameters
163
+
164
+ | Parameter | Type |
165
+ | ------ | ------ |
166
+ | `callback` | `EventCallback`\<`boolean`\> |
167
+
168
+ #### Returns
169
+
170
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
171
+
172
+ ***
173
+
174
+ ### onUpdatingPreviewVideo()
175
+
176
+ ```ts
177
+ onUpdatingPreviewVideo(callback): Unsubscribe;
178
+ ```
179
+
180
+ #### Parameters
181
+
182
+ | Parameter | Type |
183
+ | ------ | ------ |
184
+ | `callback` | `EventCallback`\<`boolean`\> |
185
+
186
+ #### Returns
187
+
188
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
189
+
190
+ ***
191
+
192
+ ### onUpdatingMain()
193
+
194
+ ```ts
195
+ onUpdatingMain(callback): Unsubscribe;
196
+ ```
197
+
198
+ #### Parameters
199
+
200
+ | Parameter | Type |
201
+ | ------ | ------ |
202
+ | `callback` | `EventCallback`\<`boolean`\> |
203
+
204
+ #### Returns
205
+
206
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
207
+
208
+ ***
209
+
210
+ ### onAudioInputError()
211
+
212
+ ```ts
213
+ onAudioInputError(callback): Unsubscribe;
214
+ ```
215
+
216
+ #### Parameters
217
+
218
+ | Parameter | Type |
219
+ | ------ | ------ |
220
+ | `callback` | `EventErrorCallback` |
221
+
222
+ #### Returns
223
+
224
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
225
+
226
+ ***
227
+
228
+ ### onVideoInputError()
229
+
230
+ ```ts
231
+ onVideoInputError(callback): Unsubscribe;
232
+ ```
233
+
234
+ #### Parameters
235
+
236
+ | Parameter | Type |
237
+ | ------ | ------ |
238
+ | `callback` | `EventErrorCallback` |
239
+
240
+ #### Returns
241
+
242
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
243
+
244
+ ***
245
+
246
+ ### onApplyChangesError()
247
+
248
+ ```ts
249
+ onApplyChangesError(callback): Unsubscribe;
250
+ ```
251
+
252
+ #### Parameters
253
+
254
+ | Parameter | Type |
255
+ | ------ | ------ |
256
+ | `callback` | `EventErrorCallback` |
257
+
258
+ #### Returns
259
+
260
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
261
+
262
+ ***
263
+
264
+ ### onRevertChangesError()
265
+
266
+ ```ts
267
+ onRevertChangesError(callback): Unsubscribe;
268
+ ```
269
+
270
+ #### Parameters
271
+
272
+ | Parameter | Type |
273
+ | ------ | ------ |
274
+ | `callback` | `EventErrorCallback` |
275
+
276
+ #### Returns
277
+
278
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
279
+
280
+ ***
281
+
282
+ ### onAudioMuted()
283
+
284
+ ```ts
285
+ onAudioMuted(callback): Unsubscribe;
286
+ ```
287
+
288
+ #### Parameters
289
+
290
+ | Parameter | Type |
291
+ | ------ | ------ |
292
+ | `callback` | `EventCallback`\<`boolean` \| `undefined`\> |
293
+
294
+ #### Returns
295
+
296
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
297
+
298
+ ***
299
+
300
+ ### onAudioSuspended()
301
+
302
+ ```ts
303
+ onAudioSuspended(callback): Unsubscribe;
304
+ ```
305
+
306
+ #### Parameters
307
+
308
+ | Parameter | Type |
309
+ | ------ | ------ |
310
+ | `callback` | `EventCallback`\<`boolean` \| `undefined`\> |
311
+
312
+ #### Returns
313
+
314
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
315
+
316
+ ***
317
+
318
+ ### onVideoMuted()
319
+
320
+ ```ts
321
+ onVideoMuted(callback): Unsubscribe;
322
+ ```
323
+
324
+ #### Parameters
325
+
326
+ | Parameter | Type |
327
+ | ------ | ------ |
328
+ | `callback` | `EventCallback`\<`boolean` \| `undefined`\> |
329
+
330
+ #### Returns
331
+
332
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
333
+
334
+ ***
335
+
336
+ ### onVideoSuspended()
337
+
338
+ ```ts
339
+ onVideoSuspended(callback): Unsubscribe;
340
+ ```
341
+
342
+ #### Parameters
343
+
344
+ | Parameter | Type |
345
+ | ------ | ------ |
346
+ | `callback` | `EventCallback`\<`boolean` \| `undefined`\> |
347
+
348
+ #### Returns
349
+
350
+ [`Unsubscribe`](../type-aliases/Unsubscribe.mdx)
@@ -0,0 +1,15 @@
1
+ ## Properties
2
+
3
+ | Property | Type | Description |
4
+ | ------ | ------ | ------ |
5
+ | <a id="getcurrentdevices"></a> `getCurrentDevices` | () => `IndexedDevices` | - |
6
+ | <a id="getcurrentmedia"></a> `getCurrentMedia` | () => [`Media`](Media.mdx) \| `undefined` | - |
7
+ | <a id="updatemainstream"></a> `updateMainStream` | (`request`) => `Promise`\<`void`\> | - |
8
+ | <a id="mainmediasignal"></a> `mainMediaSignal` | `Signal`\<[`Media`](Media.mdx) \| `undefined`, [`Media`](Media.mdx) \| `undefined`\> | - |
9
+ | <a id="signals"></a> `signals` | [`MediaSignals`](../type-aliases/MediaSignals.mdx) | - |
10
+ | <a id="onended"></a> `onEnded?` | () => `void` | - |
11
+ | <a id="fftsize"></a> `fftSize?` | `number` | - |
12
+ | <a id="queueoptions"></a> `queueOptions?` | `Partial`\<`AsyncQueueOptions`\> | - |
13
+ | <a id="audioprocessors"></a> `audioProcessors` | [`TrackProcessor`](../type-aliases/TrackProcessor.mdx)[] | - |
14
+ | <a id="videoprocessors"></a> `videoProcessors` | [`TrackProcessor`](../type-aliases/TrackProcessor.mdx)[] | - |
15
+ | <a id="getdefaultconstraints"></a> `getDefaultConstraints?` | () => `object` | Pass default constraints to use with get media wrappers |
@@ -0,0 +1,6 @@
1
+ ## Properties
2
+
3
+ | Property | Type | Description |
4
+ | ------ | ------ | ------ |
5
+ | <a id="vadthrottlems"></a> `vadThrottleMS?` | `number` | Voice Activity Detection in millisecond |
6
+ | <a id="shoulddetectvoiceactivity"></a> `shouldDetectVoiceActivity` | () => `boolean` | Whether or not to detect voice activity |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type AudioContentHint = typeof AUDIO_CONTENT_HINTS[keyof typeof AUDIO_CONTENT_HINTS];
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type CreatePreviewStreamController = typeof createPreviewStreamController;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type ExtendedMediaTrackSettingsKey = keyof ExtendedMediaTrackSettings;
3
+ ```
@@ -0,0 +1,9 @@
1
+ ```ts
2
+ type GeneratedMediaSignals<K> = Pick<Required<MediaSignals>, K>;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `K` *extends* keyof [`MediaSignals`](MediaSignals.mdx) |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type GetDisplayMedia = ReturnType<typeof createGetDisplayMedia>;
3
+ ```
@@ -0,0 +1,19 @@
1
+ ```ts
2
+ type GetUserMediaProcess = (request) => Promise<Media>;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `request` | \{ `constraints`: `MediaDeviceRequest`; `originalConstraints`: `MediaDeviceRequest`; `permission`: \{ `audio`: `PermissionState`; `video`: `PermissionState`; \}; `currentMedia`: [`Media`](../interfaces/Media.mdx) \| `undefined`; \} |
10
+ | `request.constraints` | `MediaDeviceRequest` |
11
+ | `request.originalConstraints` | `MediaDeviceRequest` |
12
+ | `request.permission` | \{ `audio`: `PermissionState`; `video`: `PermissionState`; \} |
13
+ | `request.permission.audio` | `PermissionState` |
14
+ | `request.permission.video` | `PermissionState` |
15
+ | `request.currentMedia` | [`Media`](../interfaces/Media.mdx) \| `undefined` |
16
+
17
+ ## Returns
18
+
19
+ `Promise`\<[`Media`](../interfaces/Media.mdx)\>
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type MediaSignals = MediaSignalsRequired & MediaSignalsOptional;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type MediaSignalsOptional = Omit<Partial<MediaChangesSignals>, "onMediaChanged">;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type MediaSignalsRequired = Pick<MediaChangesSignals, "onMediaChanged"> & AudioDetectionSignals;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type PreviewInput = MediaDeviceInfoLike | undefined;
3
+ ```
@@ -0,0 +1,19 @@
1
+ ```ts
2
+ type Process<T> = (a) => Promise<MediaTrack>;
3
+ ```
4
+
5
+ ## Type Parameters
6
+
7
+ | Type Parameter |
8
+ | ------ |
9
+ | `T` |
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type |
14
+ | ------ | ------ |
15
+ | `a` | `T` |
16
+
17
+ ## Returns
18
+
19
+ `Promise`\<[`MediaTrack`](../interfaces/MediaTrack.mdx)\>
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type Segmenters = { [Property in SegmentationModel]: Segmenter };
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type TrackProcessor = Process<MediaTrack>;
3
+ ```
@@ -0,0 +1,7 @@
1
+ ```ts
2
+ type Unsubscribe = () => void;
3
+ ```
4
+
5
+ ## Returns
6
+
7
+ `void`
@@ -0,0 +1,13 @@
1
+ ```ts
2
+ type UserMediaValidator = (status) => boolean;
3
+ ```
4
+
5
+ ## Parameters
6
+
7
+ | Parameter | Type |
8
+ | ------ | ------ |
9
+ | `status` | [`UserMediaStatus`](../enumerations/UserMediaStatus.mdx) |
10
+
11
+ ## Returns
12
+
13
+ `boolean`
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ type VideoContentHint = typeof VIDEO_CONTENT_HINTS[keyof typeof VIDEO_CONTENT_HINTS];
3
+ ```
@@ -0,0 +1,17 @@
1
+ ```ts
2
+ type VideoRenderParams = Omit<RendererOptions, "effects" | "personCenter"> & object;
3
+ ```
4
+
5
+ ## Type Declaration
6
+
7
+ | Name | Type | Description |
8
+ | ------ | ------ | ------ |
9
+ | `frameRate` | `number` | Target frame rate for the video segmentation |
10
+ | `width` | `number` | Render Effects |
11
+ | `height` | `number` | - |
12
+ | `videoSegmentation` | `RenderEffects` | - |
13
+ | `pan?` | `boolean` | - |
14
+ | `tilt?` | `boolean` | - |
15
+ | `zoom?` | `boolean` | - |
16
+ | `personCenterX?` | `number` | - |
17
+ | `personCenterY?` | `number` | - |
@@ -0,0 +1,7 @@
1
+ ```ts
2
+ type VideoStreamTrackProcessorAPIs = "stream" | "canvas";
3
+ ```
4
+
5
+ Use which processor API to process the stream track
6
+ `stream` - Use `MediaStreamTrackProcessor`, when available
7
+ `canvas` - Use Canvas
@@ -0,0 +1,17 @@
1
+ ```ts
2
+ const AUDIO_CONTENT_HINTS: object;
3
+ ```
4
+
5
+ Audio content hints are only applicable when the MediaStreamTrack contains an
6
+ audio track
7
+
8
+ [https://www.w3.org/TR/mst-content-hint/#audio-content-hints](https://www.w3.org/TR/mst-content-hint/#audio-content-hints)
9
+
10
+ ## Type Declaration
11
+
12
+ | Name | Type | Default value | Description |
13
+ | ------ | ------ | ------ | ------ |
14
+ | <a id="nohint"></a> `NoHint` | `""` | `''` | No hint has been provided, the implementation should make its best-informed guess on how to handle contained audio data. This may be inferred from how the track was opened or by doing content analysis |
15
+ | <a id="speech"></a> `Speech` | `"speech"` | `'speech'` | The track should be treated as if it contains speech data. Consuming this signal it may be appropriate to apply noise suppression or boost intelligibility of the incoming signal. |
16
+ | <a id="speechrecognition"></a> `SpeechRecognition` | `"speech-recognition"` | `'speech-recognition'` | The track should be treated as if it contains data for the purpose of speech recognition by a machine. Consuming this signal it may be appropriate to boost intelligibility of the incoming signal for transcription and turn off audio-processing components that are used for human consumption. |
17
+ | <a id="music"></a> `Music` | `"music"` | `'music'` | The track should be treated as if it contains music data. Generally this might imply tuning or turning off audio-processing components that are used to process speech data to prevent the audio from being distorted. |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const REQUIRED_SIGNAL_KEYS: readonly ["onMediaChanged", "onVAD", "onSilentDetected"];
3
+ ```
@@ -0,0 +1,17 @@
1
+ ```ts
2
+ const VIDEO_CONTENT_HINTS: object;
3
+ ```
4
+
5
+ Video content hints are only applicable when the MediaStreamTrack contains a
6
+ video track.
7
+
8
+ [https://www.w3.org/TR/mst-content-hint/#video-content-hints](https://www.w3.org/TR/mst-content-hint/#video-content-hints)
9
+
10
+ ## Type Declaration
11
+
12
+ | Name | Type | Default value | Description |
13
+ | ------ | ------ | ------ | ------ |
14
+ | <a id="nohint"></a> `NoHint` | `""` | `''` | No hint has been provided, the implementation should make its best-informed guess on how contained video content should be treated. This can for example be inferred from how the track was opened or by doing content analysis. |
15
+ | <a id="motion"></a> `Motion` | `"motion"` | `'motion'` | The track should be treated as if it contains video where motion is important. This is normally webcam video, movies or video games. Quantization artefacts and downscaling are acceptable in order to preserve motion as well as possible while still retaining target bitrates. During low bitrates when compromises have to be made, more effort is spent on preserving frame rate than edge quality and details. |
16
+ | <a id="detail"></a> `Detail` | `"detail"` | `'detail'` | The track should be treated as if video details are extra important. This is generally applicable to presentations or web pages with text content, painting or line art. This setting would normally optimize for detail in the resulting individual frames rather than smooth playback. Artefacts from quantization or downscaling that make small text or line art unintelligible should be avoided. |
17
+ | <a id="text"></a> `Text` | `"text"` | `'text'` | The track should be treated as if video details are extra important, and that significant sharp edges and areas of consistent color can occur frequently. This is generally applicable to presentations or web pages with text content. This setting would normally optimize for detail in the resulting individual frames rather than smooth playback, and may take advantage of encoder tools that optimize for text rendering. Artefacts from quantization or downscaling that make small text or line art unintelligible should be avoided. |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const areBothGranted: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const hasNoAudioDevices: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const hasNoDevice: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const hasNoVideoDevices: UserMediaValidator;
3
+ ```
@@ -0,0 +1,13 @@
1
+ ```ts
2
+ const internalSignals: object;
3
+ ```
4
+
5
+ **`Internal`**
6
+
7
+ Internal signals
8
+
9
+ ## Type Declaration
10
+
11
+ | Name | Type |
12
+ | ------ | ------ |
13
+ | <a id="ondeviceschanged"></a> `onDevicesChanged` | `Signal`\<`IndexedDevices`, `IndexedDevices`\> |
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isAudioDeviceInUse: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isDeviceInUse: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isDevicesInUse: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isFallback: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isFallbackAudio: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isFallbackVideo: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isGranted: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isGrantedAudio: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isGrantedOnlyAudio: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isGrantedOnlyAudioNoVideoDevices: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isGrantedOnlyVideo: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isGrantedOnlyVideoNoAudioDevices: UserMediaValidator;
3
+ ```
@@ -0,0 +1,3 @@
1
+ ```ts
2
+ const isGrantedVideo: UserMediaValidator;
3
+ ```