@livekit/react-native 2.9.2 → 2.9.4

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 (103) hide show
  1. package/android/build.gradle +1 -3
  2. package/lib/commonjs/audio/MediaRecorder.js +2 -2
  3. package/lib/commonjs/audio/MediaRecorder.js.map +1 -1
  4. package/lib/commonjs/components/VideoTrack.js +6 -2
  5. package/lib/commonjs/components/VideoTrack.js.map +1 -1
  6. package/lib/commonjs/components/VideoView.js +3 -1
  7. package/lib/commonjs/components/VideoView.js.map +1 -1
  8. package/lib/commonjs/e2ee/RNE2EEManager.js +73 -1
  9. package/lib/commonjs/e2ee/RNE2EEManager.js.map +1 -1
  10. package/lib/commonjs/hooks/useE2EEManager.js +1 -1
  11. package/lib/commonjs/hooks/useE2EEManager.js.map +1 -1
  12. package/lib/commonjs/index.js +0 -1
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/module/audio/MediaRecorder.js +1 -1
  15. package/lib/module/audio/MediaRecorder.js.map +1 -1
  16. package/lib/module/components/VideoTrack.js +6 -2
  17. package/lib/module/components/VideoTrack.js.map +1 -1
  18. package/lib/module/components/VideoView.js +3 -1
  19. package/lib/module/components/VideoView.js.map +1 -1
  20. package/lib/module/e2ee/RNE2EEManager.js +75 -3
  21. package/lib/module/e2ee/RNE2EEManager.js.map +1 -1
  22. package/lib/module/hooks/useE2EEManager.js +1 -1
  23. package/lib/module/hooks/useE2EEManager.js.map +1 -1
  24. package/lib/module/index.js +0 -1
  25. package/lib/module/index.js.map +1 -1
  26. package/lib/typescript/{src/components → components}/VideoTrack.d.ts +1 -1
  27. package/lib/typescript/{src/e2ee → e2ee}/RNE2EEManager.d.ts +11 -2
  28. package/lib/typescript/{src/hooks → hooks}/useE2EEManager.d.ts +2 -2
  29. package/lib/typescript/{src/index.d.ts → index.d.ts} +1 -2
  30. package/package.json +31 -20
  31. package/src/audio/MediaRecorder.ts +1 -1
  32. package/src/components/VideoTrack.tsx +2 -0
  33. package/src/components/VideoView.tsx +1 -0
  34. package/src/e2ee/RNE2EEManager.ts +117 -2
  35. package/src/hooks/useE2EEManager.ts +3 -2
  36. package/src/index.tsx +1 -2
  37. package/lib/typescript/babel.config.d.ts +0 -1
  38. package/lib/typescript/docs/assets/icons.d.ts +0 -0
  39. package/lib/typescript/docs/assets/main.d.ts +0 -0
  40. package/lib/typescript/docs/assets/navigation.d.ts +0 -0
  41. package/lib/typescript/docs/assets/search.d.ts +0 -0
  42. package/lib/typescript/lib/commonjs/LKNativeModule.d.ts +0 -3
  43. package/lib/typescript/lib/commonjs/audio/AudioManager.d.ts +0 -10
  44. package/lib/typescript/lib/commonjs/audio/AudioSession.d.ts +0 -33
  45. package/lib/typescript/lib/commonjs/audio/MediaRecorder.d.ts +0 -24
  46. package/lib/typescript/lib/commonjs/components/BarVisualizer.d.ts +0 -32
  47. package/lib/typescript/lib/commonjs/components/LiveKitRoom.d.ts +0 -20
  48. package/lib/typescript/lib/commonjs/components/VideoTrack.d.ts +0 -2
  49. package/lib/typescript/lib/commonjs/components/VideoView.d.ts +0 -14
  50. package/lib/typescript/lib/commonjs/components/ViewPortDetector.d.ts +0 -30
  51. package/lib/typescript/lib/commonjs/e2ee/RNE2EEManager.d.ts +0 -23
  52. package/lib/typescript/lib/commonjs/e2ee/RNKeyProvider.d.ts +0 -33
  53. package/lib/typescript/lib/commonjs/events/EventEmitter.d.ts +0 -4
  54. package/lib/typescript/lib/commonjs/hooks/useE2EEManager.d.ts +0 -8
  55. package/lib/typescript/lib/commonjs/hooks/useMultibandTrackVolume.d.ts +0 -8
  56. package/lib/typescript/lib/commonjs/hooks/useTrackVolume.d.ts +0 -8
  57. package/lib/typescript/lib/commonjs/hooks.d.ts +0 -32
  58. package/lib/typescript/lib/commonjs/index.d.ts +0 -14
  59. package/lib/typescript/lib/commonjs/logger.d.ts +0 -8
  60. package/lib/typescript/lib/commonjs/useParticipant.d.ts +0 -14
  61. package/lib/typescript/lib/commonjs/useRoom.d.ts +0 -16
  62. package/lib/typescript/lib/module/LKNativeModule.d.ts +0 -2
  63. package/lib/typescript/lib/module/audio/AudioManager.d.ts +0 -9
  64. package/lib/typescript/lib/module/audio/AudioSession.d.ts +0 -31
  65. package/lib/typescript/lib/module/audio/MediaRecorder.d.ts +0 -22
  66. package/lib/typescript/lib/module/components/BarVisualizer.d.ts +0 -10
  67. package/lib/typescript/lib/module/components/LiveKitRoom.d.ts +0 -22
  68. package/lib/typescript/lib/module/components/VideoTrack.d.ts +0 -14
  69. package/lib/typescript/lib/module/components/VideoView.d.ts +0 -9
  70. package/lib/typescript/lib/module/components/ViewPortDetector.d.ts +0 -29
  71. package/lib/typescript/lib/module/e2ee/RNE2EEManager.d.ts +0 -21
  72. package/lib/typescript/lib/module/e2ee/RNKeyProvider.d.ts +0 -30
  73. package/lib/typescript/lib/module/events/EventEmitter.d.ts +0 -3
  74. package/lib/typescript/lib/module/hooks/useE2EEManager.d.ts +0 -9
  75. package/lib/typescript/lib/module/hooks/useMultibandTrackVolume.d.ts +0 -7
  76. package/lib/typescript/lib/module/hooks/useTrackVolume.d.ts +0 -7
  77. package/lib/typescript/lib/module/hooks.d.ts +0 -4
  78. package/lib/typescript/lib/module/index.d.ts +0 -23
  79. package/lib/typescript/lib/module/logger.d.ts +0 -8
  80. package/lib/typescript/lib/module/polyfills/MediaRecorderShim.d.ts +0 -1
  81. package/lib/typescript/lib/module/useParticipant.d.ts +0 -13
  82. package/lib/typescript/lib/module/useRoom.d.ts +0 -15
  83. package/lib/typescript/scripts/bootstrap.d.ts +0 -1
  84. package/lib/typescript/src/polyfills/EncoderDecoderTogether.min.d.ts +0 -0
  85. package/lib/typescript/src/polyfills/MediaRecorderShim.d.ts +0 -1
  86. /package/lib/typescript/{src/LKNativeModule.d.ts → LKNativeModule.d.ts} +0 -0
  87. /package/lib/typescript/{src/audio → audio}/AudioManager.d.ts +0 -0
  88. /package/lib/typescript/{src/audio → audio}/AudioSession.d.ts +0 -0
  89. /package/lib/typescript/{src/audio → audio}/MediaRecorder.d.ts +0 -0
  90. /package/lib/typescript/{src/components → components}/BarVisualizer.d.ts +0 -0
  91. /package/lib/typescript/{src/components → components}/LiveKitRoom.d.ts +0 -0
  92. /package/lib/typescript/{src/components → components}/VideoView.d.ts +0 -0
  93. /package/lib/typescript/{src/components → components}/ViewPortDetector.d.ts +0 -0
  94. /package/lib/typescript/{src/e2ee → e2ee}/RNKeyProvider.d.ts +0 -0
  95. /package/lib/typescript/{src/events → events}/EventEmitter.d.ts +0 -0
  96. /package/lib/typescript/{src/hooks → hooks}/useMultibandTrackVolume.d.ts +0 -0
  97. /package/lib/typescript/{src/hooks → hooks}/useTrackVolume.d.ts +0 -0
  98. /package/lib/typescript/{src/hooks.d.ts → hooks.d.ts} +0 -0
  99. /package/lib/typescript/{src/logger.d.ts → logger.d.ts} +0 -0
  100. /package/lib/typescript/{lib/module/polyfills → polyfills}/EncoderDecoderTogether.min.d.ts +0 -0
  101. /package/lib/typescript/{lib/commonjs/polyfills → polyfills}/MediaRecorderShim.d.ts +0 -0
  102. /package/lib/typescript/{src/useParticipant.d.ts → useParticipant.d.ts} +0 -0
  103. /package/lib/typescript/{src/useRoom.d.ts → useRoom.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livekit/react-native",
3
- "version": "2.9.2",
3
+ "version": "2.9.4",
4
4
  "description": "LiveKit for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -43,30 +43,35 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@livekit/components-react": "^2.8.1",
46
+ "@livekit/mutex": "^1.1.1",
46
47
  "array.prototype.at": "^1.1.1",
48
+ "base64-js": "1.5.1",
47
49
  "event-target-shim": "6.0.2",
48
50
  "events": "^3.3.0",
49
51
  "loglevel": "^1.8.0",
50
52
  "promise.allsettled": "^1.0.5",
51
- "react-native-quick-base64": "2.1.1",
52
53
  "react-native-url-polyfill": "^1.3.0",
53
54
  "typed-emitter": "^2.1.0",
54
55
  "web-streams-polyfill": "^4.1.0",
55
56
  "well-known-symbols": "^4.1.0"
56
57
  },
