@voltkit-rtc/react-native 0.0.0-stage → 0.1.1

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 (225) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1608 -2
  4. package/android/build.gradle +70 -0
  5. package/android/consumer-rules.pro +21 -0
  6. package/android/src/main/AndroidManifest.xml +25 -0
  7. package/android/src/main/java/com/voltkit/rtc/reactnative/AppVisibility.kt +67 -0
  8. package/android/src/main/java/com/voltkit/rtc/reactnative/AudioDevices.kt +67 -0
  9. package/android/src/main/java/com/voltkit/rtc/reactnative/AudioRouter.kt +487 -0
  10. package/android/src/main/java/com/voltkit/rtc/reactnative/CallServiceTypes.kt +120 -0
  11. package/android/src/main/java/com/voltkit/rtc/reactnative/NativeTimers.kt +106 -0
  12. package/android/src/main/java/com/voltkit/rtc/reactnative/NetworkWatch.kt +120 -0
  13. package/android/src/main/java/com/voltkit/rtc/reactnative/OutputChoice.kt +65 -0
  14. package/android/src/main/java/com/voltkit/rtc/reactnative/RtcConfig.kt +83 -0
  15. package/android/src/main/java/com/voltkit/rtc/reactnative/ScoLink.kt +61 -0
  16. package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitCallService.kt +287 -0
  17. package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitRtcInitProvider.kt +215 -0
  18. package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitRtcModule.kt +313 -0
  19. package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitRtcPackage.kt +30 -0
  20. package/android/src/main/res/drawable/voltkit_rtc_default_call_icon.xml +15 -0
  21. package/android/src/main/res/raw/voltkit_rtc_keep.xml +7 -0
  22. package/app.plugin.js +17 -0
  23. package/lib/commonjs/audio.js +215 -0
  24. package/lib/commonjs/audio.js.map +1 -0
  25. package/lib/commonjs/components.js +207 -0
  26. package/lib/commonjs/components.js.map +1 -0
  27. package/lib/commonjs/create-client.js +47 -0
  28. package/lib/commonjs/create-client.js.map +1 -0
  29. package/lib/commonjs/errors.js +99 -0
  30. package/lib/commonjs/errors.js.map +1 -0
  31. package/lib/commonjs/globals.js +61 -0
  32. package/lib/commonjs/globals.js.map +1 -0
  33. package/lib/commonjs/index.js +234 -0
  34. package/lib/commonjs/index.js.map +1 -0
  35. package/lib/commonjs/local-media.js +392 -0
  36. package/lib/commonjs/local-media.js.map +1 -0
  37. package/lib/commonjs/native-session.js +365 -0
  38. package/lib/commonjs/native-session.js.map +1 -0
  39. package/lib/commonjs/native.js +99 -0
  40. package/lib/commonjs/native.js.map +1 -0
  41. package/lib/commonjs/package.json +1 -0
  42. package/lib/commonjs/permissions.js +166 -0
  43. package/lib/commonjs/permissions.js.map +1 -0
  44. package/lib/commonjs/platform/android.js +126 -0
  45. package/lib/commonjs/platform/android.js.map +1 -0
  46. package/lib/commonjs/platform/common.js +138 -0
  47. package/lib/commonjs/platform/common.js.map +1 -0
  48. package/lib/commonjs/platform/devices.js +151 -0
  49. package/lib/commonjs/platform/devices.js.map +1 -0
  50. package/lib/commonjs/platform/index.js +35 -0
  51. package/lib/commonjs/platform/index.js.map +1 -0
  52. package/lib/commonjs/platform/ios.js +54 -0
  53. package/lib/commonjs/platform/ios.js.map +1 -0
  54. package/lib/commonjs/platform/streams.js +273 -0
  55. package/lib/commonjs/platform/streams.js.map +1 -0
  56. package/lib/commonjs/platform/timers.js +71 -0
  57. package/lib/commonjs/platform/timers.js.map +1 -0
  58. package/lib/commonjs/platform/visibility.js +60 -0
  59. package/lib/commonjs/platform/visibility.js.map +1 -0
  60. package/lib/commonjs/preflight.js +77 -0
  61. package/lib/commonjs/preflight.js.map +1 -0
  62. package/lib/commonjs/provider.js +75 -0
  63. package/lib/commonjs/provider.js.map +1 -0
  64. package/lib/commonjs/specs/NativeVoltkitRtc.js +29 -0
  65. package/lib/commonjs/specs/NativeVoltkitRtc.js.map +1 -0
  66. package/lib/module/audio.js +207 -0
  67. package/lib/module/audio.js.map +1 -0
  68. package/lib/module/components.js +200 -0
  69. package/lib/module/components.js.map +1 -0
  70. package/lib/module/create-client.js +42 -0
  71. package/lib/module/create-client.js.map +1 -0
  72. package/lib/module/errors.js +87 -0
  73. package/lib/module/errors.js.map +1 -0
  74. package/lib/module/globals.js +53 -0
  75. package/lib/module/globals.js.map +1 -0
  76. package/lib/module/index.js +33 -0
  77. package/lib/module/index.js.map +1 -0
  78. package/lib/module/local-media.js +387 -0
  79. package/lib/module/local-media.js.map +1 -0
  80. package/lib/module/native-session.js +360 -0
  81. package/lib/module/native-session.js.map +1 -0
  82. package/lib/module/native.js +87 -0
  83. package/lib/module/native.js.map +1 -0
  84. package/lib/module/package.json +1 -0
  85. package/lib/module/permissions.js +160 -0
  86. package/lib/module/permissions.js.map +1 -0
  87. package/lib/module/platform/android.js +122 -0
  88. package/lib/module/platform/android.js.map +1 -0
  89. package/lib/module/platform/common.js +128 -0
  90. package/lib/module/platform/common.js.map +1 -0
  91. package/lib/module/platform/devices.js +142 -0
  92. package/lib/module/platform/devices.js.map +1 -0
  93. package/lib/module/platform/index.js +24 -0
  94. package/lib/module/platform/index.js.map +1 -0
  95. package/lib/module/platform/ios.js +49 -0
  96. package/lib/module/platform/ios.js.map +1 -0
  97. package/lib/module/platform/streams.js +268 -0
  98. package/lib/module/platform/streams.js.map +1 -0
  99. package/lib/module/platform/timers.js +67 -0
  100. package/lib/module/platform/timers.js.map +1 -0
  101. package/lib/module/platform/visibility.js +54 -0
  102. package/lib/module/platform/visibility.js.map +1 -0
  103. package/lib/module/preflight.js +72 -0
  104. package/lib/module/preflight.js.map +1 -0
  105. package/lib/module/provider.js +70 -0
  106. package/lib/module/provider.js.map +1 -0
  107. package/lib/module/specs/NativeVoltkitRtc.js +37 -0
  108. package/lib/module/specs/NativeVoltkitRtc.js.map +1 -0
  109. package/lib/typescript/commonjs/audio.d.ts +58 -0
  110. package/lib/typescript/commonjs/audio.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/components.d.ts +58 -0
  112. package/lib/typescript/commonjs/components.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/create-client.d.ts +35 -0
  114. package/lib/typescript/commonjs/create-client.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/errors.d.ts +34 -0
  116. package/lib/typescript/commonjs/errors.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/globals.d.ts +16 -0
  118. package/lib/typescript/commonjs/globals.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/index.d.ts +24 -0
  120. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/local-media.d.ts +86 -0
  122. package/lib/typescript/commonjs/local-media.d.ts.map +1 -0
  123. package/lib/typescript/commonjs/native-session.d.ts +38 -0
  124. package/lib/typescript/commonjs/native-session.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/native.d.ts +18 -0
  126. package/lib/typescript/commonjs/native.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/package.json +1 -0
  128. package/lib/typescript/commonjs/permissions.d.ts +30 -0
  129. package/lib/typescript/commonjs/permissions.d.ts.map +1 -0
  130. package/lib/typescript/commonjs/platform/android.d.ts +4 -0
  131. package/lib/typescript/commonjs/platform/android.d.ts.map +1 -0
  132. package/lib/typescript/commonjs/platform/common.d.ts +101 -0
  133. package/lib/typescript/commonjs/platform/common.d.ts.map +1 -0
  134. package/lib/typescript/commonjs/platform/devices.d.ts +42 -0
  135. package/lib/typescript/commonjs/platform/devices.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/platform/index.d.ts +6 -0
  137. package/lib/typescript/commonjs/platform/index.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/platform/ios.d.ts +4 -0
  139. package/lib/typescript/commonjs/platform/ios.d.ts.map +1 -0
  140. package/lib/typescript/commonjs/platform/streams.d.ts +82 -0
  141. package/lib/typescript/commonjs/platform/streams.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/platform/timers.d.ts +19 -0
  143. package/lib/typescript/commonjs/platform/timers.d.ts.map +1 -0
  144. package/lib/typescript/commonjs/platform/visibility.d.ts +11 -0
  145. package/lib/typescript/commonjs/platform/visibility.d.ts.map +1 -0
  146. package/lib/typescript/commonjs/preflight.d.ts +19 -0
  147. package/lib/typescript/commonjs/preflight.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/provider.d.ts +35 -0
  149. package/lib/typescript/commonjs/provider.d.ts.map +1 -0
  150. package/lib/typescript/commonjs/specs/NativeVoltkitRtc.d.ts +157 -0
  151. package/lib/typescript/commonjs/specs/NativeVoltkitRtc.d.ts.map +1 -0
  152. package/lib/typescript/module/audio.d.ts +58 -0
  153. package/lib/typescript/module/audio.d.ts.map +1 -0
  154. package/lib/typescript/module/components.d.ts +58 -0
  155. package/lib/typescript/module/components.d.ts.map +1 -0
  156. package/lib/typescript/module/create-client.d.ts +35 -0
  157. package/lib/typescript/module/create-client.d.ts.map +1 -0
  158. package/lib/typescript/module/errors.d.ts +34 -0
  159. package/lib/typescript/module/errors.d.ts.map +1 -0
  160. package/lib/typescript/module/globals.d.ts +16 -0
  161. package/lib/typescript/module/globals.d.ts.map +1 -0
  162. package/lib/typescript/module/index.d.ts +24 -0
  163. package/lib/typescript/module/index.d.ts.map +1 -0
  164. package/lib/typescript/module/local-media.d.ts +86 -0
  165. package/lib/typescript/module/local-media.d.ts.map +1 -0
  166. package/lib/typescript/module/native-session.d.ts +38 -0
  167. package/lib/typescript/module/native-session.d.ts.map +1 -0
  168. package/lib/typescript/module/native.d.ts +18 -0
  169. package/lib/typescript/module/native.d.ts.map +1 -0
  170. package/lib/typescript/module/package.json +1 -0
  171. package/lib/typescript/module/permissions.d.ts +30 -0
  172. package/lib/typescript/module/permissions.d.ts.map +1 -0
  173. package/lib/typescript/module/platform/android.d.ts +4 -0
  174. package/lib/typescript/module/platform/android.d.ts.map +1 -0
  175. package/lib/typescript/module/platform/common.d.ts +101 -0
  176. package/lib/typescript/module/platform/common.d.ts.map +1 -0
  177. package/lib/typescript/module/platform/devices.d.ts +42 -0
  178. package/lib/typescript/module/platform/devices.d.ts.map +1 -0
  179. package/lib/typescript/module/platform/index.d.ts +6 -0
  180. package/lib/typescript/module/platform/index.d.ts.map +1 -0
  181. package/lib/typescript/module/platform/ios.d.ts +4 -0
  182. package/lib/typescript/module/platform/ios.d.ts.map +1 -0
  183. package/lib/typescript/module/platform/streams.d.ts +82 -0
  184. package/lib/typescript/module/platform/streams.d.ts.map +1 -0
  185. package/lib/typescript/module/platform/timers.d.ts +19 -0
  186. package/lib/typescript/module/platform/timers.d.ts.map +1 -0
  187. package/lib/typescript/module/platform/visibility.d.ts +11 -0
  188. package/lib/typescript/module/platform/visibility.d.ts.map +1 -0
  189. package/lib/typescript/module/preflight.d.ts +19 -0
  190. package/lib/typescript/module/preflight.d.ts.map +1 -0
  191. package/lib/typescript/module/provider.d.ts +35 -0
  192. package/lib/typescript/module/provider.d.ts.map +1 -0
  193. package/lib/typescript/module/specs/NativeVoltkitRtc.d.ts +157 -0
  194. package/lib/typescript/module/specs/NativeVoltkitRtc.d.ts.map +1 -0
  195. package/package.json +140 -4
  196. package/plugin/build/android.d.ts +36 -0
  197. package/plugin/build/android.js +265 -0
  198. package/plugin/build/index.d.ts +9 -0
  199. package/plugin/build/index.js +54 -0
  200. package/plugin/build/ios.d.ts +4 -0
  201. package/plugin/build/ios.js +43 -0
  202. package/plugin/build/options.d.ts +93 -0
  203. package/plugin/build/options.js +140 -0
  204. package/react-native.config.js +11 -0
  205. package/src/audio.ts +221 -0
  206. package/src/components.tsx +233 -0
  207. package/src/create-client.ts +53 -0
  208. package/src/errors.ts +81 -0
  209. package/src/globals.ts +54 -0
  210. package/src/index.ts +95 -0
  211. package/src/local-media.ts +420 -0
  212. package/src/native-session.tsx +384 -0
  213. package/src/native.ts +84 -0
  214. package/src/permissions.ts +173 -0
  215. package/src/platform/android.ts +128 -0
  216. package/src/platform/common.ts +157 -0
  217. package/src/platform/devices.ts +148 -0
  218. package/src/platform/index.ts +22 -0
  219. package/src/platform/ios.ts +48 -0
  220. package/src/platform/streams.ts +285 -0
  221. package/src/platform/timers.ts +72 -0
  222. package/src/platform/visibility.ts +59 -0
  223. package/src/preflight.ts +60 -0
  224. package/src/provider.tsx +88 -0
  225. package/src/specs/NativeVoltkitRtc.ts +180 -0
