@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.
- package/CHANGELOG.md +121 -0
- package/LICENSE +21 -0
- package/README.md +1608 -2
- package/android/build.gradle +70 -0
- package/android/consumer-rules.pro +21 -0
- package/android/src/main/AndroidManifest.xml +25 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/AppVisibility.kt +67 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/AudioDevices.kt +67 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/AudioRouter.kt +487 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/CallServiceTypes.kt +120 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/NativeTimers.kt +106 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/NetworkWatch.kt +120 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/OutputChoice.kt +65 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/RtcConfig.kt +83 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/ScoLink.kt +61 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitCallService.kt +287 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitRtcInitProvider.kt +215 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitRtcModule.kt +313 -0
- package/android/src/main/java/com/voltkit/rtc/reactnative/VoltkitRtcPackage.kt +30 -0
- package/android/src/main/res/drawable/voltkit_rtc_default_call_icon.xml +15 -0
- package/android/src/main/res/raw/voltkit_rtc_keep.xml +7 -0
- package/app.plugin.js +17 -0
- package/lib/commonjs/audio.js +215 -0
- package/lib/commonjs/audio.js.map +1 -0
- package/lib/commonjs/components.js +207 -0
- package/lib/commonjs/components.js.map +1 -0
- package/lib/commonjs/create-client.js +47 -0
- package/lib/commonjs/create-client.js.map +1 -0
- package/lib/commonjs/errors.js +99 -0
- package/lib/commonjs/errors.js.map +1 -0
- package/lib/commonjs/globals.js +61 -0
- package/lib/commonjs/globals.js.map +1 -0
- package/lib/commonjs/index.js +234 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/local-media.js +392 -0
- package/lib/commonjs/local-media.js.map +1 -0
- package/lib/commonjs/native-session.js +365 -0
- package/lib/commonjs/native-session.js.map +1 -0
- package/lib/commonjs/native.js +99 -0
- package/lib/commonjs/native.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/permissions.js +166 -0
- package/lib/commonjs/permissions.js.map +1 -0
- package/lib/commonjs/platform/android.js +126 -0
- package/lib/commonjs/platform/android.js.map +1 -0
- package/lib/commonjs/platform/common.js +138 -0
- package/lib/commonjs/platform/common.js.map +1 -0
- package/lib/commonjs/platform/devices.js +151 -0
- package/lib/commonjs/platform/devices.js.map +1 -0
- package/lib/commonjs/platform/index.js +35 -0
- package/lib/commonjs/platform/index.js.map +1 -0
- package/lib/commonjs/platform/ios.js +54 -0
- package/lib/commonjs/platform/ios.js.map +1 -0
- package/lib/commonjs/platform/streams.js +273 -0
- package/lib/commonjs/platform/streams.js.map +1 -0
- package/lib/commonjs/platform/timers.js +71 -0
- package/lib/commonjs/platform/timers.js.map +1 -0
- package/lib/commonjs/platform/visibility.js +60 -0
- package/lib/commonjs/platform/visibility.js.map +1 -0
- package/lib/commonjs/preflight.js +77 -0
- package/lib/commonjs/preflight.js.map +1 -0
- package/lib/commonjs/provider.js +75 -0
- package/lib/commonjs/provider.js.map +1 -0
- package/lib/commonjs/specs/NativeVoltkitRtc.js +29 -0
- package/lib/commonjs/specs/NativeVoltkitRtc.js.map +1 -0
- package/lib/module/audio.js +207 -0
- package/lib/module/audio.js.map +1 -0
- package/lib/module/components.js +200 -0
- package/lib/module/components.js.map +1 -0
- package/lib/module/create-client.js +42 -0
- package/lib/module/create-client.js.map +1 -0
- package/lib/module/errors.js +87 -0
- package/lib/module/errors.js.map +1 -0
- package/lib/module/globals.js +53 -0
- package/lib/module/globals.js.map +1 -0
- package/lib/module/index.js +33 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/local-media.js +387 -0
- package/lib/module/local-media.js.map +1 -0
- package/lib/module/native-session.js +360 -0
- package/lib/module/native-session.js.map +1 -0
- package/lib/module/native.js +87 -0
- package/lib/module/native.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/permissions.js +160 -0
- package/lib/module/permissions.js.map +1 -0
- package/lib/module/platform/android.js +122 -0
- package/lib/module/platform/android.js.map +1 -0
- package/lib/module/platform/common.js +128 -0
- package/lib/module/platform/common.js.map +1 -0
- package/lib/module/platform/devices.js +142 -0
- package/lib/module/platform/devices.js.map +1 -0
- package/lib/module/platform/index.js +24 -0
- package/lib/module/platform/index.js.map +1 -0
- package/lib/module/platform/ios.js +49 -0
- package/lib/module/platform/ios.js.map +1 -0
- package/lib/module/platform/streams.js +268 -0
- package/lib/module/platform/streams.js.map +1 -0
- package/lib/module/platform/timers.js +67 -0
- package/lib/module/platform/timers.js.map +1 -0
- package/lib/module/platform/visibility.js +54 -0
- package/lib/module/platform/visibility.js.map +1 -0
- package/lib/module/preflight.js +72 -0
- package/lib/module/preflight.js.map +1 -0
- package/lib/module/provider.js +70 -0
- package/lib/module/provider.js.map +1 -0
- package/lib/module/specs/NativeVoltkitRtc.js +37 -0
- package/lib/module/specs/NativeVoltkitRtc.js.map +1 -0
- package/lib/typescript/commonjs/audio.d.ts +58 -0
- package/lib/typescript/commonjs/audio.d.ts.map +1 -0
- package/lib/typescript/commonjs/components.d.ts +58 -0
- package/lib/typescript/commonjs/components.d.ts.map +1 -0
- package/lib/typescript/commonjs/create-client.d.ts +35 -0
- package/lib/typescript/commonjs/create-client.d.ts.map +1 -0
- package/lib/typescript/commonjs/errors.d.ts +34 -0
- package/lib/typescript/commonjs/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/globals.d.ts +16 -0
- package/lib/typescript/commonjs/globals.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +24 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/local-media.d.ts +86 -0
- package/lib/typescript/commonjs/local-media.d.ts.map +1 -0
- package/lib/typescript/commonjs/native-session.d.ts +38 -0
- package/lib/typescript/commonjs/native-session.d.ts.map +1 -0
- package/lib/typescript/commonjs/native.d.ts +18 -0
- package/lib/typescript/commonjs/native.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/permissions.d.ts +30 -0
- package/lib/typescript/commonjs/permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/android.d.ts +4 -0
- package/lib/typescript/commonjs/platform/android.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/common.d.ts +101 -0
- package/lib/typescript/commonjs/platform/common.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/devices.d.ts +42 -0
- package/lib/typescript/commonjs/platform/devices.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/index.d.ts +6 -0
- package/lib/typescript/commonjs/platform/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/ios.d.ts +4 -0
- package/lib/typescript/commonjs/platform/ios.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/streams.d.ts +82 -0
- package/lib/typescript/commonjs/platform/streams.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/timers.d.ts +19 -0
- package/lib/typescript/commonjs/platform/timers.d.ts.map +1 -0
- package/lib/typescript/commonjs/platform/visibility.d.ts +11 -0
- package/lib/typescript/commonjs/platform/visibility.d.ts.map +1 -0
- package/lib/typescript/commonjs/preflight.d.ts +19 -0
- package/lib/typescript/commonjs/preflight.d.ts.map +1 -0
- package/lib/typescript/commonjs/provider.d.ts +35 -0
- package/lib/typescript/commonjs/provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/specs/NativeVoltkitRtc.d.ts +157 -0
- package/lib/typescript/commonjs/specs/NativeVoltkitRtc.d.ts.map +1 -0
- package/lib/typescript/module/audio.d.ts +58 -0
- package/lib/typescript/module/audio.d.ts.map +1 -0
- package/lib/typescript/module/components.d.ts +58 -0
- package/lib/typescript/module/components.d.ts.map +1 -0
- package/lib/typescript/module/create-client.d.ts +35 -0
- package/lib/typescript/module/create-client.d.ts.map +1 -0
- package/lib/typescript/module/errors.d.ts +34 -0
- package/lib/typescript/module/errors.d.ts.map +1 -0
- package/lib/typescript/module/globals.d.ts +16 -0
- package/lib/typescript/module/globals.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +24 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/local-media.d.ts +86 -0
- package/lib/typescript/module/local-media.d.ts.map +1 -0
- package/lib/typescript/module/native-session.d.ts +38 -0
- package/lib/typescript/module/native-session.d.ts.map +1 -0
- package/lib/typescript/module/native.d.ts +18 -0
- package/lib/typescript/module/native.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/permissions.d.ts +30 -0
- package/lib/typescript/module/permissions.d.ts.map +1 -0
- package/lib/typescript/module/platform/android.d.ts +4 -0
- package/lib/typescript/module/platform/android.d.ts.map +1 -0
- package/lib/typescript/module/platform/common.d.ts +101 -0
- package/lib/typescript/module/platform/common.d.ts.map +1 -0
- package/lib/typescript/module/platform/devices.d.ts +42 -0
- package/lib/typescript/module/platform/devices.d.ts.map +1 -0
- package/lib/typescript/module/platform/index.d.ts +6 -0
- package/lib/typescript/module/platform/index.d.ts.map +1 -0
- package/lib/typescript/module/platform/ios.d.ts +4 -0
- package/lib/typescript/module/platform/ios.d.ts.map +1 -0
- package/lib/typescript/module/platform/streams.d.ts +82 -0
- package/lib/typescript/module/platform/streams.d.ts.map +1 -0
- package/lib/typescript/module/platform/timers.d.ts +19 -0
- package/lib/typescript/module/platform/timers.d.ts.map +1 -0
- package/lib/typescript/module/platform/visibility.d.ts +11 -0
- package/lib/typescript/module/platform/visibility.d.ts.map +1 -0
- package/lib/typescript/module/preflight.d.ts +19 -0
- package/lib/typescript/module/preflight.d.ts.map +1 -0
- package/lib/typescript/module/provider.d.ts +35 -0
- package/lib/typescript/module/provider.d.ts.map +1 -0
- package/lib/typescript/module/specs/NativeVoltkitRtc.d.ts +157 -0
- package/lib/typescript/module/specs/NativeVoltkitRtc.d.ts.map +1 -0
- package/package.json +140 -4
- package/plugin/build/android.d.ts +36 -0
- package/plugin/build/android.js +265 -0
- package/plugin/build/index.d.ts +9 -0
- package/plugin/build/index.js +54 -0
- package/plugin/build/ios.d.ts +4 -0
- package/plugin/build/ios.js +43 -0
- package/plugin/build/options.d.ts +93 -0
- package/plugin/build/options.js +140 -0
- package/react-native.config.js +11 -0
- package/src/audio.ts +221 -0
- package/src/components.tsx +233 -0
- package/src/create-client.ts +53 -0
- package/src/errors.ts +81 -0
- package/src/globals.ts +54 -0
- package/src/index.ts +95 -0
- package/src/local-media.ts +420 -0
- package/src/native-session.tsx +384 -0
- package/src/native.ts +84 -0
- package/src/permissions.ts +173 -0
- package/src/platform/android.ts +128 -0
- package/src/platform/common.ts +157 -0
- package/src/platform/devices.ts +148 -0
- package/src/platform/index.ts +22 -0
- package/src/platform/ios.ts +48 -0
- package/src/platform/streams.ts +285 -0
- package/src/platform/timers.ts +72 -0
- package/src/platform/visibility.ts +59 -0
- package/src/preflight.ts +60 -0
- package/src/provider.tsx +88 -0
- package/src/specs/NativeVoltkitRtc.ts +180 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pre-call check on React Native: @voltkit-rtc/client's preflight with this package's platform. It joins the room
|
|
3
|
+
* the token names, publishes for a few seconds, measures and leaves, and never rejects: offline, a refused permission,
|
|
4
|
+
* a bad token or a missing native module all give a report whose steps say what failed.
|
|
5
|
+
*
|
|
6
|
+
* React Native cannot make a test tone or picture. Without `options.media` the check publishes the microphone, which
|
|
7
|
+
* it captures itself once joined (so nothing opens the microphone for a join that fails) and releases at the end. It
|
|
8
|
+
* never asks for the permission: where it is not granted, the join is still tested and the media step says why.
|
|
9
|
+
* Android shows its microphone indicator for those seconds.
|
|
10
|
+
*/
|
|
11
|
+
import { type PreflightOptions, type PreflightReport } from '@voltkit-rtc/client';
|
|
12
|
+
import { type BackgroundOptions } from './create-client.js';
|
|
13
|
+
export interface ReactNativePreflightOptions extends PreflightOptions {
|
|
14
|
+
/** The test client's background pause (as createClient's). */
|
|
15
|
+
background?: BackgroundOptions;
|
|
16
|
+
}
|
|
17
|
+
/** Test the connection and the media path before a call. Never rejects. */
|
|
18
|
+
export declare function preflight(wsUrl: string, token: string, options?: ReactNativePreflightOptions): Promise<PreflightReport>;
|
|
19
|
+
//# sourceMappingURL=preflight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../src/preflight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAgB,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGhG,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,oBAAiB,CAAC;AAEnF,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,8DAA8D;IAC9D,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AA4BD,2EAA2E;AAC3E,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,2BAAgC,GAAG,OAAO,CAAC,eAAe,CAAC,CAYjI"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VoltkitProvider for React Native: @voltkit-rtc/react's provider (the same props, token hand-over and StrictMode
|
|
3
|
+
* behaviour, so every re-exported hook works below it) making its client with this package's platform, plus what a call
|
|
4
|
+
* needs from the device: the call audio, the call service and the background pause.
|
|
5
|
+
*
|
|
6
|
+
* In Expo Go, or an app not rebuilt after installing react-native-webrtc, no client is made: onError gets
|
|
7
|
+
* `media-unavailable` with `{ reason: 'webrtc-missing' }` (it needs a development build) and the hooks keep their
|
|
8
|
+
* defaults. Nothing throws.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactElement } from 'react';
|
|
11
|
+
import { type VoltkitProviderProps as ReactVoltkitProviderProps } from '@voltkit-rtc/react';
|
|
12
|
+
import { type BackgroundOptions } from './create-client.js';
|
|
13
|
+
import { type AudioSessionOptions, type CallServiceText } from './native-session.js';
|
|
14
|
+
export interface VoltkitProviderProps extends ReactVoltkitProviderProps {
|
|
15
|
+
/**
|
|
16
|
+
* The call audio (Android): held from the join to the close -- the audio mode, focus and routing -- with the
|
|
17
|
+
* loudspeaker unless `speakerphone: false` (the earpiece) or setSpeakerphoneOn chose. `false`, or `manage: false`,
|
|
18
|
+
* leaves the device's audio to the app. Default `{ speakerphone: true, manage: true }`.
|
|
19
|
+
*/
|
|
20
|
+
audio?: AudioSessionOptions | false;
|
|
21
|
+
/**
|
|
22
|
+
* The background pause, read when the client is made: the camera goes off in the background and comes back with the
|
|
23
|
+
* app (default `pauseCamera: true`); the microphone keeps going (`pauseMic: false`). Your `clientOptions` win.
|
|
24
|
+
*/
|
|
25
|
+
background?: BackgroundOptions;
|
|
26
|
+
/**
|
|
27
|
+
* The call service (Android): a foreground service that keeps the call's network and microphone alive in the
|
|
28
|
+
* background and with the screen off. Started on the join when the app's manifest declares it (the Expo plugin's
|
|
29
|
+
* callService, default on), with this notification; `false` never starts it. Default true.
|
|
30
|
+
*/
|
|
31
|
+
callService?: boolean | CallServiceText;
|
|
32
|
+
}
|
|
33
|
+
/** One StreamClient for the components below, with the device's audio, the call service and the background pause. */
|
|
34
|
+
export declare function VoltkitProvider({ audio, background, callService, clientOptions, client, wsUrl, token, onError, children, ...rest }: VoltkitProviderProps): ReactElement;
|
|
35
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/provider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAA2C,KAAK,oBAAoB,IAAI,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAIrI,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,oBAAiB,CAAC;AACnF,OAAO,EAAiB,KAAK,mBAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAkB,CAAC;AAEjG,MAAM,WAAW,oBAAqB,SAAQ,yBAAyB;IACrE;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC;CACzC;AAED,qHAAqH;AACrH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,MAAM,EACN,KAAK,EACL,KAAK,EACL,OAAO,EACP,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,oBAAoB,GAAG,YAAY,CAqCrC"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The native side of @voltkit-rtc/react-native on Android, as one codegen TurboModule (plan §5.1): audio routing
|
|
3
|
+
* (ported from the Android SDK's AudioRouter), the call service, native timers, app visibility from the process
|
|
4
|
+
* lifecycle, the network, and stopping react-native-webrtc's screen-share service. iOS has no native module in 0.1.0.
|
|
5
|
+
*
|
|
6
|
+
* Read it through src/native.ts, never directly: this module is null in Expo Go, on iOS and wherever the app was not
|
|
7
|
+
* rebuilt after installing the package, and native.ts turns that into a typed error.
|
|
8
|
+
*
|
|
9
|
+
* Strings that hold one of a few values are typed `string` here, as codegen needs; the values are listed beside each.
|
|
10
|
+
*/
|
|
11
|
+
import type { CodegenTypes, TurboModule } from 'react-native';
|
|
12
|
+
/** An audio input or output, as the Android SDK lists it (`MediaDevice`). */
|
|
13
|
+
export type AudioDevice = {
|
|
14
|
+
/** Stable while connected: `speaker`, `earpiece`, `wired`, `bluetooth:12`, `usb:7`, `mic`, `wired-mic`, ... */
|
|
15
|
+
deviceId: string;
|
|
16
|
+
/** `audioinput` | `audiooutput`. */
|
|
17
|
+
kind: string;
|
|
18
|
+
/** A name to show: "Speaker", "Phone", "Pixel Buds". */
|
|
19
|
+
label: string;
|
|
20
|
+
/** `speaker` | `earpiece` | `wiredHeadset` | `bluetooth` | `usb` | `builtinMic` | `other`. */
|
|
21
|
+
type: string;
|
|
22
|
+
/** A headset's microphone and earphones share one. */
|
|
23
|
+
groupId: string;
|
|
24
|
+
};
|
|
25
|
+
/** Devices came or went while a client held the audio (a headset plugged in, Bluetooth connected). */
|
|
26
|
+
export type AudioDevicesChangedEvent = {
|
|
27
|
+
devices: AudioDevice[];
|
|
28
|
+
added: AudioDevice[];
|
|
29
|
+
removed: AudioDevice[];
|
|
30
|
+
};
|
|
31
|
+
/** Where call audio plays now; null once the last client let the audio go. */
|
|
32
|
+
export type AudioOutputChangedEvent = {
|
|
33
|
+
device: AudioDevice | null;
|
|
34
|
+
};
|
|
35
|
+
/** Audio focus, while a client holds the audio: `gain` | `loss` | `lossTransient` | `lossTransientCanDuck`. */
|
|
36
|
+
export type AudioFocusChangedEvent = {
|
|
37
|
+
focus: string;
|
|
38
|
+
};
|
|
39
|
+
/** The audio device module could not open or keep the microphone. */
|
|
40
|
+
export type MicrophoneErrorEvent = {
|
|
41
|
+
message: string;
|
|
42
|
+
};
|
|
43
|
+
/** The app went to the foreground (any activity started) or the background, from ProcessLifecycleOwner. */
|
|
44
|
+
export type AppVisibilityChangedEvent = {
|
|
45
|
+
visible: boolean;
|
|
46
|
+
};
|
|
47
|
+
/** The network came back (`handover` false) or the default network changed, say Wi-Fi to mobile data (true). */
|
|
48
|
+
export type NetworkAvailableEvent = {
|
|
49
|
+
handover: boolean;
|
|
50
|
+
};
|
|
51
|
+
/** What the call service shows and the call it runs for: its foreground service types are worked out from these. */
|
|
52
|
+
export type CallServiceOptions = {
|
|
53
|
+
/** The notification's title and text, and the label of its Leave action. */
|
|
54
|
+
title: string;
|
|
55
|
+
text: string;
|
|
56
|
+
leaveLabel: string;
|
|
57
|
+
/** The provider's `background.pauseCamera`: true never asks for the camera type. */
|
|
58
|
+
pauseCamera: boolean;
|
|
59
|
+
/** What the call publishes now. */
|
|
60
|
+
micPublished: boolean;
|
|
61
|
+
cameraPublished: boolean;
|
|
62
|
+
/** A screen share is live: on Android 14 and later the `mediaProjection` type is asked for only while it is. */
|
|
63
|
+
sharing: boolean;
|
|
64
|
+
};
|
|
65
|
+
/** The call service: whether the app declares it, and whether it runs, with which foreground service types. */
|
|
66
|
+
export type CallServiceStatus = {
|
|
67
|
+
declared: boolean;
|
|
68
|
+
running: boolean;
|
|
69
|
+
/** `microphone`, `mediaPlayback`, `camera`, `mediaProjection`: what it runs with now (empty when stopped). */
|
|
70
|
+
types: string[];
|
|
71
|
+
};
|
|
72
|
+
/** `started` | `updated` | `stopped` | `leave` (the notification's action) | `taskRemoved` | `failed`. */
|
|
73
|
+
export type CallServiceEvent = {
|
|
74
|
+
type: string;
|
|
75
|
+
/** The types it runs with after this event. */
|
|
76
|
+
types: string[];
|
|
77
|
+
/** Why it failed; empty otherwise. */
|
|
78
|
+
message: string;
|
|
79
|
+
};
|
|
80
|
+
export type Constants = {
|
|
81
|
+
/** `communication` | `media`, from the meta-data in.voltkit.rtc.AUDIO_MODE: fixed for the life of the process. */
|
|
82
|
+
audioMode: string;
|
|
83
|
+
/** in.voltkit.rtc.HW_AEC: the handset's own echo canceller and noise suppressor, where it has them. */
|
|
84
|
+
hardwareEchoCancellation: boolean;
|
|
85
|
+
/** in.voltkit.rtc.SCREEN_SHARE: react-native-webrtc's screen-share service is enabled. */
|
|
86
|
+
screenShareEnabled: boolean;
|
|
87
|
+
/** Whether the app's manifest declares the call service (VoltkitCallService), and its declared types. */
|
|
88
|
+
callServiceDeclared: boolean;
|
|
89
|
+
callServiceTypes: string[];
|
|
90
|
+
/** android.os.Build.VERSION.SDK_INT. */
|
|
91
|
+
sdkInt: number;
|
|
92
|
+
/** The version of this package the native code was built from: a mismatch with the JavaScript means a stale build. */
|
|
93
|
+
nativeVersion: string;
|
|
94
|
+
/**
|
|
95
|
+
* Whether react-native-webrtc uses the audio device module the init provider made, so audioMode and
|
|
96
|
+
* hardwareEchoCancellation apply. False when the app set its own in MainApplication (selectAudioInput still works
|
|
97
|
+
* when that one is a JavaAudioDeviceModule) or the provider did not run.
|
|
98
|
+
*/
|
|
99
|
+
audioDeviceModule: boolean;
|
|
100
|
+
};
|
|
101
|
+
export interface Spec extends TurboModule {
|
|
102
|
+
getConstants(): Constants;
|
|
103
|
+
/**
|
|
104
|
+
* A client connected and manages audio: set up the call audio (mode, focus, routing) while any client holds it.
|
|
105
|
+
* Resolves with the holder to release. `speakerphone` sets the speaker-or-earpiece preference; null keeps the
|
|
106
|
+
* one setSpeakerphoneOn set.
|
|
107
|
+
*/
|
|
108
|
+
audioAcquire(speakerphone: boolean | null): Promise<number>;
|
|
109
|
+
/** That client left; the last holder out puts the device's audio back as it found it. Unknown holders are ignored. */
|
|
110
|
+
audioRelease(holder: number): void;
|
|
111
|
+
/** The loudspeaker (true) or the earpiece (false) when no headset is connected; a headset still wins. Kept until changed. */
|
|
112
|
+
setSpeakerphoneOn(on: boolean): void;
|
|
113
|
+
/** The audio inputs and outputs now. */
|
|
114
|
+
listAudioDevices(): Promise<AudioDevice[]>;
|
|
115
|
+
/** Play call audio on this output while it stays connected. False when there is no such output, or in media mode. */
|
|
116
|
+
selectAudioOutput(deviceId: string): Promise<boolean>;
|
|
117
|
+
/**
|
|
118
|
+
* Record from this microphone (null: the default). False when there is no such input, or react-native-webrtc's audio
|
|
119
|
+
* device module is not a JavaAudioDeviceModule.
|
|
120
|
+
*/
|
|
121
|
+
selectAudioInput(deviceId: string | null): Promise<boolean>;
|
|
122
|
+
/** Where call audio plays now, while a client holds the audio. */
|
|
123
|
+
currentAudioOutput(): Promise<AudioDevice | null>;
|
|
124
|
+
/** Whether an activity of the app is started now (ProcessLifecycleOwner; AppState says background under dialogs). */
|
|
125
|
+
isAppVisible(): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Start the call service: a foreground service that keeps the call's network, microphone and timers alive in the
|
|
128
|
+
* background. Start it while the app is visible (Android's while-in-use rules). Rejects when the app does not
|
|
129
|
+
* declare it, a permission it needs is missing, or Android refuses it.
|
|
130
|
+
*/
|
|
131
|
+
startCallService(options: CallServiceOptions): Promise<CallServiceStatus>;
|
|
132
|
+
/** New text, or new types (a camera published, a share started or ended). Widen the types only while visible. */
|
|
133
|
+
updateCallService(options: CallServiceOptions): Promise<CallServiceStatus>;
|
|
134
|
+
/** Stop it (the call ended). Resolves when stopped; stopping one that is not running does nothing. */
|
|
135
|
+
stopCallService(): Promise<CallServiceStatus>;
|
|
136
|
+
getCallServiceStatus(): CallServiceStatus;
|
|
137
|
+
/** Stop react-native-webrtc's MediaProjectionService once a share ended. True when one was running. */
|
|
138
|
+
stopScreenShareService(): Promise<boolean>;
|
|
139
|
+
/**
|
|
140
|
+
* Fire onTimer(id) after `ms`, and every `ms` after that when `repeat`. A new start with a live id replaces it. Ids
|
|
141
|
+
* come from the caller and are never reused: a fire may already be on its way when the timer is stopped, so a fire
|
|
142
|
+
* for an id the caller no longer has is to be ignored.
|
|
143
|
+
*/
|
|
144
|
+
timerStart(id: number, ms: number, repeat: boolean): void;
|
|
145
|
+
timerStop(id: number): void;
|
|
146
|
+
readonly onAudioDevicesChanged: CodegenTypes.EventEmitter<AudioDevicesChangedEvent>;
|
|
147
|
+
readonly onAudioOutputChanged: CodegenTypes.EventEmitter<AudioOutputChangedEvent>;
|
|
148
|
+
readonly onAudioFocusChanged: CodegenTypes.EventEmitter<AudioFocusChangedEvent>;
|
|
149
|
+
readonly onMicrophoneError: CodegenTypes.EventEmitter<MicrophoneErrorEvent>;
|
|
150
|
+
readonly onAppVisibilityChanged: CodegenTypes.EventEmitter<AppVisibilityChangedEvent>;
|
|
151
|
+
readonly onNetworkAvailable: CodegenTypes.EventEmitter<NetworkAvailableEvent>;
|
|
152
|
+
readonly onCallServiceEvent: CodegenTypes.EventEmitter<CallServiceEvent>;
|
|
153
|
+
readonly onTimer: CodegenTypes.EventEmitter<number>;
|
|
154
|
+
}
|
|
155
|
+
declare const _default: Spec | null | undefined;
|
|
156
|
+
export default _default;
|
|
157
|
+
//# sourceMappingURL=NativeVoltkitRtc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeVoltkitRtc.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeVoltkitRtc.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,142 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voltkit-rtc/react-native",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "React Native SDK for VoltKit RTC: calls, audio rooms and live video on Android (iOS in preview), with the hooks of @voltkit-rtc/react, background calls, audio routing and an Expo config plugin.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"voltkit",
|
|
7
|
+
"webrtc",
|
|
8
|
+
"rtc",
|
|
9
|
+
"react-native",
|
|
10
|
+
"expo",
|
|
11
|
+
"android",
|
|
12
|
+
"video-call",
|
|
13
|
+
"voice-call",
|
|
14
|
+
"audio-room",
|
|
15
|
+
"live-streaming"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://voltkit.in/docs/react-native-sdk",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"email": "contact@voltkit.in"
|
|
20
|
+
},
|
|
21
|
+
"author": "VoltKit <contact@voltkit.in>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"main": "./lib/commonjs/index.js",
|
|
24
|
+
"module": "./lib/module/index.js",
|
|
25
|
+
"types": "./lib/typescript/commonjs/index.d.ts",
|
|
26
|
+
"source": "./src/index.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"source": "./src/index.ts",
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./lib/typescript/module/index.d.ts",
|
|
32
|
+
"default": "./lib/module/index.js"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./lib/typescript/commonjs/index.d.ts",
|
|
36
|
+
"default": "./lib/commonjs/index.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"./app.plugin.js": "./app.plugin.js",
|
|
40
|
+
"./package.json": "./package.json"
|
|
41
|
+
},
|
|
42
|
+
"sideEffects": [
|
|
43
|
+
"./src/index.ts",
|
|
44
|
+
"./lib/commonjs/index.js",
|
|
45
|
+
"./lib/module/index.js"
|
|
46
|
+
],
|
|
47
|
+
"files": [
|
|
48
|
+
"src",
|
|
49
|
+
"lib",
|
|
50
|
+
"android",
|
|
51
|
+
"plugin/build",
|
|
52
|
+
"app.plugin.js",
|
|
53
|
+
"react-native.config.js",
|
|
54
|
+
"README.md",
|
|
55
|
+
"CHANGELOG.md",
|
|
56
|
+
"LICENSE",
|
|
57
|
+
"!android/build",
|
|
58
|
+
"!android/.gradle",
|
|
59
|
+
"!android/.cxx",
|
|
60
|
+
"!android/.kotlin",
|
|
61
|
+
"!android/src/test",
|
|
62
|
+
"!android/local.properties",
|
|
63
|
+
"!**/__tests__",
|
|
64
|
+
"!**/__fixtures__",
|
|
65
|
+
"!**/__mocks__",
|
|
66
|
+
"!**/*.test.*",
|
|
67
|
+
"!**/.*"
|
|
68
|
+
],
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public"
|
|
71
|
+
},
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "bob build && npm run build:plugin",
|
|
74
|
+
"build:plugin": "tsc -p plugin/tsconfig.json",
|
|
75
|
+
"prepack": "npm run build:plugin",
|
|
76
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
77
|
+
"test": "jest",
|
|
78
|
+
"test:plugin": "jest -c plugin/jest.config.js",
|
|
79
|
+
"prepublishOnly": "npm run build && npm test"
|
|
80
|
+
},
|
|
81
|
+
"codegenConfig": {
|
|
82
|
+
"name": "VoltkitRtcSpec",
|
|
83
|
+
"type": "modules",
|
|
84
|
+
"jsSrcsDir": "src/specs",
|
|
85
|
+
"android": {
|
|
86
|
+
"javaPackageName": "com.voltkit.rtc.reactnative"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"react-native-builder-bob": {
|
|
90
|
+
"source": "src",
|
|
91
|
+
"output": "lib",
|
|
92
|
+
"targets": [
|
|
93
|
+
[
|
|
94
|
+
"commonjs",
|
|
95
|
+
{
|
|
96
|
+
"esm": true
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
"module",
|
|
101
|
+
{
|
|
102
|
+
"esm": true
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
"typescript",
|
|
107
|
+
{
|
|
108
|
+
"project": "tsconfig.build.json"
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
"peerDependencies": {
|
|
114
|
+
"@voltkit-rtc/client": ">=0.9.13 <0.10.0",
|
|
115
|
+
"@voltkit-rtc/react": "^0.1.1",
|
|
116
|
+
"expo": ">=58",
|
|
117
|
+
"react": ">=19.1.0",
|
|
118
|
+
"react-native": ">=0.82.0",
|
|
119
|
+
"react-native-webrtc": "^155.0.1"
|
|
120
|
+
},
|
|
121
|
+
"peerDependenciesMeta": {
|
|
122
|
+
"expo": {
|
|
123
|
+
"optional": true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"devDependencies": {
|
|
127
|
+
"@expo/config-plugins": "58.0.10",
|
|
128
|
+
"@react-native/babel-preset": "0.88.0",
|
|
129
|
+
"@react-native/jest-preset": "0.88.0",
|
|
130
|
+
"@testing-library/react-native": "14.1.0",
|
|
131
|
+
"@types/react": "19.3.0",
|
|
132
|
+
"@voltkit-rtc/client": "file:../sdk",
|
|
133
|
+
"@voltkit-rtc/react": "file:../react-sdk",
|
|
134
|
+
"jest": "30.5.2",
|
|
135
|
+
"react": "19.3.0",
|
|
136
|
+
"react-native": "0.88.0",
|
|
137
|
+
"react-native-builder-bob": "0.44.1",
|
|
138
|
+
"react-native-webrtc": "155.0.1",
|
|
139
|
+
"test-renderer": "1.3.1",
|
|
140
|
+
"typescript": "5.9.3"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { AndroidManifest, ConfigPlugin } from 'expo/config-plugins';
|
|
2
|
+
import type { AndroidOptions } from './options';
|
|
3
|
+
/** The SDK's call service (VoltkitCallService.kt); not exported: only the app itself starts it. */
|
|
4
|
+
export declare const CALL_SERVICE_CLASS = "com.voltkit.rtc.reactnative.VoltkitCallService";
|
|
5
|
+
/** The meta-data the SDK's init provider reads once when the app starts (RtcConfig.kt). */
|
|
6
|
+
export declare const META_AUDIO_MODE = "in.voltkit.rtc.AUDIO_MODE";
|
|
7
|
+
export declare const META_HW_AEC = "in.voltkit.rtc.HW_AEC";
|
|
8
|
+
export declare const META_SCREEN_SHARE = "in.voltkit.rtc.SCREEN_SHARE";
|
|
9
|
+
/** A service type by its manifest name (CallServiceTypes.kt), with what it needs on Android 14 and later. */
|
|
10
|
+
type ServiceType = 'microphone' | 'mediaPlayback' | 'camera' | 'mediaProjection';
|
|
11
|
+
/** What the plugin writes for these options, given the permissions the app blocks. */
|
|
12
|
+
export interface AndroidPlan {
|
|
13
|
+
/** The permissions to ask for, in this order. */
|
|
14
|
+
permissions: string[];
|
|
15
|
+
/** The device features to mark as not required (android:required="false"), for the permissions above. */
|
|
16
|
+
features: string[];
|
|
17
|
+
/** The call service's types; empty means no call service. */
|
|
18
|
+
serviceTypes: ServiceType[];
|
|
19
|
+
/** Why the call service is not declared although android.callService is on; null when it is (or is off). */
|
|
20
|
+
serviceDropped: string | null;
|
|
21
|
+
/** What in.voltkit.rtc.SCREEN_SHARE gets: android.screenShare, unless a block leaves its service unable to run. */
|
|
22
|
+
screenShare: boolean;
|
|
23
|
+
/** Why screen sharing is off although android.screenShare is on; null when it is on (or off by option). */
|
|
24
|
+
screenShareDropped: string | null;
|
|
25
|
+
}
|
|
26
|
+
/** The permissions the app blocks: android.blockedPermissions, and entries with tools:node="remove" already there. */
|
|
27
|
+
export declare function blockedPermissions(manifest: AndroidManifest, configBlocked?: readonly string[]): Set<string>;
|
|
28
|
+
export declare function planAndroid(options: AndroidOptions, blocked: ReadonlySet<string>): AndroidPlan;
|
|
29
|
+
/**
|
|
30
|
+
* Writes the permissions, the device features, the meta-data and the call service for these options into the manifest.
|
|
31
|
+
* Running it again on its own output changes nothing; after an option changes, the meta-data and the service are
|
|
32
|
+
* updated in place.
|
|
33
|
+
*/
|
|
34
|
+
export declare function setVoltkitManifest(manifest: AndroidManifest, options: AndroidOptions, configBlocked?: readonly string[]): AndroidManifest;
|
|
35
|
+
export declare const withVoltkitAndroid: ConfigPlugin<AndroidOptions>;
|
|
36
|
+
export {};
|