stream-chat-react-native-core 6.0.1 → 6.0.2
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/lib/commonjs/native.js +5 -2
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/types/types.js +174 -1
- package/lib/commonjs/types/types.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/native.js +5 -2
- package/lib/module/native.js.map +1 -1
- package/lib/module/types/types.js +174 -1
- package/lib/module/types/types.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/native.d.ts +5 -0
- package/lib/typescript/native.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +375 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/native.ts +16 -2
- package/src/types/types.ts +429 -0
- package/src/version.json +1 -1
package/src/types/types.ts
CHANGED
|
@@ -100,3 +100,432 @@ export interface DefaultStreamChatGenerics extends ExtendableGenerics {
|
|
|
100
100
|
export type UnknownType = Record<string, unknown>;
|
|
101
101
|
|
|
102
102
|
export type ValueOf<T> = T[keyof T];
|
|
103
|
+
|
|
104
|
+
// ASYNC AUDIO EXPO:
|
|
105
|
+
|
|
106
|
+
export enum AndroidOutputFormat {
|
|
107
|
+
DEFAULT = 0,
|
|
108
|
+
THREE_GPP = 1,
|
|
109
|
+
MPEG_4 = 2,
|
|
110
|
+
AMR_NB = 3,
|
|
111
|
+
AMR_WB = 4,
|
|
112
|
+
AAC_ADIF = 5,
|
|
113
|
+
AAC_ADTS = 6,
|
|
114
|
+
RTP_AVP = 7,
|
|
115
|
+
MPEG2TS = 8,
|
|
116
|
+
WEBM = 9,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// @docsMissing
|
|
120
|
+
export enum AndroidAudioEncoder {
|
|
121
|
+
DEFAULT = 0,
|
|
122
|
+
AMR_NB = 1,
|
|
123
|
+
AMR_WB = 2,
|
|
124
|
+
AAC = 3,
|
|
125
|
+
HE_AAC = 4,
|
|
126
|
+
AAC_ELD = 5,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export enum IOSOutputFormat {
|
|
130
|
+
LINEARPCM = 'lpcm',
|
|
131
|
+
AC3 = 'ac-3',
|
|
132
|
+
'60958AC3' = 'cac3',
|
|
133
|
+
APPLEIMA4 = 'ima4',
|
|
134
|
+
MPEG4AAC = 'aac ',
|
|
135
|
+
MPEG4CELP = 'celp',
|
|
136
|
+
MPEG4HVXC = 'hvxc',
|
|
137
|
+
MPEG4TWINVQ = 'twvq',
|
|
138
|
+
MACE3 = 'MAC3',
|
|
139
|
+
MACE6 = 'MAC6',
|
|
140
|
+
ULAW = 'ulaw',
|
|
141
|
+
ALAW = 'alaw',
|
|
142
|
+
QDESIGN = 'QDMC',
|
|
143
|
+
QDESIGN2 = 'QDM2',
|
|
144
|
+
QUALCOMM = 'Qclp',
|
|
145
|
+
MPEGLAYER1 = '.mp1',
|
|
146
|
+
MPEGLAYER2 = '.mp2',
|
|
147
|
+
MPEGLAYER3 = '.mp3',
|
|
148
|
+
APPLELOSSLESS = 'alac',
|
|
149
|
+
MPEG4AAC_HE = 'aach',
|
|
150
|
+
MPEG4AAC_LD = 'aacl',
|
|
151
|
+
MPEG4AAC_ELD = 'aace',
|
|
152
|
+
MPEG4AAC_ELD_SBR = 'aacf',
|
|
153
|
+
MPEG4AAC_ELD_V2 = 'aacg',
|
|
154
|
+
MPEG4AAC_HE_V2 = 'aacp',
|
|
155
|
+
MPEG4AAC_SPATIAL = 'aacs',
|
|
156
|
+
AMR = 'samr',
|
|
157
|
+
AMR_WB = 'sawb',
|
|
158
|
+
AUDIBLE = 'AUDB',
|
|
159
|
+
ILBC = 'ilbc',
|
|
160
|
+
DVIINTELIMA = 0x6d730011,
|
|
161
|
+
MICROSOFTGSM = 0x6d730031,
|
|
162
|
+
AES3 = 'aes3',
|
|
163
|
+
ENHANCEDAC3 = 'ec-3',
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export enum IOSAudioQuality {
|
|
167
|
+
MIN = 0,
|
|
168
|
+
LOW = 0x20,
|
|
169
|
+
MEDIUM = 0x40,
|
|
170
|
+
HIGH = 0x60,
|
|
171
|
+
MAX = 0x7f,
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type RecordingOptionsAndroid = {
|
|
175
|
+
/**
|
|
176
|
+
* The desired audio encoder. See the [`AndroidAudioEncoder`](#androidaudioencoder) enum for all valid values.
|
|
177
|
+
*/
|
|
178
|
+
audioEncoder: AndroidAudioEncoder | number;
|
|
179
|
+
/**
|
|
180
|
+
* The desired file extension. Example valid values are `.3gp` and `.m4a`.
|
|
181
|
+
* For more information, see the [Android docs](https://developer.android.com/guide/topics/media/media-formats)
|
|
182
|
+
* for supported output formats.
|
|
183
|
+
*/
|
|
184
|
+
extension: string;
|
|
185
|
+
/**
|
|
186
|
+
* The desired file format. See the [`AndroidOutputFormat`](#androidoutputformat) enum for all valid values.
|
|
187
|
+
*/
|
|
188
|
+
outputFormat: AndroidOutputFormat | number;
|
|
189
|
+
/**
|
|
190
|
+
* The desired bit rate.
|
|
191
|
+
*
|
|
192
|
+
* Note that `prepareToRecordAsync()` may perform additional checks on the parameter to make sure whether the specified
|
|
193
|
+
* bit rate is applicable, and sometimes the passed bitRate will be clipped internally to ensure the audio recording
|
|
194
|
+
* can proceed smoothly based on the capabilities of the platform.
|
|
195
|
+
*
|
|
196
|
+
* @example `128000`
|
|
197
|
+
*/
|
|
198
|
+
bitRate?: number;
|
|
199
|
+
/**
|
|
200
|
+
* The desired maximum file size in bytes, after which the recording will stop (but `stopAndUnloadAsync()` must still
|
|
201
|
+
* be called after this point).
|
|
202
|
+
*
|
|
203
|
+
* @example `65536`
|
|
204
|
+
*/
|
|
205
|
+
maxFileSize?: number;
|
|
206
|
+
/**
|
|
207
|
+
* The desired number of channels.
|
|
208
|
+
*
|
|
209
|
+
* Note that `prepareToRecordAsync()` may perform additional checks on the parameter to make sure whether the specified
|
|
210
|
+
* number of audio channels are applicable.
|
|
211
|
+
*
|
|
212
|
+
* @example `1`, `2`
|
|
213
|
+
*/
|
|
214
|
+
numberOfChannels?: number;
|
|
215
|
+
/**
|
|
216
|
+
* The desired sample rate.
|
|
217
|
+
*
|
|
218
|
+
* Note that the sampling rate depends on the format for the audio recording, as well as the capabilities of the platform.
|
|
219
|
+
* For instance, the sampling rate supported by AAC audio coding standard ranges from 8 to 96 kHz,
|
|
220
|
+
* the sampling rate supported by AMRNB is 8kHz, and the sampling rate supported by AMRWB is 16kHz.
|
|
221
|
+
* Please consult with the related audio coding standard for the supported audio sampling rate.
|
|
222
|
+
*
|
|
223
|
+
* @example 44100
|
|
224
|
+
*/
|
|
225
|
+
sampleRate?: number;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export type RecordingOptionsIOS = {
|
|
229
|
+
/**
|
|
230
|
+
* The desired audio quality. See the [`IOSAudioQuality`](#iosaudioquality) enum for all valid values.
|
|
231
|
+
*/
|
|
232
|
+
audioQuality: IOSAudioQuality | number;
|
|
233
|
+
/**
|
|
234
|
+
* The desired bit rate.
|
|
235
|
+
*
|
|
236
|
+
* @example `128000`
|
|
237
|
+
*/
|
|
238
|
+
bitRate: number;
|
|
239
|
+
/**
|
|
240
|
+
* The desired file extension.
|
|
241
|
+
*
|
|
242
|
+
* @example `'.caf'`
|
|
243
|
+
*/
|
|
244
|
+
extension: string;
|
|
245
|
+
/**
|
|
246
|
+
* The desired number of channels.
|
|
247
|
+
*
|
|
248
|
+
* @example `1`, `2`
|
|
249
|
+
*/
|
|
250
|
+
numberOfChannels: number;
|
|
251
|
+
/**
|
|
252
|
+
* The desired sample rate.
|
|
253
|
+
*
|
|
254
|
+
* @example `44100`
|
|
255
|
+
*/
|
|
256
|
+
sampleRate: number;
|
|
257
|
+
/**
|
|
258
|
+
* The desired bit depth hint.
|
|
259
|
+
*
|
|
260
|
+
* @example `16`
|
|
261
|
+
*/
|
|
262
|
+
bitDepthHint?: number;
|
|
263
|
+
/**
|
|
264
|
+
* The desired bit rate strategy. See the next section for an enumeration of all valid values of `bitRateStrategy`.
|
|
265
|
+
*/
|
|
266
|
+
bitRateStrategy?: number;
|
|
267
|
+
/**
|
|
268
|
+
* The desired PCM bit depth.
|
|
269
|
+
*
|
|
270
|
+
* @example `16`
|
|
271
|
+
*/
|
|
272
|
+
linearPCMBitDepth?: number;
|
|
273
|
+
/**
|
|
274
|
+
* A boolean describing if the PCM data should be formatted in big endian.
|
|
275
|
+
*/
|
|
276
|
+
linearPCMIsBigEndian?: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* A boolean describing if the PCM data should be encoded in floating point or integral values.
|
|
279
|
+
*/
|
|
280
|
+
linearPCMIsFloat?: boolean;
|
|
281
|
+
/**
|
|
282
|
+
* The desired file format. See the [`IOSOutputFormat`](#iosoutputformat) enum for all valid values.
|
|
283
|
+
*/
|
|
284
|
+
outputFormat?: string | IOSOutputFormat | number;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// @docsMissing
|
|
288
|
+
export type RecordingOptionsWeb = {
|
|
289
|
+
bitsPerSecond?: number;
|
|
290
|
+
mimeType?: string;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
export type ExpoRecordingOptions = {
|
|
294
|
+
/**
|
|
295
|
+
* Recording options for the Android platform.
|
|
296
|
+
*/
|
|
297
|
+
android: RecordingOptionsAndroid;
|
|
298
|
+
/**
|
|
299
|
+
* Recording options for the iOS platform.
|
|
300
|
+
*/
|
|
301
|
+
ios: RecordingOptionsIOS;
|
|
302
|
+
/**
|
|
303
|
+
* Recording options for the Web platform.
|
|
304
|
+
*/
|
|
305
|
+
web: RecordingOptionsWeb;
|
|
306
|
+
/**
|
|
307
|
+
* A boolean that determines whether audio level information will be part of the status object under the "metering" key.
|
|
308
|
+
*/
|
|
309
|
+
isMeteringEnabled?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* A boolean that hints to keep the audio active after `prepareToRecordAsync` completes.
|
|
312
|
+
* Setting this value can improve the speed at which the recording starts. Only set this value to `true` when you call `startAsync`
|
|
313
|
+
* immediately after `prepareToRecordAsync`. This value is automatically set when using `Audio.recording.createAsync()`.
|
|
314
|
+
*/
|
|
315
|
+
keepAudioActiveHint?: boolean;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export type AudioMode = {
|
|
319
|
+
/**
|
|
320
|
+
* A boolean selecting if recording is enabled on iOS.
|
|
321
|
+
* > When this flag is set to `true`, playback may be routed to the phone earpiece instead of to the speaker. Set it back to `false` after stopping recording to reenable playback through the speaker.
|
|
322
|
+
* @default false
|
|
323
|
+
*/
|
|
324
|
+
allowsRecordingIOS: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* An enum selecting how your experience's audio should interact with the audio from other apps on Android.
|
|
327
|
+
*/
|
|
328
|
+
interruptionModeAndroid: InterruptionModeAndroid;
|
|
329
|
+
/**
|
|
330
|
+
* An enum selecting how your experience's audio should interact with the audio from other apps on iOS.
|
|
331
|
+
*/
|
|
332
|
+
interruptionModeIOS: InterruptionModeIOS;
|
|
333
|
+
/**
|
|
334
|
+
* A boolean selecting if your experience's audio should play in silent mode on iOS.
|
|
335
|
+
* @default false
|
|
336
|
+
*/
|
|
337
|
+
playsInSilentModeIOS: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* A boolean selecting if the audio is routed to earpiece on Android.
|
|
340
|
+
* @default false
|
|
341
|
+
*/
|
|
342
|
+
playThroughEarpieceAndroid: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* A boolean selecting if your experience's audio should automatically be lowered in volume ("duck") if audio from another
|
|
345
|
+
* app interrupts your experience. If `false`, audio from other apps will pause your audio.
|
|
346
|
+
* @default true
|
|
347
|
+
*/
|
|
348
|
+
shouldDuckAndroid: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* A boolean selecting if the audio session (playback or recording) should stay active even when the app goes into background.
|
|
351
|
+
* > This is not available in Expo Go for iOS, it will only work in standalone apps.
|
|
352
|
+
* > To enable it for standalone apps, [follow the instructions below](#playing-or-recording-audio-in-background)
|
|
353
|
+
* > to add `UIBackgroundModes` to your app configuration.
|
|
354
|
+
* @default false
|
|
355
|
+
*/
|
|
356
|
+
staysActiveInBackground: boolean;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
// @needsAudit
|
|
360
|
+
export enum InterruptionModeIOS {
|
|
361
|
+
/**
|
|
362
|
+
* **This is the default option.** If this option is set, your experience's audio is mixed with audio playing in background apps.
|
|
363
|
+
*/
|
|
364
|
+
MixWithOthers = 0,
|
|
365
|
+
/**
|
|
366
|
+
* If this option is set, your experience's audio interrupts audio from other apps.
|
|
367
|
+
*/
|
|
368
|
+
DoNotMix = 1,
|
|
369
|
+
/**
|
|
370
|
+
* If this option is set, your experience's audio lowers the volume ("ducks") of audio from other apps while your audio plays.
|
|
371
|
+
*/
|
|
372
|
+
DuckOthers = 2,
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export enum InterruptionModeAndroid {
|
|
376
|
+
/**
|
|
377
|
+
* If this option is set, your experience's audio interrupts audio from other apps.
|
|
378
|
+
*/
|
|
379
|
+
DoNotMix = 1,
|
|
380
|
+
/**
|
|
381
|
+
* **This is the default option.** If this option is set, your experience's audio lowers the volume ("ducks") of audio from other apps while your audio plays.
|
|
382
|
+
*/
|
|
383
|
+
DuckOthers = 2,
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export type ExpoAudioRecordingConfiguration = {
|
|
387
|
+
mode?: Partial<AudioMode>;
|
|
388
|
+
options?: Partial<ExpoRecordingOptions>;
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// ASYNC AUDIO RN CLI
|
|
392
|
+
|
|
393
|
+
export enum AudioSourceAndroidType {
|
|
394
|
+
DEFAULT = 0,
|
|
395
|
+
MIC,
|
|
396
|
+
VOICE_UPLINK,
|
|
397
|
+
VOICE_DOWNLINK,
|
|
398
|
+
VOICE_CALL,
|
|
399
|
+
CAMCORDER,
|
|
400
|
+
VOICE_RECOGNITION,
|
|
401
|
+
VOICE_COMMUNICATION,
|
|
402
|
+
REMOTE_SUBMIX,
|
|
403
|
+
UNPROCESSED,
|
|
404
|
+
RADIO_TUNER = 1998,
|
|
405
|
+
HOTWORD,
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export enum OutputFormatAndroidType {
|
|
409
|
+
DEFAULT = 0,
|
|
410
|
+
THREE_GPP,
|
|
411
|
+
MPEG_4,
|
|
412
|
+
AMR_NB,
|
|
413
|
+
AMR_WB,
|
|
414
|
+
AAC_ADIF,
|
|
415
|
+
AAC_ADTS,
|
|
416
|
+
OUTPUT_FORMAT_RTP_AVP,
|
|
417
|
+
MPEG_2_TS,
|
|
418
|
+
WEBM,
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export enum AudioEncoderAndroidType {
|
|
422
|
+
DEFAULT = 0,
|
|
423
|
+
AMR_NB,
|
|
424
|
+
AMR_WB,
|
|
425
|
+
AAC,
|
|
426
|
+
HE_AAC,
|
|
427
|
+
AAC_ELD,
|
|
428
|
+
VORBIS,
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export enum AVEncodingOption {
|
|
432
|
+
aac = 'aac',
|
|
433
|
+
alac = 'alac',
|
|
434
|
+
alaw = 'alaw',
|
|
435
|
+
amr = 'amr',
|
|
436
|
+
flac = 'flac',
|
|
437
|
+
ima4 = 'ima4',
|
|
438
|
+
lpcm = 'lpcm',
|
|
439
|
+
MAC3 = 'MAC3',
|
|
440
|
+
MAC6 = 'MAC6',
|
|
441
|
+
mp1 = 'mp1',
|
|
442
|
+
mp2 = 'mp2',
|
|
443
|
+
mp4 = 'mp4',
|
|
444
|
+
opus = 'opus',
|
|
445
|
+
ulaw = 'ulaw',
|
|
446
|
+
wav = 'wav',
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
export enum AVModeIOSOption {
|
|
450
|
+
gamechat = 'gamechat',
|
|
451
|
+
measurement = 'measurement',
|
|
452
|
+
movieplayback = 'movieplayback',
|
|
453
|
+
spokenaudio = 'spokenaudio',
|
|
454
|
+
videochat = 'videochat',
|
|
455
|
+
videorecording = 'videorecording',
|
|
456
|
+
voicechat = 'voicechat',
|
|
457
|
+
voiceprompt = 'voiceprompt',
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export type AVModeIOSType =
|
|
461
|
+
| AVModeIOSOption.gamechat
|
|
462
|
+
| AVModeIOSOption.measurement
|
|
463
|
+
| AVModeIOSOption.movieplayback
|
|
464
|
+
| AVModeIOSOption.spokenaudio
|
|
465
|
+
| AVModeIOSOption.videochat
|
|
466
|
+
| AVModeIOSOption.videorecording
|
|
467
|
+
| AVModeIOSOption.voicechat
|
|
468
|
+
| AVModeIOSOption.voiceprompt;
|
|
469
|
+
|
|
470
|
+
export enum AVEncoderAudioQualityIOSType {
|
|
471
|
+
min = 0,
|
|
472
|
+
low = 32,
|
|
473
|
+
medium = 64,
|
|
474
|
+
high = 96,
|
|
475
|
+
max = 127,
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
export enum AVLinearPCMBitDepthKeyIOSType {
|
|
479
|
+
'bit8' = 8,
|
|
480
|
+
'bit16' = 16,
|
|
481
|
+
'bit24' = 24,
|
|
482
|
+
'bit32' = 32,
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
type AVEncodingType =
|
|
486
|
+
| AVEncodingOption.lpcm
|
|
487
|
+
| AVEncodingOption.ima4
|
|
488
|
+
| AVEncodingOption.aac
|
|
489
|
+
| AVEncodingOption.MAC3
|
|
490
|
+
| AVEncodingOption.MAC6
|
|
491
|
+
| AVEncodingOption.ulaw
|
|
492
|
+
| AVEncodingOption.alaw
|
|
493
|
+
| AVEncodingOption.mp1
|
|
494
|
+
| AVEncodingOption.mp2
|
|
495
|
+
| AVEncodingOption.mp4
|
|
496
|
+
| AVEncodingOption.alac
|
|
497
|
+
| AVEncodingOption.amr
|
|
498
|
+
| AVEncodingOption.flac
|
|
499
|
+
| AVEncodingOption.opus
|
|
500
|
+
| AVEncodingOption.wav;
|
|
501
|
+
|
|
502
|
+
export interface AudioSet {
|
|
503
|
+
AudioChannelsAndroid?: number;
|
|
504
|
+
AudioEncoderAndroid?: AudioEncoderAndroidType;
|
|
505
|
+
AudioEncodingBitRateAndroid?: number;
|
|
506
|
+
AudioSamplingRateAndroid?: number;
|
|
507
|
+
AudioSourceAndroid?: AudioSourceAndroidType;
|
|
508
|
+
AVEncoderAudioQualityKeyIOS?: AVEncoderAudioQualityIOSType;
|
|
509
|
+
AVEncoderBitRateKeyIOS?: number;
|
|
510
|
+
AVFormatIDKeyIOS?: AVEncodingType;
|
|
511
|
+
AVLinearPCMBitDepthKeyIOS?: AVLinearPCMBitDepthKeyIOSType;
|
|
512
|
+
AVLinearPCMIsBigEndianKeyIOS?: boolean;
|
|
513
|
+
AVLinearPCMIsFloatKeyIOS?: boolean;
|
|
514
|
+
AVLinearPCMIsNonInterleavedIOS?: boolean;
|
|
515
|
+
AVModeIOS?: AVModeIOSType;
|
|
516
|
+
AVNumberOfChannelsKeyIOS?: number;
|
|
517
|
+
AVSampleRateKeyIOS?: number;
|
|
518
|
+
OutputFormatAndroid?: OutputFormatAndroidType;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
export type RNCLIRecordingOptions = {
|
|
522
|
+
audioSet?: AudioSet;
|
|
523
|
+
/**
|
|
524
|
+
* A boolean that determines whether audio level information will be part of the status object under the "metering" key.
|
|
525
|
+
*/
|
|
526
|
+
isMeteringEnabled?: boolean;
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
export type RNCLIAudioRecordingConfiguration = {
|
|
530
|
+
options?: RNCLIRecordingOptions;
|
|
531
|
+
};
|
package/src/version.json
CHANGED