57
58
  "devDependencies": {
58
- "@babel/core": "^7.20.0",
59
- "@babel/preset-env": "^7.20.0",
60
- "@babel/runtime": "^7.20.0",
59
+ "@babel/core": "^7.25.2",
60
+ "@babel/preset-env": "^7.25.3",
61
+ "@babel/runtime": "^7.25.0",
61
62
  "@commitlint/config-conventional": "^16.2.1",
62
- "@livekit/react-native-webrtc": "^137.0.1",
63
- "@react-native/babel-preset": "0.74.84",
64
- "@react-native/eslint-config": "0.74.84",
65
- "@react-native/metro-config": "0.74.84",
66
- "@react-native/typescript-config": "0.74.84",
63
+ "@livekit/react-native-webrtc": "^137.0.2",
64
+ "@react-native-community/cli": "20.0.0",
65
+ "@react-native-community/cli-platform-android": "20.0.0",
66
+ "@react-native-community/cli-platform-ios": "20.0.0",
67
+ "@react-native/babel-preset": "0.82.0",
68
+ "@react-native/eslint-config": "0.82.0",
69
+ "@react-native/metro-config": "0.82.0",
70
+ "@react-native/typescript-config": "0.82.0",
67
71
  "@release-it/conventional-changelog": "^4.2.0",
68
72
  "@types/fastestsmallesttextencoderdecoder": "^1.0.0",
69
- "@types/react": "^18.2.6",
73
+ "@types/react": "^19.1.1",
74
+ "@types/react-test-renderer": "^19.1.0",
70
75
  "babel-jest": "^29.6.3",
71
76
  "commitlint": "^16.2.1",
72
77
  "eslint": "^8.23.0",
@@ -75,19 +80,19 @@
75
80
  "eslint-plugin-prettier": "^4.2.1",
76
81
  "husky": "^7.0.4",
77
82
  "jest": "^29.6.3",
78
- "livekit-client": "^2.15.4",
83
+ "livekit-client": "^2.15.8",
79
84
  "pod-install": "^0.2.2",
80
85
  "prettier": "2.8.8",
81
- "react": "18.2.0",
82
- "react-native": "0.74.2",
86
+ "react": "19.1.1",
87
+ "react-native": "0.82.0",
83
88
  "react-native-builder-bob": "^0.18.2",
84
89
  "release-it": "^14.2.2",
85
- "typedoc": "^0.25.13",
86
- "typescript": "5.0.4"
90
+ "typedoc": "^0.28.14",
91
+ "typescript": "^5.4.5"
87
92
  },
