@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,180 @@
|
|
|
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
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
13
|
+
|
|
14
|
+
/** An audio input or output, as the Android SDK lists it (`MediaDevice`). */
|
|
15
|
+
export type AudioDevice = {
|
|
16
|
+
/** Stable while connected: `speaker`, `earpiece`, `wired`, `bluetooth:12`, `usb:7`, `mic`, `wired-mic`, ... */
|
|
17
|
+
deviceId: string;
|
|
18
|
+
/** `audioinput` | `audiooutput`. */
|
|
19
|
+
kind: string;
|
|
20
|
+
/** A name to show: "Speaker", "Phone", "Pixel Buds". */
|
|
21
|
+
label: string;
|
|
22
|
+
/** `speaker` | `earpiece` | `wiredHeadset` | `bluetooth` | `usb` | `builtinMic` | `other`. */
|
|
23
|
+
type: string;
|
|
24
|
+
/** A headset's microphone and earphones share one. */
|
|
25
|
+
groupId: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** Devices came or went while a client held the audio (a headset plugged in, Bluetooth connected). */
|
|
29
|
+
export type AudioDevicesChangedEvent = {
|
|
30
|
+
devices: AudioDevice[];
|
|
31
|
+
added: AudioDevice[];
|
|
32
|
+
removed: AudioDevice[];
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Where call audio plays now; null once the last client let the audio go. */
|
|
36
|
+
export type AudioOutputChangedEvent = {
|
|
37
|
+
device: AudioDevice | null;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** Audio focus, while a client holds the audio: `gain` | `loss` | `lossTransient` | `lossTransientCanDuck`. */
|
|
41
|
+
export type AudioFocusChangedEvent = {
|
|
42
|
+
focus: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** The audio device module could not open or keep the microphone. */
|
|
46
|
+
export type MicrophoneErrorEvent = {
|
|
47
|
+
message: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** The app went to the foreground (any activity started) or the background, from ProcessLifecycleOwner. */
|
|
51
|
+
export type AppVisibilityChangedEvent = {
|
|
52
|
+
visible: boolean;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** The network came back (`handover` false) or the default network changed, say Wi-Fi to mobile data (true). */
|
|
56
|
+
export type NetworkAvailableEvent = {
|
|
57
|
+
handover: boolean;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** What the call service shows and the call it runs for: its foreground service types are worked out from these. */
|
|
61
|
+
export type CallServiceOptions = {
|
|
62
|
+
/** The notification's title and text, and the label of its Leave action. */
|
|
63
|
+
title: string;
|
|
64
|
+
text: string;
|
|
65
|
+
leaveLabel: string;
|
|
66
|
+
/** The provider's `background.pauseCamera`: true never asks for the camera type. */
|
|
67
|
+
pauseCamera: boolean;
|
|
68
|
+
/** What the call publishes now. */
|
|
69
|
+
micPublished: boolean;
|
|
70
|
+
cameraPublished: boolean;
|
|
71
|
+
/** A screen share is live: on Android 14 and later the `mediaProjection` type is asked for only while it is. */
|
|
72
|
+
sharing: boolean;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** The call service: whether the app declares it, and whether it runs, with which foreground service types. */
|
|
76
|
+
export type CallServiceStatus = {
|
|
77
|
+
declared: boolean;
|
|
78
|
+
running: boolean;
|
|
79
|
+
/** `microphone`, `mediaPlayback`, `camera`, `mediaProjection`: what it runs with now (empty when stopped). */
|
|
80
|
+
types: string[];
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** `started` | `updated` | `stopped` | `leave` (the notification's action) | `taskRemoved` | `failed`. */
|
|
84
|
+
export type CallServiceEvent = {
|
|
85
|
+
type: string;
|
|
86
|
+
/** The types it runs with after this event. */
|
|
87
|
+
types: string[];
|
|
88
|
+
/** Why it failed; empty otherwise. */
|
|
89
|
+
message: string;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export type Constants = {
|
|
93
|
+
/** `communication` | `media`, from the meta-data in.voltkit.rtc.AUDIO_MODE: fixed for the life of the process. */
|
|
94
|
+
audioMode: string;
|
|
95
|
+
/** in.voltkit.rtc.HW_AEC: the handset's own echo canceller and noise suppressor, where it has them. */
|
|
96
|
+
hardwareEchoCancellation: boolean;
|
|
97
|
+
/** in.voltkit.rtc.SCREEN_SHARE: react-native-webrtc's screen-share service is enabled. */
|
|
98
|
+
screenShareEnabled: boolean;
|
|
99
|
+
/** Whether the app's manifest declares the call service (VoltkitCallService), and its declared types. */
|
|
100
|
+
callServiceDeclared: boolean;
|
|
101
|
+
callServiceTypes: string[];
|
|
102
|
+
/** android.os.Build.VERSION.SDK_INT. */
|
|
103
|
+
sdkInt: number;
|
|
104
|
+
/** The version of this package the native code was built from: a mismatch with the JavaScript means a stale build. */
|
|
105
|
+
nativeVersion: string;
|
|
106
|
+
/**
|
|
107
|
+
* Whether react-native-webrtc uses the audio device module the init provider made, so audioMode and
|
|
108
|
+
* hardwareEchoCancellation apply. False when the app set its own in MainApplication (selectAudioInput still works
|
|
109
|
+
* when that one is a JavaAudioDeviceModule) or the provider did not run.
|
|
110
|
+
*/
|
|
111
|
+
audioDeviceModule: boolean;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export interface Spec extends TurboModule {
|
|
115
|
+
getConstants(): Constants;
|
|
116
|
+
|
|
117
|
+
// ---- audio: mode, focus and routing, process-wide; held by each connected client --------------------------------
|
|
118
|
+
/**
|
|
119
|
+
* A client connected and manages audio: set up the call audio (mode, focus, routing) while any client holds it.
|
|
120
|
+
* Resolves with the holder to release. `speakerphone` sets the speaker-or-earpiece preference; null keeps the
|
|
121
|
+
* one setSpeakerphoneOn set.
|
|
122
|
+
*/
|
|
123
|
+
audioAcquire(speakerphone: boolean | null): Promise<number>;
|
|
124
|
+
/** That client left; the last holder out puts the device's audio back as it found it. Unknown holders are ignored. */
|
|
125
|
+
audioRelease(holder: number): void;
|
|
126
|
+
/** The loudspeaker (true) or the earpiece (false) when no headset is connected; a headset still wins. Kept until changed. */
|
|
127
|
+
setSpeakerphoneOn(on: boolean): void;
|
|
128
|
+
/** The audio inputs and outputs now. */
|
|
129
|
+
listAudioDevices(): Promise<AudioDevice[]>;
|
|
130
|
+
/** Play call audio on this output while it stays connected. False when there is no such output, or in media mode. */
|
|
131
|
+
selectAudioOutput(deviceId: string): Promise<boolean>;
|
|
132
|
+
/**
|
|
133
|
+
* Record from this microphone (null: the default). False when there is no such input, or react-native-webrtc's audio
|
|
134
|
+
* device module is not a JavaAudioDeviceModule.
|
|
135
|
+
*/
|
|
136
|
+
selectAudioInput(deviceId: string | null): Promise<boolean>;
|
|
137
|
+
/** Where call audio plays now, while a client holds the audio. */
|
|
138
|
+
currentAudioOutput(): Promise<AudioDevice | null>;
|
|
139
|
+
|
|
140
|
+
// ---- visibility ------------------------------------------------------------------------------------------------
|
|
141
|
+
/** Whether an activity of the app is started now (ProcessLifecycleOwner; AppState says background under dialogs). */
|
|
142
|
+
isAppVisible(): boolean;
|
|
143
|
+
|
|
144
|
+
// ---- the call service --------------------------------------------------------------------------------------------
|
|
145
|
+
/**
|
|
146
|
+
* Start the call service: a foreground service that keeps the call's network, microphone and timers alive in the
|
|
147
|
+
* background. Start it while the app is visible (Android's while-in-use rules). Rejects when the app does not
|
|
148
|
+
* declare it, a permission it needs is missing, or Android refuses it.
|
|
149
|
+
*/
|
|
150
|
+
startCallService(options: CallServiceOptions): Promise<CallServiceStatus>;
|
|
151
|
+
/** New text, or new types (a camera published, a share started or ended). Widen the types only while visible. */
|
|
152
|
+
updateCallService(options: CallServiceOptions): Promise<CallServiceStatus>;
|
|
153
|
+
/** Stop it (the call ended). Resolves when stopped; stopping one that is not running does nothing. */
|
|
154
|
+
stopCallService(): Promise<CallServiceStatus>;
|
|
155
|
+
getCallServiceStatus(): CallServiceStatus;
|
|
156
|
+
|
|
157
|
+
// ---- screen share ------------------------------------------------------------------------------------------------
|
|
158
|
+
/** Stop react-native-webrtc's MediaProjectionService once a share ended. True when one was running. */
|
|
159
|
+
stopScreenShareService(): Promise<boolean>;
|
|
160
|
+
|
|
161
|
+
// ---- native timers -----------------------------------------------------------------------------------------------
|
|
162
|
+
/**
|
|
163
|
+
* Fire onTimer(id) after `ms`, and every `ms` after that when `repeat`. A new start with a live id replaces it. Ids
|
|
164
|
+
* come from the caller and are never reused: a fire may already be on its way when the timer is stopped, so a fire
|
|
165
|
+
* for an id the caller no longer has is to be ignored.
|
|
166
|
+
*/
|
|
167
|
+
timerStart(id: number, ms: number, repeat: boolean): void;
|
|
168
|
+
timerStop(id: number): void;
|
|
169
|
+
|
|
170
|
+
readonly onAudioDevicesChanged: CodegenTypes.EventEmitter<AudioDevicesChangedEvent>;
|
|
171
|
+
readonly onAudioOutputChanged: CodegenTypes.EventEmitter<AudioOutputChangedEvent>;
|
|
172
|
+
readonly onAudioFocusChanged: CodegenTypes.EventEmitter<AudioFocusChangedEvent>;
|
|
173
|
+
readonly onMicrophoneError: CodegenTypes.EventEmitter<MicrophoneErrorEvent>;
|
|
174
|
+
readonly onAppVisibilityChanged: CodegenTypes.EventEmitter<AppVisibilityChangedEvent>;
|
|
175
|
+
readonly onNetworkAvailable: CodegenTypes.EventEmitter<NetworkAvailableEvent>;
|
|
176
|
+
readonly onCallServiceEvent: CodegenTypes.EventEmitter<CallServiceEvent>;
|
|
177
|
+
readonly onTimer: CodegenTypes.EventEmitter<number>;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export default TurboModuleRegistry.get<Spec>('VoltkitRtc');
|