@@ -0,0 +1,58 @@
1
+ import { type MediaDevice, type StreamClient } from '@voltkit-rtc/client';
2
+ /**
3
+ * Play call audio on the loudspeaker (true) or the earpiece (false) when no headset is connected; a wired or Bluetooth
4
+ * headset still wins. Kept until changed, and applied to calls joined later. Rejects with `media-unavailable` on iOS
5
+ * and where the native module is missing.
6
+ */
7
+ export declare function setSpeakerphoneOn(on: boolean): Promise<void>;
8
+ /**
9
+ * Play call audio on this output (a deviceId from useAudioOutput().outputs) while it stays connected. Rejects with
10
+ * `bad-params` for an output that is not there and in the audio mode `media`, and with `media-unavailable` on iOS and
11
+ * where the native module is missing.
12
+ */
13
+ export declare function selectAudioOutput(deviceId: string): Promise<void>;
14
+ /**
15
+ * The speaker preference a newly joined call holds the audio with: the provider's (default the loudspeaker), unless
16
+ * the app chose with setSpeakerphoneOn, which the router keeps (null).
17
+ */
18
+ export declare function speakerPreference(provider: boolean | undefined): boolean | null;
19
+ /**
20
+ * One client's hold on the call audio: acquired once it is connected, released when it closes or the provider lets go
21
+ * of it. Released a moment late, so React's StrictMode (an effect unmounted and mounted again at once) neither
22
+ * releases nor acquires twice.
23
+ */
24
+ declare class AudioHold {
25
+ private readonly onError;
26
+ private holder;
27
+ private users;
28
+ private pendingRelease;
29
+ constructor(onError: (error: Error) => void);
30
+ retain(): void;
31
+ /** One user less; the hold goes when none is left. */
32
+ unretain(): void;
33
+ acquire(speakerphone: boolean | null): void;
34
+ release(): void;
35
+ }
36
+ /** The call audio hold of `client`. */
37
+ export declare function audioHoldOf(client: StreamClient, onError: (error: Error) => void): AudioHold;
38
+ export interface AudioOutput {
39
+ /** Outputs can be chosen here: Android with the native module, in the audio mode `communication`. */
40
+ supported: boolean;
41
+ /** Where call audio can play: speaker, earpiece, wired and USB headsets, Bluetooth. Empty where not supported. */
42
+ outputs: MediaDevice[];
43
+ /** Where call audio plays now, while a call holds the audio; null otherwise. */
44
+ current: MediaDevice | null;
45
+ /** The loudspeaker is in use (or, with no call holding the audio, preferred). */
46
+ speakerphone: boolean;
47
+ /** Play call audio on this output (selectAudioOutput). */
48
+ select(deviceId: string): Promise<void>;
49
+ /** The loudspeaker (true) or the earpiece (false), when no headset is connected (setSpeakerphoneOn). */
50
+ setSpeakerphoneOn(on: boolean): Promise<void>;
51
+ }
52
+ /**
53
+ * Where call audio plays, and the choice of output (an Android "speaker / phone / headset" picker). Works before any
54
+ * call: a choice made then is kept. On iOS and without the native module `supported` is false and the calls reject.
55
+ */
56
+ export declare function useAudioOutput(): AudioOutput;
57
+ export {};
58
+ //# sourceMappingURL=audio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../../src/audio.ts"],"names":[],"mappings":"AAYA,OAAO,EAAY,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAOpF;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAKlE;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAavE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,IAAI,CAE/E;AAID;;;;GAIG;AACH,cAAM,SAAS;IAKD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJpC,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,KAAK,CAAK;IAClB,OAAO,CAAC,cAAc,CAAS;gBAEF,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI;IAE5D,MAAM,IAAI,IAAI;IAKd,sDAAsD;IACtD,QAAQ,IAAI,IAAI;IAShB,OAAO,CAAC,YAAY,EAAE,OAAO,GAAG,IAAI,GAAG,IAAI;IAa3C,OAAO,IAAI,IAAI;CAShB;AAID,uCAAuC;AACvC,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,SAAS,CAO5F;AAID,MAAM,WAAW,WAAW;IAC1B,qGAAqG;IACrG,SAAS,EAAE,OAAO,CAAC;IACnB,kHAAkH;IAClH,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,gFAAgF;IAChF,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,iFAAiF;IACjF,YAAY,EAAE,OAAO,CAAC;IACtB,0DAA0D;IAC1D,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,wGAAwG;IACxG,iBAAiB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C;AA0ED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAG5C"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * VideoTrack and AudioTrack, React Native's versions of @voltkit-rtc/react's.
3
+ *
4
+ * VideoTrack shows a track in react-native-webrtc's RTCView, which plays a stream by URL. Its stream is a wrapper made
5
+ * through platform/streams.ts, one per track and shared by every view of it, released (never the track) when the last
6
+ * view goes -- or earlier, while the connection still exists, when the client is about to close what receives the
7
+ * track or stops it: releasing a wrapper after its track died kills the app (Phase 0 finding 1). The URL is set one
8
+ * frame after mounting, and the native view is mounted again once if no frame size arrives within 3 s
9
+ * (react-native-webrtc #1611, black video).
10
+ *
11
+ * AudioTrack renders nothing: React Native plays every remote audio track by itself. It sets one track's volume
12
+ * (react-native-webrtc's `_setVolume`, unity at 1) or mutes it here only.
13
+ */
14
+ import { type ReactElement } from 'react';
15
+ import { type StyleProp, type ViewStyle } from 'react-native';
16
+ import type { MediaStreamTrackLike } from './platform/common';
17
+ /** How long a view waits for its first frame before its native view is mounted again (react-native-webrtc #1611). */
18
+ export declare const FIRST_FRAME_TIMEOUT_MS = 3000;
19
+ export interface VideoTrackProps {
20
+ /**
21
+ * The video to show: a remote track's `track`, or your camera (`useLocalMedia().stream?.getVideoTracks()[0]`). Nothing
22
+ * while null. Typed by shape (`MediaStreamTrackLike`), so the app needs no DOM library for it.
23
+ */
24
+ track: MediaStreamTrackLike | null | undefined;
25
+ /**
26
+ * The remote video's `producerId`: it is then received at the size this view is shown and paused at the server while
27
+ * the view is not `visible` (adaptive stream). Leave it out for your own camera.
28
+ */
29
+ producerId?: string;
30
+ /** Flip it horizontally, as people expect to see their own front camera. */
31
+ mirror?: boolean;
32
+ /** `cover` (the default: fill the view, cropping) or `contain` (all of the picture, with bars). */
33
+ objectFit?: 'cover' | 'contain';
34
+ /** Which of two overlapping videos is on top (RTCView's zOrder): 0 for a full-screen video, 1 for a preview over it. */
35
+ zOrder?: number;
36
+ /** Whether the view can be seen now (a list scrolled past it, a hidden tab): with `producerId`, the video pauses at the server while false. */
37
+ visible?: boolean;
38
+ /** The video's size in pixels: its first frame arrived, or the size changed. */
39
+ onDimensionsChange?: (size: {
40
+ width: number;
41
+ height: number;
42
+ }) => void;
43
+ style?: StyleProp<ViewStyle>;
44
+ testID?: string;
45
+ }
46
+ /** A video track in an RTCView, sized by `style`. */
47
+ export declare function VideoTrack({ track, producerId, mirror, objectFit, zOrder, visible, onDimensionsChange, style, testID, }: VideoTrackProps): ReactElement;
48
+ export interface AudioTrackProps {
49
+ /** The audio to set: a remote track's `track`. Nothing while null. Typed by shape (`MediaStreamTrackLike`). */
50
+ track: MediaStreamTrackLike | null | undefined;
51
+ /** 0 to 1, clamped (1 is the track as received). Unset leaves it as it is. This track only. */
52
+ volume?: number;
53
+ /** Silence it here only (the track is switched off while muted, and back on after). */
54
+ muted?: boolean;
55
+ }
56
+ /** One remote audio track's volume, or muted, while mounted. Renders nothing: React Native plays remote audio itself. */
57
+ export declare function AudioTrack({ track, volume, muted }: AudioTrackProps): null;
58
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/components.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,EAA4C,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAMxG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,qHAAqH;AACrH,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,KAAK,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mGAAmG;IACnG,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,wHAAwH;IACxH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+IAA+I;IAC/I,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gFAAgF;IAChF,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACvE,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAID,qDAAqD;AACrD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,UAAU,EACV,MAAc,EACd,SAAmB,EACnB,MAAM,EACN,OAAc,EACd,kBAAkB,EAClB,KAAK,EACL,MAAM,GACP,EAAE,eAAe,GAAG,YAAY,CAsHhC;AAED,MAAM,WAAW,eAAe;IAC9B,+GAA+G;IAC/G,KAAK,EAAE,oBAAoB,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uFAAuF;IACvF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AASD,yHAAyH;AACzH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAa,EAAE,EAAE,eAAe,GAAG,IAAI,CAgClF"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * A StreamClient for React Native: react-native-webrtc's mediasoup handler (ReactNative106) and this package's
3
+ * platform, with the background pause on for the camera. The provider makes its clients this way; an app that makes and
4
+ * owns its client (the provider's `client` prop, a PK battle's second client) uses createClient.
5
+ */
6
+ import { StreamClient, type ClientOptions } from '@voltkit-rtc/client';
7
+ /** What happens to the camera and microphone while the app is in the background. */
8
+ export interface BackgroundOptions {
9
+ /**
10
+ * Switch the camera off while the app is in the background or the screen is off, and back on when it returns (only
11
+ * if this switched it off): viewers see the camera off rather than a frozen picture. Android stops a background
12
+ * app's camera anyway. Default true.
13
+ */
14
+ pauseCamera?: boolean;
15
+ /** The same for the microphone. Leave it off for calls, which go on talking in the background. Default false. */
16
+ pauseMic?: boolean;
17
+ }
18
+ export interface CreateClientOptions {
19
+ /** The background pause: camera on by default, microphone off. */
20
+ background?: BackgroundOptions;
21
+ /** StreamClient options of your own; they win over the ones set here. */
22
+ clientOptions?: ClientOptions;
23
+ }
24
+ /**
25
+ * The ClientOptions a React Native client is made with: `{ handlerName: 'ReactNative106', platform,
26
+ * pauseCameraInBackground, pauseMicInBackground, ...clientOptions }`.
27
+ */
28
+ export declare function reactNativeClientOptions(options?: CreateClientOptions): ClientOptions;
29
+ /**
30
+ * A StreamClient for React Native, not yet connected: call `connect()`. Throws `media-unavailable` with
31
+ * `{ reason: 'webrtc-missing' }` where react-native-webrtc's native module is missing (Expo Go: it needs a development
32
+ * build).
33
+ */
34
+ export declare function createClient(wsUrl: string, token: string, options?: CreateClientOptions): StreamClient;
35
+ //# sourceMappingURL=create-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-client.d.ts","sourceRoot":"","sources":["../../../src/create-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKvE,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iHAAiH;IACjH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,yEAAyE;IACzE,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,mBAAwB,GAAG,aAAa,CASzF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB,GAAG,YAAY,CAG1G"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The errors this package raises. Every one is an RpcError with a code from the VoltKit error registry
3
+ * (@voltkit-rtc/client ERROR_CODES, checked code for code against every SDK by scripts/test/sdk-contract-sdks.mjs), so
4
+ * an app switches on `error.code` exactly as it does in a browser or the Android SDK. What is missing goes in `data`:
5
+ *
6
+ * - `media-unavailable` `{ reason: 'webrtc-missing' }`: react-native-webrtc's native module is not in the app (Expo Go,
7
+ * or an app not rebuilt after installing it). The message says it needs a development build.
8
+ * - `media-unavailable` `{ reason: 'native-missing', feature }`: this package's own native module is not in the app.
9
+ * - `media-unavailable` `{ platform: 'ios', feature }`: not in the iOS preview (audio routing: setSpeakerphoneOn,
10
+ * selectAudioOutput, switchDevice('audiooutput')). The call service and screen sharing do not raise it there: the
11
+ * service is simply not declared (useCallService), and the client answers `screen-share-unsupported`.
12
+ * - `media-unavailable` `{ permission: 'camera' | 'microphone', status: 'denied' | 'blocked' }`: a refused permission,
13
+ * the field names of the Android SDK.
14
+ * - `media-unavailable` `{ feature: 'callService' }`: the call service could not start or keep running.
15
+ */
16
+ import { RpcError } from '@voltkit-rtc/client';
17
+ export type MediaPermissionKind = 'camera' | 'microphone';
18
+ /** react-native-webrtc's native module is missing: Expo Go, or the app was not rebuilt. */
19
+ export declare function webrtcMissing(): RpcError;
20
+ /** This package's own native module is missing: the app was not rebuilt after installing it. */
21
+ export declare function nativeMissing(feature: string): RpcError;
22
+ /** Not in the iOS preview of 0.1.0. */
23
+ export declare function iosUnsupported(feature: string): RpcError;
24
+ /** A camera or microphone permission the user refused: `blocked` when Android will not ask again. */
25
+ export declare function permissionRefused(permission: MediaPermissionKind, status: 'denied' | 'blocked'): RpcError;
26
+ /** The call service could not start, or Android stopped it. */
27
+ export declare function callServiceFailed(message: string): RpcError;
28
+ /** A failure a native module or react-native-webrtc reported, as an RpcError with a registry code. */
29
+ export declare function nativeFailure(error: unknown, code?: 'media-unavailable' | 'camera-failed' | 'screen-share-failed', data?: Record<string, unknown>): RpcError;
30
+ /** A readable message from anything thrown: an Error, react-native-webrtc's MediaStreamError (not an Error), a string. */
31
+ export declare function describeError(error: unknown): string;
32
+ /** Report a failure from code no caller awaits: the error listener's own errors never escape into the app. */
33
+ export declare function logError(context: string, error: unknown): void;
34
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE1D,2FAA2F;AAC3F,wBAAgB,aAAa,IAAI,QAAQ,CAMxC;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAMvD;AAED,uCAAuC;AACvC,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAExD;AAED,qGAAqG;AACrG,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAMzG;AAED,+DAA+D;AAC/D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAE3D;AAED,sGAAsG;AACtG,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,GAAE,mBAAmB,GAAG,eAAe,GAAG,qBAA2C,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAGjL;AAED,0HAA0H;AAC1H,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAWpD;AAED,8GAA8G;AAC9G,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAG9D"}
@@ -0,0 +1,16 @@
1
+ import type * as WebRTC from 'react-native-webrtc';
2
+ export type WebRTCModule = typeof WebRTC;
3
+ /** Whether react-native-webrtc's native module is in this app. */
4
+ export declare function webrtcAvailable(): boolean;
5
+ /** react-native-webrtc, or null when its native module is not in the app (Expo Go, an app not rebuilt). */
6
+ export declare function loadWebRTC(): WebRTCModule | null;
7
+ /**
8
+ * Install react-native-webrtc's WebRTC classes as globals (RTCPeerConnection, MediaStream, ...), which mediasoup-client
9
+ * needs. Runs when the package is imported; calling it again does nothing. Returns false, without throwing, where
10
+ * react-native-webrtc's native module is missing: the provider then reports `media-unavailable` with
11
+ * `{ reason: 'webrtc-missing' }`.
12
+ */
13
+ export declare function registerVoltkitGlobals(): boolean;
14
+ /** The version of react-native-webrtc in the app, for getDiagnostics(); null when it cannot be read. */
15
+ export declare function webrtcVersion(): string | null;
16
+ //# sourceMappingURL=globals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/globals.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,OAAO,MAAM,CAAC;AAKzC,kEAAkE;AAClE,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,2GAA2G;AAC3G,wBAAgB,UAAU,IAAI,YAAY,GAAG,IAAI,CAMhD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAOhD;AAED,wGAAwG;AACxG,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAQ7C"}
@@ -0,0 +1,24 @@
1
+ export { registerVoltkitGlobals } from './globals';
2
+ export { createClient, reactNativeClientOptions } from './create-client';
3
+ export type { BackgroundOptions, CreateClientOptions } from './create-client';
4
+ export { preflight } from './preflight';
5
+ export type { ReactNativePreflightOptions } from './preflight';
6
+ export { reactNativePlatform } from './platform';
7
+ export type { MediaStreamLike, MediaStreamTrackLike, MediaTrackSettingsLike } from './platform/common';
8
+ export { VoltkitProvider } from './provider';
9
+ export type { VoltkitProviderProps } from './provider';
10
+ export { useCallService } from './native-session';
11
+ export type { AudioSessionOptions, CallServiceState, CallServiceText } from './native-session';
12
+ export { useLocalMedia } from './local-media';
13
+ export type { LocalMedia, LocalPublishOptions } from './local-media';
14
+ export { VideoTrack, AudioTrack } from './components';
15
+ export type { VideoTrackProps, AudioTrackProps } from './components';
16
+ export { useAudioOutput, setSpeakerphoneOn, selectAudioOutput } from './audio';
17
+ export type { AudioOutput } from './audio';
18
+ export { requestMediaPermissions, checkMediaPermissions, usePermissions } from './permissions';
19
+ export type { PermissionKind, PermissionStatus, PermissionStatuses, Permissions } from './permissions';
20
+ export { SDK_VERSION } from './native';
21
+ export { useVoltkitClient, useRoom, useConnectionState, useParticipants, useRemoteTracks, useNetworkQuality, useWalletLow, useVoltkitEvent, useActiveSpeakers, useAudioLevels, useCpuConstrained, useDevices, useIsSpeaking, useMediaWarnings, usePublishFallback, useStreamFallback, } from '@voltkit-rtc/react';
22
+ export type { RoomState, RemoteTrackFilter, WalletLowState } from '@voltkit-rtc/react';
23
+ export type { AudioDeviceType, AudioQuality, CameraFacing, ChatMessage, ClientEvents, ClientOptions, ClientPlatform, ClosedReason, CodecPreference, ConnectionState, DeviceHandlerName, DeviceKind, ErrorCode, JoinResult, LayerCount, LocalMediaState, MediaDevice, MediaPermissions, NetworkQuality, NetworkQualityLevel, ParticipantInfo, PreflightReport, PublishOptions, RemoteTrack, Role, ScreenMode, ScreenPublishOptions, SendMessageOptions, StreamClient, TokenExpiringNotice, TrackSource, UsageLimitNotice, VideoQuality, WalletLowNotice, } from '@voltkit-rtc/client';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AACzE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAA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nB,eAAe,EACf,eAAe,EACf,cAAc,EACd,WAAW,EACX,IAAI,EACJ,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { type AudioQuality, type MediaPermissions, type PublishOptions, type ScreenPublishOptions, type StreamClient, type VideoQuality } from '@voltkit-rtc/client';
2
+ import { type MediaStreamLike, type UserMediaConstraints } from './platform/common';
3
+ /** A camera's or microphone's constraints, as the client declares them (this package compiles without the DOM library). */
4
+ type TrackConstraints = Exclude<NonNullable<UserMediaConstraints['audio']>, boolean>;
5
+ export interface LocalPublishOptions extends PublishOptions {
6
+ /** The microphone: true (the default) for VoltKit's settings, false for none, or your own constraints, used as given. */
7
+ audio?: boolean | TrackConstraints;
8
+ /** The camera: true (the default) for the quality's frame and frame rate, false for none, or your own constraints. */
9
+ video?: boolean | TrackConstraints;
10
+ /** Which camera: `'user'` (front, the default) or `'environment'` (back). Only with `video: true`. */
11
+ facingMode?: 'user' | 'environment';
12
+ }
13
+ export interface LocalMedia {
14
+ /**
15
+ * Your camera and microphone as published (`client.local`); null when not publishing them. react-native-webrtc's
16
+ * stream, typed by shape (`MediaStreamLike`): `stream.getVideoTracks()[0]` is the camera for a `VideoTrack`.
17
+ */
18
+ stream: MediaStreamLike | null;
19
+ /** True while anything is published: camera, microphone, screen or music. */
20
+ publishing: boolean;
21
+ micEnabled: boolean;
22
+ camEnabled: boolean;
23
+ /** What the microphone is sent at, after the project's limit. */
24
+ audioQuality: AudioQuality;
25
+ /** What the camera is sent at, after the project's limit. */
26
+ videoQuality: VideoQuality;
27
+ videoFrameRate: 30 | 60;
28
+ screenSharing: boolean;
29
+ /** The screen being shared, for a preview; null when not sharing. */
30
+ screenStream: MediaStreamLike | null;
31
+ /** What this project lets this client publish: offer only these. */
32
+ permissions: MediaPermissions;
33
+ /** The published camera faces you (`'user'`) or away (`'environment'`); null without a camera. */
34
+ facingMode: 'user' | 'environment' | null;
35
+ /**
36
+ * Open the camera and microphone and publish them, asking for their permissions first. Only hosts and cohosts may.
37
+ * A refused permission rejects with `media-unavailable` `{ permission: 'camera' | 'microphone', status: 'denied' |
38
+ * 'blocked' }` before any device opens.
39
+ */
40
+ publish(options?: LocalPublishOptions): Promise<void>;
41
+ /** Stop publishing everything, screen and music included, and release the devices. */
42
+ unpublish(): Promise<void>;
43
+ setMicEnabled(on: boolean): Promise<void>;
44
+ setCamEnabled(on: boolean): Promise<void>;
45
+ /** Resolves to the quality in use; rejects with `audio-quality-not-allowed` for HD where the project allows standard only. */
46
+ setAudioQuality(quality: AudioQuality): Promise<AudioQuality>;
47
+ /** Raises the camera's capture first when it is smaller than `quality`. Resolves to the quality used. */
48
+ setVideoQuality(quality: VideoQuality): Promise<VideoQuality>;
49
+ /** Resolves to the frame rate used: 30 where the project or the camera cannot do 60. */
50
+ setVideoFrameRate(frameRate: 30 | 60): Promise<30 | 60>;
51
+ /**
52
+ * Front to back or back to front, on the same track: viewers see no gap and the producer stays the same. Resolves
53
+ * true when the front camera is in use now (the contract's switchCamera). Rejects with `media-unavailable` when no
54
+ * camera is published. A device with one camera keeps it.
55
+ */
56
+ switchCamera(): Promise<boolean>;
57
+ /**
58
+ * Share the screen beside the camera (Android: react-native-webrtc's MediaProjection consent; the Expo plugin's
59
+ * android.screenShare must be on). `screen-share-denied` when the user cancels, `screen-share-service-required`
60
+ * without the plugin option, `screen-share-unsupported` on iOS.
61
+ */
62
+ startScreenShare(options?: ScreenPublishOptions): Promise<MediaStreamLike>;
63
+ stopScreenShare(): Promise<void>;
64
+ }
65
+ /**
66
+ * Per client: the screen being shared (only events tell it) and a signal for what changes without an event (publish,
67
+ * a camera switch). Recorded while held: the provider holds its client's for as long as it has the client.
68
+ */
69
+ declare class LocalSession {
70
+ private readonly client;
71
+ screen: MediaStreamLike | null;
72
+ private readonly listeners;
73
+ private holders;
74
+ private stopListening;
75
+ constructor(client: StreamClient);
76
+ hold(): () => void;
77
+ subscribe(listener: () => void): () => void;
78
+ changed(): void;
79
+ private listen;
80
+ private endScreen;
81
+ }
82
+ export declare function localSessionOf(client: StreamClient): LocalSession;
83
+ /** Your camera, microphone and screen: what is published, and the calls that change it. */
84
+ export declare function useLocalMedia(): LocalMedia;
85
+ export {};
86
+ //# sourceMappingURL=local-media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-media.d.ts","sourceRoot":"","sources":["../../../src/local-media.ts"],"names":[],"mappings":"AAUA,OAAO,EAIL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAQ7B,OAAO,EAAkC,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEpH,2HAA2H;AAC3H,KAAK,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AAErF,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,yHAAyH;IACzH,KAAK,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACnC,sHAAsH;IACtH,KAAK,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAAC;IACnC,sGAAsG;IACtG,UAAU,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;CACrC;AAED,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,6EAA6E;IAC7E,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,iEAAiE;IACjE,YAAY,EAAE,YAAY,CAAC;IAC3B,6DAA6D;IAC7D,YAAY,EAAE,YAAY,CAAC;IAC3B,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CAAK;IACpB,OAAO,CAAC,aAAa,CAA6B;gBAErB,MAAM,EAAE,YAAY;IAEjD,IAAI,IAAI,MAAM,IAAI;IAalB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAO3C,OAAO,IAAI,IAAI;IAIf,OAAO,CAAC,MAAM;IAkBd,OAAO,CAAC,SAAS;CAKlB;AAID,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CAOjE;AA0FD,2FAA2F;AAC3F,wBAAgB,aAAa,IAAI,UAAU,CAM1C"}
@@ -0,0 +1,38 @@
1
+ /** The call service's notification. */
2
+ export interface CallServiceText {
3
+ /** Default "Call in progress". */
4
+ title?: string;
5
+ /** Default "Tap to return to the call". */
6
+ text?: string;
7
+ /** The Leave action's label. Default "Leave". */
8
+ leaveLabel?: string;
9
+ }
10
+ /** How the provider manages the call audio. */
11
+ export interface AudioSessionOptions {
12
+ /** The loudspeaker (true, the default) or the earpiece when no headset is connected, unless setSpeakerphoneOn chose. */
13
+ speakerphone?: boolean;
14
+ /** Hold the call audio (mode, focus, routing) while the call is connected. Default true. */
15
+ manage?: boolean;
16
+ }
17
+ export interface CallServiceState {
18
+ /** The app's manifest declares the call service (VoltkitCallService). */
19
+ declared: boolean;
20
+ /** It runs now. */
21
+ running: boolean;
22
+ /** The foreground service types it runs with: `microphone`, `mediaPlayback`, `camera`, `mediaProjection`. */
23
+ types: string[];
24
+ }
25
+ /** The call service: whether the app declares it, whether it runs and with which types. */
26
+ export declare function useCallService(): CallServiceState;
27
+ export interface NativeSessionProps {
28
+ audio: AudioSessionOptions | false | undefined;
29
+ callService: boolean | CallServiceText | undefined;
30
+ /** The provider's background.pauseCamera: for a client whose own options cannot be read (see pausesCameraInBackground). */
31
+ pauseCamera: boolean;
32
+ onError: {
33
+ readonly current: ((error: Error) => void) | undefined;
34
+ };
35
+ }
36
+ /** Rendered by the provider inside @voltkit-rtc/react's provider: keeps the call audio and the call service for its client. */
37
+ export declare function NativeSession({ audio, callService, pauseCamera, onError }: NativeSessionProps): null;
38
+ //# sourceMappingURL=native-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-session.d.ts","sourceRoot":"","sources":["../../../src/native-session.tsx"],"names":[],"mappings":"AAyBA,uCAAuC;AACvC,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,wHAAwH;IACxH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAgBD,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,QAAQ,EAAE,OAAO,CAAC;IAClB,mBAAmB;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,6GAA6G;IAC7G,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AA2ND,2FAA2F;AAC3F,wBAAgB,cAAc,IAAI,gBAAgB,CAEjD;AAID,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,mBAAmB,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/C,WAAW,EAAE,OAAO,GAAG,eAAe,GAAG,SAAS,CAAC;IACnD,2HAA2H;IAC3H,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;KAAE,CAAC;CACrE;AAED,+HAA+H;AAC/H,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,kBAAkB,GAAG,IAAI,CAkDpG"}
@@ -0,0 +1,18 @@
1
+ import type { EventSubscription } from 'react-native';
2
+ import { type AudioDevice, type Constants, type Spec } from './specs/NativeVoltkitRtc';
3
+ import type { MediaDevice } from '@voltkit-rtc/client';
4
+ /** The version of this package: what getDiagnostics() reports, and what the native side was built from. */
5
+ export declare const SDK_VERSION = "0.1.1";
6
+ /** The native module, or null where there is none (iOS, Expo Go, an app not rebuilt). */
7
+ export declare function nativeModule(): Spec | null;
8
+ /** The module's constants, read once: the audio mode, screen sharing, the call service as the manifest declares them. */
9
+ export declare function nativeConstants(): Constants | null;
10
+ /** The native module for `feature`, or the error that says why there is none. */
11
+ export declare function requireNative(feature: string): Spec;
12
+ /** Subscribe to one of the module's events; a listener that throws is logged and the others still run. */
13
+ export declare function listen<T>(emitter: ((handler: (value: T) => void) => EventSubscription) | undefined, name: string, listener: (value: T) => void): () => void;
14
+ /** A native audio device as the client's MediaDevice. */
15
+ export declare function toMediaDevice(device: AudioDevice): MediaDevice;
16
+ /** For tests: forget the cached constants. */
17
+ export declare function resetNativeForTests(): void;
18
+ //# sourceMappingURL=native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../src/native.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAyB,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEzG,OAAO,KAAK,EAA+B,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEpF,2GAA2G;AAC3G,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,yFAAyF;AACzF,wBAAgB,YAAY,IAAI,IAAI,GAAG,IAAI,CAG1C;AAKD,yHAAyH;AACzH,wBAAgB,eAAe,IAAI,SAAS,GAAG,IAAI,CAkBlD;AAED,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAKnD;AAED,0GAA0G;AAC1G,wBAAgB,MAAM,CAAC,CAAC,EACtB,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAAK,iBAAiB,CAAC,GAAG,SAAS,EACzE,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAC3B,MAAM,IAAI,CAUZ;AAKD,yDAAyD;AACzD,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAI9D;AAED,8CAA8C;AAC9C,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C"}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,30 @@
1
+ /** What can be asked for. */
2
+ export type PermissionKind = 'camera' | 'microphone' | 'notifications';
3
+ /** `granted`; `denied` (not granted yet: asking may still show the dialog); `blocked` (only the settings can grant it). */
4
+ export type PermissionStatus = 'granted' | 'denied' | 'blocked';
5
+ export type PermissionStatuses<K extends PermissionKind = PermissionKind> = {
6
+ [P in K]: PermissionStatus;
7
+ };
8
+ /**
9
+ * Ask for these permissions, showing the system's dialogs for those not granted yet. Resolves with each one's status;
10
+ * never rejects.
11
+ */
12
+ export declare function requestMediaPermissions<K extends PermissionKind>(kinds: readonly K[]): Promise<PermissionStatuses<K>>;
13
+ /** Each permission's status now, without asking. Never rejects. */
14
+ export declare function checkMediaPermissions<K extends PermissionKind>(kinds: readonly K[]): Promise<PermissionStatuses<K>>;
15
+ export interface Permissions<K extends PermissionKind = PermissionKind> {
16
+ /** Each permission's status; null until first checked. Checked again whenever the app comes back to the front. */
17
+ statuses: PermissionStatuses<K> | null;
18
+ /** Every one granted. */
19
+ granted: boolean;
20
+ /** Ask for those not granted (the system's dialogs); resolves with the statuses. */
21
+ request(): Promise<PermissionStatuses<K>>;
22
+ /** Check again without asking. */
23
+ refresh(): Promise<PermissionStatuses<K>>;
24
+ }
25
+ /**
26
+ * The status of these permissions, checked on mount and whenever the app returns to the front (the user may have
27
+ * changed them in the settings), with `request()` to ask for them.
28
+ */
29
+ export declare function usePermissions<K extends PermissionKind>(kinds: readonly K[]): Permissions<K>;
30
+ //# sourceMappingURL=permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../src/permissions.ts"],"names":[],"mappings":"AAkBA,6BAA6B;AAC7B,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,YAAY,GAAG,eAAe,CAAC;AAEvE,2HAA2H;AAC3H,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhE,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IAAI;KAAG,CAAC,IAAI,CAAC,GAAG,gBAAgB;CAAE,CAAC;AAa3G;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAmB3H;AAED,mEAAmE;AACnE,wBAAsB,qBAAqB,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAoBzH;AAoCD,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc;IACpE,kHAAkH;IAClH,QAAQ,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACvC,yBAAyB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,oFAAoF;IACpF,OAAO,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,kCAAkC;IAClC,OAAO,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;CAC3C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAgC5F"}
@@ -0,0 +1,4 @@
1
+ import { type ClientPlatform } from '@voltkit-rtc/client';
2
+ /** The Android platform. One per process (platform/index.ts). */
3
+ export declare function androidPlatform(): ClientPlatform;
4
+ //# sourceMappingURL=android.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"android.d.ts","sourceRoot":"","sources":["../../../../src/platform/android.ts"],"names":[],"mappings":"AAQA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA4EpE,iEAAiE;AACjE,wBAAgB,eAAe,IAAI,cAAc,CA0ChD"}
@@ -0,0 +1,101 @@
1
+ import { type ClientPlatform, type DeviceEnv, type EncodingInfoProbe } from '@voltkit-rtc/client';
2
+ import { type MediaPermissionKind } from '../errors';
3
+ /**
4
+ * The DOM's media types as the client declares them. This package compiles without the DOM library (React Native has
5
+ * none), so they are taken from the client's own declarations rather than named.
6
+ */
7
+ export type UserMediaConstraints = Parameters<NonNullable<ClientPlatform['getUserMedia']>>[0];
8
+ export type ClientStream = ReturnType<ClientPlatform['createStream']>;
9
+ export type ClientTrack = Parameters<ClientPlatform['stopTrack']>[0];
10
+ /**
11
+ * `ClientPlatform.adoptAppStream` (optional in @voltkit-rtc/client 0.9.12; this platform always provides it): the
12
+ * client is taking tracks from `stream`, a stream the app gave it (`publish(stream)`, `publishScreen({ stream })`),
13
+ * and will stop and release those tracks but never the stream, which is the app's. This platform then takes each track
14
+ * out of that stream before releasing it, so the app can release its stream after unpublish() or close() without
15
+ * react-native-webrtc 155 killing the app (Phase 0 finding 1). useLocalMedia().publish() is safe either way (its
16
+ * capture is made and released here).
17
+ */
18
+ export interface AppStreamHook {
19
+ adoptAppStream(stream: ClientStream): void;
20
+ }
21
+ /**
22
+ * The settings a track reports: react-native-webrtc's `MediaTrackSettings` (the web's has these fields too). A camera
23
+ * says its `width`, `height`, `frameRate`, `facingMode` (`'user'` or `'environment'`) and `deviceId`.
24
+ */
25
+ export interface MediaTrackSettingsLike {
26
+ width?: number;
27
+ height?: number;
28
+ frameRate?: number;
29
+ facingMode?: string;
30
+ deviceId?: string;
31
+ groupId?: string;
32
+ }
33
+ /**
34
+ * A media track by shape: react-native-webrtc's `MediaStreamTrack`, which every track this package hands out is
35
+ * (`useLocalMedia().stream?.getVideoTracks()[0]`), and the web's `MediaStreamTrack` as `@voltkit-rtc/client` types a
36
+ * remote track's `track`, which fits the same shape, so either goes into `VideoTrack` and `AudioTrack` as it is. Typed by
37
+ * shape so an app compiles without the DOM library (`@react-native/typescript-config` leaves it out, and the only
38
+ * `MediaStream` it then knows is an empty stub). `remote` and `release` are react-native-webrtc's: a received track, and
39
+ * freeing the native track, which the SDK does for its own tracks.
40
+ */
41
+ export interface MediaStreamTrackLike {
42
+ readonly id: string;
43
+ /** `'audio'` or `'video'`. */
44
+ readonly kind: string;
45
+ /** `'live'` or `'ended'`. */
46
+ readonly readyState: string;
47
+ enabled: boolean;
48
+ stop(): void;
49
+ getSettings(): MediaTrackSettingsLike;
50
+ getConstraints(): object;
51
+ applyConstraints(constraints?: object): Promise<void>;
52
+ readonly remote?: boolean;
53
+ release?(): void;
54
+ }
55
+ /**
56
+ * A media stream by shape: react-native-webrtc's `MediaStream`, which `useLocalMedia().stream` and `screenStream`
57
+ * are. Typed by shape for the same reason as `MediaStreamTrackLike`. `toURL()` is what an `RTCView` plays (`VideoTrack`
58
+ * does this), and `release()` frees the native stream: never call it on a stream the SDK made (see `VideoTrack`).
59
+ */
60
+ export interface MediaStreamLike {
61
+ readonly id: string;
62
+ readonly active: boolean;
63
+ getTracks(): MediaStreamTrackLike[];
64
+ getAudioTracks(): MediaStreamTrackLike[];
65
+ getVideoTracks(): MediaStreamTrackLike[];
66
+ addTrack(track: MediaStreamTrackLike): void;
67
+ removeTrack(track: MediaStreamTrackLike): void;
68
+ toURL(): string;
69
+ release(releaseTracks?: boolean): void;
70
+ }
71
+ /** The client's own stream (`client.local`), typed as react-native-webrtc's. */
72
+ export declare function localStream(client: {
73
+ readonly local: unknown;
74
+ }): MediaStreamLike | null;
75
+ /** getDiagnostics().userAgent: `ReactNative android 37; react-native-webrtc 155.0.1; @voltkit-rtc/react-native 0.1.1`. */
76
+ export declare function describePlatform(): string;
77
+ /**
78
+ * What the client reads to pick its defaults: a phone or tablet, so two simulcast layers and the H.264 decision
79
+ * (there is no user agent in React Native, which gave phones a computer's three layers).
80
+ */
81
+ export declare function deviceEnv(): DeviceEnv;
82
+ /**
83
+ * Whether H.264 is encoded in hardware, asked only for a phone whose WebRTC can send H.264 at all. On Android
84
+ * react-native-webrtc's libwebrtc has no software H.264 encoder (the emulator, without a hardware one, offers none), so
85
+ * a device that offers it encodes it in hardware: 'auto' then sends H.264, as the Android SDK does.
86
+ */
87
+ export declare const hardwareH264: EncodingInfoProbe;
88
+ /** The kinds a capture asks for, as permissions. */
89
+ export declare function kindsOf(constraints: {
90
+ audio?: unknown;
91
+ video?: unknown;
92
+ }): MediaPermissionKind[];
93
+ /**
94
+ * Capture a camera and/or microphone through react-native-webrtc (ClientPlatform.getUserMedia). The permissions are
95
+ * checked first, without asking (a reconnect in the background must not open a dialog): one not granted rejects with
96
+ * `media-unavailable` `{ permission, status }` and nothing opens. react-native-webrtc drops a kind whose permission was
97
+ * refused without an error, so a stream missing a kind asked for is released and refused the same way. The stream is
98
+ * kept in the book, so it is released once its tracks are stopped.
99
+ */
100
+ export declare function captureUserMedia(constraints: UserMediaConstraints): Promise<ClientStream>;
101
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/platform/common.ts"],"names":[],"mappings":"AAKA,OAAO,EAAY,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG5G,OAAO,EAAmD,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAItG;;;GAGG;A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