88
93
  "peerDependencies": {
89
- "@livekit/react-native-webrtc": "^137.0.1",
90
- "livekit-client": "^2.15.4",
94
+ "@livekit/react-native-webrtc": "^137.0.2",
95
+ "livekit-client": "^2.15.8",
91
96
  "react": "*",
92
97
  "react-native": "*"
93
98
  },
@@ -103,8 +108,11 @@
103
108
  "bootstrap": "yarn example && yarn && yarn pods"
104
109
  },
105
110
  "engines": {
106
- "node": ">=18"
111
+ "node": ">=20"
107
112
  },
113
+ "workspaces": [
114
+ "example"
115
+ ],
108
116
  "jest": {
109
117
  "preset": "react-native",
110
118
  "modulePathIgnorePatterns": [
@@ -172,7 +180,10 @@
172
180
  "root": true,
173
181
  "extends": [
174
182
  "@react-native",
175
- "prettier"
183
+ "eslint-config-prettier"
184
+ ],
185
+ "plugins": [
186
+ "eslint-plugin-prettier"
176
187
  ],
177
188
  "rules": {
178
189
  "prettier/prettier": [
@@ -5,7 +5,7 @@ import {
5
5
  Event,
6
6
  defineEventAttribute,
7
7
  } from 'event-target-shim/index';
8
- import { toByteArray } from 'react-native-quick-base64';
8
+ import { toByteArray } from 'base64-js';
9
9
  import LiveKitModule from '../LKNativeModule';
10
10
  import { log } from '../logger';
11
11
 
@@ -208,6 +208,7 @@ export const VideoTrack = forwardRef<RTCViewInstance, VideoTrackProps>(
208
208
  videoView = (
209
209
  <RTCView
210
210
  style={styles.videoTrack}
211
+ // @ts-expect-error
211
212
  streamURL={mediaStream?.toURL() ?? ''}
212
213
  objectFit={objectFit}
213
214
  zOrder={zOrder}
@@ -220,6 +221,7 @@ export const VideoTrack = forwardRef<RTCViewInstance, VideoTrackProps>(
220
221
  videoView = (
221
222
  <RTCPIPView
222
223
  style={styles.videoTrack}
224
+ // @ts-expect-error
223
225
  streamURL={mediaStream?.toURL() ?? ''}
224
226
  objectFit={objectFit}
225
227
  zOrder={zOrder}
@@ -98,6 +98,7 @@ export const VideoView = ({
98
98
  >
99
99
  <RTCView
100
100
  style={styles.videoView}
101
+ // @ts-expect-error
101
102
  streamURL={mediaStream?.toURL() ?? ''}
102
103
  objectFit={objectFit}
103
104
  zOrder={zOrder}
@@ -1,7 +1,10 @@
1
1
  import {
2
+ RTCDataPacketCryptor,
3
+ RTCDataPacketCryptorFactory,
2
4
  RTCFrameCryptorAlgorithm,
3
5
  RTCFrameCryptorFactory,
4
6
  RTCRtpReceiver,
7
+ type RTCEncryptedPacket,
5
8
  type RTCFrameCryptor,
6
9
  type RTCRtpSender,
7
10
  } from '@livekit/react-native-webrtc';
@@ -16,6 +19,9 @@ import {
16
19
  type BaseE2EEManager,
17
20
  type E2EEManagerCallbacks,
18
21
  EncryptionEvent,
22
+ type DecryptDataResponseMessage,
23
+ type EncryptDataResponseMessage,
24
+ Mutex,
19
25
  } from 'livekit-client';
20
26
  import type RNKeyProvider from './RNKeyProvider';
21
27
  import type RTCEngine from 'livekit-client/dist/src/room/RTCEngine';
@@ -36,11 +42,28 @@ export default class RNE2EEManager
36
42
  RTCFrameCryptorAlgorithm.kAesGcm;
37
43
 
38
44
  private encryptionEnabled: boolean = false;
45
+ private dataChannelEncryptionEnabled: boolean = false;
39
46
 
40
- constructor(keyProvider: RNKeyProvider) {
47
+ private dataPacketCryptorLock = new Mutex();
48
+ private dataPacketCryptor: RTCDataPacketCryptor | undefined = undefined;
49
+ constructor(
50
+ keyProvider: RNKeyProvider,
51
+ dcEncryptionEnabled: boolean = false
52
+ ) {
41
53
  super();
42
54
  this.keyProvider = keyProvider;
43
55
  this.encryptionEnabled = false;
56
+ this.dataChannelEncryptionEnabled = dcEncryptionEnabled;
57
+ }
58
+
59
+ get isEnabled(): boolean {
60
+ return this.encryptionEnabled;
61
+ }
62
+ get isDataChannelEncryptionEnabled(): boolean {
63
+ return this.isEnabled && this.dataChannelEncryptionEnabled;
64
+ }
65
+ set isDataChannelEncryptionEnabled(value: boolean) {
66
+ this.dataChannelEncryptionEnabled = value;
44
67
  }
45
68
 
46
69
  setup(room: Room) {
@@ -78,7 +101,16 @@ export default class RNE2EEManager
78
101
  await frameCryptor.dispose();
79
102
  }
80
103
  }
81
- );
104
+ )
105
+ .on(RoomEvent.SignalConnected, () => {
106
+ if (!this.room) {
107
+ throw new TypeError(`expected room to be present on signal connect`);
108
+ }
109
+ this.setParticipantCryptorEnabled(
110
+ this.room.localParticipant.isE2EEEnabled,
111
+ this.room.localParticipant.identity
112
+ );
113
+ });
82
114
  }
83
115
 
84
116
  private async setupE2EESender(
@@ -133,6 +165,89 @@ export default class RNE2EEManager
133
165
  this.keyProvider.setSifTrailer(trailer);
134
166
  }
135
167
 
168
+ private async getDataPacketCryptor(): Promise<RTCDataPacketCryptor> {
169
+ let dataPacketCryptor = this.dataPacketCryptor;
170
+ if (dataPacketCryptor) {
171
+ return dataPacketCryptor;
172
+ }
173
+
174
+ let unlock = await this.dataPacketCryptorLock.lock();
175
+
176
+ try {
177
+ dataPacketCryptor = this.dataPacketCryptor;
178
+ if (dataPacketCryptor) {
179
+ return dataPacketCryptor;
180
+ }
181
+
182
+ dataPacketCryptor =
183
+ await RTCDataPacketCryptorFactory.createDataPacketCryptor(
184
+ this.algorithm,
185
+ this.keyProvider.rtcKeyProvider
186
+ );
187
+
188
+ this.dataPacketCryptor = dataPacketCryptor;
189
+ return dataPacketCryptor;
190
+ } finally {
191
+ unlock();
192
+ }
193
+ }
194
+ async encryptData(
195
+ data: Uint8Array
196
+ ): Promise<EncryptDataResponseMessage['data']> {
197
+ let room = this.room;
198
+ if (!room) {
199
+ throw new Error("e2eemanager isn't setup with room!");
200
+ }
201
+
202
+ let participantId = room.localParticipant.identity;
203
+
204
+ let dataPacketCryptor = await this.getDataPacketCryptor();
205
+
206
+ let encryptedPacket = await dataPacketCryptor.encrypt(
207
+ participantId,
208
+ this.keyProvider.getLatestKeyIndex(participantId),
209
+ data
210
+ );
211
+
212
+ if (!encryptedPacket) {
213
+ throw new Error('encryption for packet failed');
214
+ }
215
+ return {
216
+ uuid: '', //not used
217
+ payload: encryptedPacket.payload,
218
+ iv: encryptedPacket.iv,
219
+ keyIndex: encryptedPacket.keyIndex,
220
+ };
221
+ }
222
+
223
+ async handleEncryptedData(
224
+ payload: Uint8Array,
225
+ iv: Uint8Array,
226
+ participantIdentity: string,
227
+ keyIndex: number
228
+ ): Promise<DecryptDataResponseMessage['data']> {
229
+ let packet = {
230
+ payload,
231
+ iv,
232
+ keyIndex,
233
+ } satisfies RTCEncryptedPacket;
234
+
235
+ let dataPacketCryptor = await this.getDataPacketCryptor();
236
+ let decryptedData = await dataPacketCryptor.decrypt(
237
+ participantIdentity,
238
+ packet
239
+ );
240
+
241
+ if (!decryptedData) {
242
+ throw new Error('decryption for packet failed');
243
+ }
244
+
245
+ return {
246
+ uuid: '', //not used
247
+ payload: decryptedData,
248
+ } satisfies DecryptDataResponseMessage['data'];
249
+ }
250
+
136
251
  // Utility methods
137
252
  //////////////////////
138
253
 
@@ -2,6 +2,7 @@ import RNE2EEManager from '../e2ee/RNE2EEManager';
2
2
  import { log, RNKeyProvider } from '..';
3
3
  import { useEffect, useState } from 'react';
4
4
  import type { RNKeyProviderOptions } from '../e2ee/RNKeyProvider';
5
+ import type { BaseE2EEManager } from 'livekit-client';
5
6
 
6
7
  export type UseRNE2EEManagerOptions = {
7
8
  keyProviderOptions?: RNKeyProviderOptions;
@@ -10,7 +11,7 @@ export type UseRNE2EEManagerOptions = {
10
11
 
11
12
  export interface RNE2EEManagerState {
12
13
  keyProvider: RNKeyProvider;
13
- e2eeManager: RNE2EEManager;
14
+ e2eeManager: BaseE2EEManager;
14
15
  }
15
16
 
16
17
  /**
@@ -22,7 +23,7 @@ export function useRNE2EEManager(
22
23
  let [keyProvider] = useState(
23
24
  () => new RNKeyProvider(options.keyProviderOptions ?? {})
24
25
  );
25
- let [e2eeManager] = useState(() => new RNE2EEManager(keyProvider));
26
+ let [e2eeManager] = useState(() => new RNE2EEManager(keyProvider, false));
26
27
 
27
28
  useEffect(() => {
28
29
  let setup = async () => {
package/src/index.tsx CHANGED
@@ -1,7 +1,6 @@
1
1
  import 'well-known-symbols/Symbol.asyncIterator/auto';
2
2
  import 'well-known-symbols/Symbol.iterator/auto';
3
3
  import './polyfills/MediaRecorderShim';
4
- import 'react-native-quick-base64';
5
4
  import { registerGlobals as webrtcRegisterGlobals } from '@livekit/react-native-webrtc';
6
5
  import { setupURLPolyfill } from 'react-native-url-polyfill';
7
6
  import './polyfills/EncoderDecoderTogether.min.js';
@@ -28,9 +27,9 @@ export interface RegisterGlobalsOptions {
28
27
  /**
29
28
  * Automatically configure audio session before accessing microphone.
30
29
  * When enabled, sets the iOS audio category to 'playAndRecord' before getUserMedia.
30
+ * Has no effect on non-iOS platforms.
31
31
  *
32
32
  * @default true
33
- * @platform ios
34
33
  */
35
34
  autoConfigureAudioSession?: boolean;
36
35
  }
@@ -1 +0,0 @@
1
- export const presets: string[];
File without changes
File without changes
File without changes
File without changes
@@ -1,3 +0,0 @@
1
- export const __esModule: boolean;
2
- export default LiveKitModule;
3
- declare const LiveKitModule: any;
@@ -1,10 +0,0 @@
1
- export const __esModule: boolean;
2
- /**
3
- * Handles setting the appropriate AVAudioSession options automatically
4
- * depending on the audio track states of the Room.
5
- *
6
- * @param room
7
- * @param preferSpeakerOutput
8
- * @param onConfigureNativeAudio A custom method for determining options used.
9
- */
10
- export function useIOSAudioManagement(room: any, preferSpeakerOutput: boolean | undefined, onConfigureNativeAudio: any): void;
@@ -1,33 +0,0 @@
1
- export const __esModule: boolean;
2
- export namespace AndroidAudioTypePresets {
3
- namespace communication {
4
- const manageAudioFocus: boolean;
5
- const audioMode: string;
6
- const audioFocusMode: string;
7
- const audioStreamType: string;
8
- const audioAttributesUsageType: string;
9
- const audioAttributesContentType: string;
10
- }
11
- namespace media {
12
- const manageAudioFocus_1: boolean;
13
- export { manageAudioFocus_1 as manageAudioFocus };
14
- const audioMode_1: string;
15
- export { audioMode_1 as audioMode };
16
- const audioFocusMode_1: string;
17
- export { audioFocusMode_1 as audioFocusMode };
18
- const audioStreamType_1: string;
19
- export { audioStreamType_1 as audioStreamType };
20
- const audioAttributesUsageType_1: string;
21
- export { audioAttributesUsageType_1 as audioAttributesUsageType };
22
- const audioAttributesContentType_1: string;
23
- export { audioAttributesContentType_1 as audioAttributesContentType };
24
- }
25
- }
26
- export default AudioSession;
27
- export function getDefaultAppleAudioConfigurationForMode(mode: any, preferSpeakerOutput?: boolean): {
28
- audioCategory: string;
29
- audioCategoryOptions: string[];
30
- audioMode: string;
31
- };
32
- declare class AudioSession {
33
- }
@@ -1,24 +0,0 @@
1
- export const __esModule: boolean;
2
- declare const MediaRecorder_base: any;
3
- /**
4
- * A MediaRecord implementation only meant for recording audio streams.
5
- *
6
- * @private
7
- */
8
- export class MediaRecorder extends MediaRecorder_base {
9
- [x: string]: any;
10
- constructor(stream: any);
11
- stream: any;
12
- registerListener(): void;
13
- _reactTag: any;
14
- unregisterListener(): void;
15
- pause(): void;
16
- state: string | undefined;
17
- resume(): void;
18
- start(): void;
19
- stop(): void;
20
- requestData(): void;
21
- dispatchData(): void;
22
- _parts: any[] | undefined;
23
- }
24
- export {};
@@ -1,32 +0,0 @@
1
- export const __esModule: boolean;
2
- /**
3
- * @beta
4
- */
5
- /**
6
- * Visualizes audio signals from a TrackReference as bars.
7
- * If the `state` prop is set, it automatically transitions between VoiceAssistant states.
8
- * @beta
9
- *
10
- * @remarks For VoiceAssistant state transitions this component requires a voice assistant agent running with livekit-agents \>= 0.9.0
11
- *
12
- * @example
13
- * ```tsx
14
- * function SimpleVoiceAssistant() {
15
- * const { state, audioTrack } = useVoiceAssistant();
16
- * return (
17
- * <BarVisualizer
18
- * state={state}
19
- * trackRef={audioTrack}
20
- * />
21
- * );
22
- * }
23
- * ```
24
- */
25
- export function BarVisualizer({ style, state, barCount, trackRef, options }: {
26
- style?: {} | undefined;
27
- state: any;
28
- barCount?: number | undefined;
29
- trackRef: any;
30
- options: any;
31
- }): any;
32
- export function useBarAnimator(state: any, columns: any, interval: any): any;
@@ -1,20 +0,0 @@
1
- export const __esModule: boolean;
2
- /** @public */
3
- /**
4
- * The `LiveKitRoom` component provides the room context to all its child components.
5
- * It is generally the starting point of your LiveKit app and the root of the LiveKit component tree.
6
- * It provides the room state as a React context to all child components, so you don't have to pass it yourself.
7
- *
8
- * @example
9
- * ```tsx
10
- * <LiveKitRoom
11
- * token='<livekit-token>'
12
- * serverUrl='<url-to-livekit-server>'
13
- * connect={true}
14
- * >
15
- * ...
16
- * </LiveKitRoom>
17
- * ```
18
- * @public
19
- */
20
- export function LiveKitRoom(props: any): any;
@@ -1,2 +0,0 @@
1
- export const __esModule: boolean;
2
- export const VideoTrack: any;
@@ -1,14 +0,0 @@
1
- export const __esModule: boolean;
2
- /**
3
- * @deprecated use `VideoTrack` and `VideoTrackProps` instead.
4
- */
5
- /**
6
- * @deprecated use `VideoTrack` and `VideoTrackProps` instead.
7
- */
8
- export function VideoView({ style, videoTrack, objectFit, zOrder, mirror }: {
9
- style?: {} | undefined;
10
- videoTrack: any;
11
- objectFit?: string | undefined;
12
- zOrder: any;
13
- mirror: any;
14
- }): any;
@@ -1,30 +0,0 @@
1
- export const __esModule: boolean;
2
- export default ViewPortDetector;
3
- declare const ViewPortDetector_base: any;
4
- /**
5
- * Detects when this is in the viewport and visible.
6
- *
7
- * Will not fire visibility changes for zero width/height components.
8
- */
9
- declare class ViewPortDetector extends ViewPortDetector_base {
10
- [x: string]: any;
11
- constructor(props: any);
12
- lastAppStateActive: any;
13
- interval: TimeoutHandler | null;
14
- lastValue: any;
15
- state: {
16
- rectTop: number;
17
- rectBottom: number;
18
- };
19
- componentDidMount(): void;
20
- appStateSubscription: any;
21
- componentWillUnmount(): void;
22
- UNSAFE_componentWillReceiveProps(nextProps: any): void;
23
- render(): any;
24
- view: any;
25
- }
26
- declare class TimeoutHandler {
27
- set handler(arg: any);
28
- get handler(): any;
29
- clear(): void;
30
- }
@@ -1,23 +0,0 @@
1
- export const __esModule: boolean;
2
- export default RNE2EEManager;
3
- declare const RNE2EEManager_base: any;
4
- /**
5
- * @experimental
6
- */
7
- declare class RNE2EEManager extends RNE2EEManager_base {
8
- [x: string]: any;
9
- constructor(keyProvider: any);
10
- keyProvider: any;
11
- encryptionEnabled: boolean;
12
- setup(room: any): void;
13
- room: any;
14
- setupEventListeners(room: any): void;
15
- setupE2EESender(publication: any, participant: any): Promise<void>;
16
- setupE2EEReceiver(publication: any, participant: any): Promise<void>;
17
- setSifTrailer(trailer: any): void;
18
- findTrackCryptor(trackId: any): any;
19
- createFrameCryptorForSender(sender: any, participantId: any): any;
20
- createFrameCryptorForReceiver(receiver: any, participantId: any): any;
21
- setupEngine(_engine: any): void;
22
- setParticipantCryptorEnabled(enabled: any, participantIdentity: any): void;
23
- }
@@ -1,33 +0,0 @@
1
- export const __esModule: boolean;
2
- export default RNKeyProvider;
3
- declare const RNKeyProvider_base: any;
4
- /**
5
- * Options for construction an RNKeyProvider
6
- */
7
- /**
8
- * @experimental
9
- */
10
- declare class RNKeyProvider extends RNKeyProvider_base {
11
- [x: string]: any;
12
- constructor(options: any);
13
- nativeKeyProvider: any;
14
- getLatestKeyIndex(participantId: any): any;
15
- /**
16
- * Accepts a passphrase that's used to create the crypto keys.
17
- * @param key
18
- */
19
- setSharedKey(key: any, keyIndex: any): Promise<any>;
20
- ratchetSharedKey(keyIndex: any): Promise<void>;
21
- /**
22
- * Accepts a passphrase that's used to create the crypto keys for a participant's stream.
23
- * @param key
24
- */
25
- setKey(participantId: any, key: any, keyIndex: any): Promise<any>;
26
- ratchetKey(participantIdentity: any, keyIndex: any): Promise<void>;
27
- setSifTrailer(trailer: any): Promise<any>;
28
- /**
29
- * @internal
30
- */
31
- get rtcKeyProvider(): any;
32
- dispose(): void;
33
- }
@@ -1,4 +0,0 @@
1
- export const __esModule: boolean;
2
- export function addListener(listener: any, eventName: any, eventHandler: any): void;
3
- export function removeListener(listener: any): void;
4
- export function setupNativeEvents(): void;
@@ -1,8 +0,0 @@
1
- export const __esModule: boolean;
2
- /**
3
- * @experimental
4
- */
5
- export function useRNE2EEManager(options: any): {
6
- keyProvider: any;
7
- e2eeManager: any;
8
- };
@@ -1,8 +0,0 @@
1
- export const __esModule: boolean;
2
- /**
3
- * A hook for tracking the volume of an audio track across multiple frequency bands.
4
- *
5
- * @param trackOrTrackReference
6
- * @returns A number array containing the volume for each frequency band.
7
- */
8
- export function useMultibandTrackVolume(trackOrTrackReference: any, options: any): any;
@@ -1,8 +0,0 @@
1
- export const __esModule: boolean;
2
- /**
3
- * A hook for tracking the volume of an audio track.
4
- *
5
- * @param trackOrTrackReference
6
- * @returns A number between 0-1 representing the volume.
7
- */
8
- export function useTrackVolume(trackOrTrackReference: any): any;
@@ -1,32 +0,0 @@
1
- export const __esModule: boolean;
2
- export const ParticipantContext: any;
3
- export const RoomContext: any;
4
- export const TrackRefContext: any;
5
- export const isTrackReference: any;
6
- export const useChat: any;
7
- export const useConnectionState: any;
8
- export const useDataChannel: any;
9
- export const useEnsureTrackRef: any;
10
- export const useIsEncrypted: any;
11
- export const useIsMuted: any;
12
- export const useIsSpeaking: any;
13
- export const useLiveKitRoom: any;
14
- export const useLocalParticipant: any;
15
- export const useLocalParticipantPermissions: any;
16
- export const useMaybeTrackRefContext: any;
17
- export const useParticipantContext: any;
18
- export const useParticipantInfo: any;
19
- export const useParticipantTracks: any;
20
- export const useParticipants: any;
21
- export const useRemoteParticipant: any;
22
- export const useRemoteParticipants: any;
23
- export const useRoomContext: any;
24
- export const useRoomInfo: any;
25
- export const useSortedParticipants: any;
26
- export const useSpeakingParticipants: any;
27
- export const useTrackMutedIndicator: any;
28
- export const useTrackRefContext: any;
29
- export const useTrackTranscription: any;
30
- export const useTracks: any;
31
- export const useVisualStableUpdate: any;
32
- export const useVoiceAssistant: any;