livevoice-sdk-react-native 1.0.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 (191) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +13 -0
  3. package/android/build.gradle +135 -0
  4. package/android/generated/java/io/livevoice/react/NativeLiveVoiceSdkSpec.java +182 -0
  5. package/android/generated/jni/CMakeLists.txt +36 -0
  6. package/android/generated/jni/RNLiveVoiceSpec-generated.cpp +229 -0
  7. package/android/generated/jni/RNLiveVoiceSpec.h +31 -0
  8. package/android/generated/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI-generated.cpp +238 -0
  9. package/android/generated/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI.h +389 -0
  10. package/android/gradle.properties +7 -0
  11. package/android/src/main/AndroidManifest.xml +3 -0
  12. package/android/src/main/java/io/livevoice/react/LiveVoiceModule.kt +293 -0
  13. package/android/src/main/java/io/livevoice/react/LiveVoiceSdkReactNativePackage.kt +45 -0
  14. package/android/src/main/java/io/livevoice/react/Mappings.kt +54 -0
  15. package/android/src/main/java/io/livevoice/react/NativeModels.kt +77 -0
  16. package/ios/LiveVoiceSdkReactNative.h +21 -0
  17. package/ios/LivevoiceSdkReactNative.mm +234 -0
  18. package/ios/generated/RNLiveVoiceSpec/RNLiveVoiceSpec-generated.mm +285 -0
  19. package/ios/generated/RNLiveVoiceSpec/RNLiveVoiceSpec.h +100 -0
  20. package/ios/generated/RNLiveVoiceSpecJSI-generated.cpp +238 -0
  21. package/ios/generated/RNLiveVoiceSpecJSI.h +389 -0
  22. package/lib/commonjs/components/AudioOutputSwitchView.js +140 -0
  23. package/lib/commonjs/components/AudioOutputSwitchView.js.map +1 -0
  24. package/lib/commonjs/components/BrandingView.js +78 -0
  25. package/lib/commonjs/components/BrandingView.js.map +1 -0
  26. package/lib/commonjs/components/ChannelView.js +117 -0
  27. package/lib/commonjs/components/ChannelView.js.map +1 -0
  28. package/lib/commonjs/components/ErrorView.js +88 -0
  29. package/lib/commonjs/components/ErrorView.js.map +1 -0
  30. package/lib/commonjs/components/LiveVoiceView.js +95 -0
  31. package/lib/commonjs/components/LiveVoiceView.js.map +1 -0
  32. package/lib/commonjs/components/PlayButtonView.js +161 -0
  33. package/lib/commonjs/components/PlayButtonView.js.map +1 -0
  34. package/lib/commonjs/components/ReconnectingView.js +109 -0
  35. package/lib/commonjs/components/ReconnectingView.js.map +1 -0
  36. package/lib/commonjs/components/WarningView.js +58 -0
  37. package/lib/commonjs/components/WarningView.js.map +1 -0
  38. package/lib/commonjs/components/index.js +94 -0
  39. package/lib/commonjs/components/index.js.map +1 -0
  40. package/lib/commonjs/icons/branding.png +0 -0
  41. package/lib/commonjs/icons/cpu.png +0 -0
  42. package/lib/commonjs/icons/headphones.png +0 -0
  43. package/lib/commonjs/icons/mic.png +0 -0
  44. package/lib/commonjs/icons/pause.png +0 -0
  45. package/lib/commonjs/icons/play.png +0 -0
  46. package/lib/commonjs/icons/speaker.png +0 -0
  47. package/lib/commonjs/index.js +310 -0
  48. package/lib/commonjs/index.js.map +1 -0
  49. package/lib/commonjs/specs/NativeLiveVoiceSdk.js +19 -0
  50. package/lib/commonjs/specs/NativeLiveVoiceSdk.js.map +1 -0
  51. package/lib/commonjs/util/Colors.js +30 -0
  52. package/lib/commonjs/util/Colors.js.map +1 -0
  53. package/lib/commonjs/util/ForegroundServiceConfig.js +33 -0
  54. package/lib/commonjs/util/ForegroundServiceConfig.js.map +1 -0
  55. package/lib/commonjs/util/PlayingState.js +24 -0
  56. package/lib/commonjs/util/PlayingState.js.map +1 -0
  57. package/lib/commonjs/util/Translations.js +47 -0
  58. package/lib/commonjs/util/Translations.js.map +1 -0
  59. package/lib/commonjs/util/UIState.js +6 -0
  60. package/lib/commonjs/util/UIState.js.map +1 -0
  61. package/lib/module/components/AudioOutputSwitchView.js +134 -0
  62. package/lib/module/components/AudioOutputSwitchView.js.map +1 -0
  63. package/lib/module/components/BrandingView.js +72 -0
  64. package/lib/module/components/BrandingView.js.map +1 -0
  65. package/lib/module/components/ChannelView.js +110 -0
  66. package/lib/module/components/ChannelView.js.map +1 -0
  67. package/lib/module/components/ErrorView.js +82 -0
  68. package/lib/module/components/ErrorView.js.map +1 -0
  69. package/lib/module/components/LiveVoiceView.js +90 -0
  70. package/lib/module/components/LiveVoiceView.js.map +1 -0
  71. package/lib/module/components/PlayButtonView.js +156 -0
  72. package/lib/module/components/PlayButtonView.js.map +1 -0
  73. package/lib/module/components/ReconnectingView.js +103 -0
  74. package/lib/module/components/ReconnectingView.js.map +1 -0
  75. package/lib/module/components/WarningView.js +52 -0
  76. package/lib/module/components/WarningView.js.map +1 -0
  77. package/lib/module/components/index.js +22 -0
  78. package/lib/module/components/index.js.map +1 -0
  79. package/lib/module/icons/branding.png +0 -0
  80. package/lib/module/icons/cpu.png +0 -0
  81. package/lib/module/icons/headphones.png +0 -0
  82. package/lib/module/icons/mic.png +0 -0
  83. package/lib/module/icons/pause.png +0 -0
  84. package/lib/module/icons/play.png +0 -0
  85. package/lib/module/icons/speaker.png +0 -0
  86. package/lib/module/index.js +215 -0
  87. package/lib/module/index.js.map +1 -0
  88. package/lib/module/specs/NativeLiveVoiceSdk.js +16 -0
  89. package/lib/module/specs/NativeLiveVoiceSdk.js.map +1 -0
  90. package/lib/module/util/Colors.js +26 -0
  91. package/lib/module/util/Colors.js.map +1 -0
  92. package/lib/module/util/ForegroundServiceConfig.js +28 -0
  93. package/lib/module/util/ForegroundServiceConfig.js.map +1 -0
  94. package/lib/module/util/PlayingState.js +21 -0
  95. package/lib/module/util/PlayingState.js.map +1 -0
  96. package/lib/module/util/Translations.js +41 -0
  97. package/lib/module/util/Translations.js.map +1 -0
  98. package/lib/module/util/UIState.js +4 -0
  99. package/lib/module/util/UIState.js.map +1 -0
  100. package/lib/typescript/commonjs/package.json +1 -0
  101. package/lib/typescript/commonjs/src/components/AudioOutputSwitchView.d.ts +6 -0
  102. package/lib/typescript/commonjs/src/components/AudioOutputSwitchView.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/src/components/BrandingView.d.ts +6 -0
  104. package/lib/typescript/commonjs/src/components/BrandingView.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/src/components/ChannelView.d.ts +13 -0
  106. package/lib/typescript/commonjs/src/components/ChannelView.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/src/components/ErrorView.d.ts +9 -0
  108. package/lib/typescript/commonjs/src/components/ErrorView.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/src/components/LiveVoiceView.d.ts +6 -0
  110. package/lib/typescript/commonjs/src/components/LiveVoiceView.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/src/components/PlayButtonView.d.ts +146 -0
  112. package/lib/typescript/commonjs/src/components/PlayButtonView.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/src/components/ReconnectingView.d.ts +9 -0
  114. package/lib/typescript/commonjs/src/components/ReconnectingView.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/src/components/WarningView.d.ts +8 -0
  116. package/lib/typescript/commonjs/src/components/WarningView.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/src/components/index.d.ts +9 -0
  118. package/lib/typescript/commonjs/src/components/index.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/src/index.d.ts +129 -0
  120. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/src/specs/NativeLiveVoiceSdk.d.ts +47 -0
  122. package/lib/typescript/commonjs/src/specs/NativeLiveVoiceSdk.d.ts.map +1 -0
  123. package/lib/typescript/commonjs/src/util/Colors.d.ts +13 -0
  124. package/lib/typescript/commonjs/src/util/Colors.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/src/util/ForegroundServiceConfig.d.ts +12 -0
  126. package/lib/typescript/commonjs/src/util/ForegroundServiceConfig.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/src/util/PlayingState.d.ts +7 -0
  128. package/lib/typescript/commonjs/src/util/PlayingState.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/src/util/Translations.d.ts +22 -0
  130. package/lib/typescript/commonjs/src/util/Translations.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/src/util/UIState.d.ts +45 -0
  132. package/lib/typescript/commonjs/src/util/UIState.d.ts.map +1 -0
  133. package/lib/typescript/module/package.json +1 -0
  134. package/lib/typescript/module/src/components/AudioOutputSwitchView.d.ts +6 -0
  135. package/lib/typescript/module/src/components/AudioOutputSwitchView.d.ts.map +1 -0
  136. package/lib/typescript/module/src/components/BrandingView.d.ts +6 -0
  137. package/lib/typescript/module/src/components/BrandingView.d.ts.map +1 -0
  138. package/lib/typescript/module/src/components/ChannelView.d.ts +13 -0
  139. package/lib/typescript/module/src/components/ChannelView.d.ts.map +1 -0
  140. package/lib/typescript/module/src/components/ErrorView.d.ts +9 -0
  141. package/lib/typescript/module/src/components/ErrorView.d.ts.map +1 -0
  142. package/lib/typescript/module/src/components/LiveVoiceView.d.ts +6 -0
  143. package/lib/typescript/module/src/components/LiveVoiceView.d.ts.map +1 -0
  144. package/lib/typescript/module/src/components/PlayButtonView.d.ts +146 -0
  145. package/lib/typescript/module/src/components/PlayButtonView.d.ts.map +1 -0
  146. package/lib/typescript/module/src/components/ReconnectingView.d.ts +9 -0
  147. package/lib/typescript/module/src/components/ReconnectingView.d.ts.map +1 -0
  148. package/lib/typescript/module/src/components/WarningView.d.ts +8 -0
  149. package/lib/typescript/module/src/components/WarningView.d.ts.map +1 -0
  150. package/lib/typescript/module/src/components/index.d.ts +9 -0
  151. package/lib/typescript/module/src/components/index.d.ts.map +1 -0
  152. package/lib/typescript/module/src/index.d.ts +129 -0
  153. package/lib/typescript/module/src/index.d.ts.map +1 -0
  154. package/lib/typescript/module/src/specs/NativeLiveVoiceSdk.d.ts +47 -0
  155. package/lib/typescript/module/src/specs/NativeLiveVoiceSdk.d.ts.map +1 -0
  156. package/lib/typescript/module/src/util/Colors.d.ts +13 -0
  157. package/lib/typescript/module/src/util/Colors.d.ts.map +1 -0
  158. package/lib/typescript/module/src/util/ForegroundServiceConfig.d.ts +12 -0
  159. package/lib/typescript/module/src/util/ForegroundServiceConfig.d.ts.map +1 -0
  160. package/lib/typescript/module/src/util/PlayingState.d.ts +7 -0
  161. package/lib/typescript/module/src/util/PlayingState.d.ts.map +1 -0
  162. package/lib/typescript/module/src/util/Translations.d.ts +22 -0
  163. package/lib/typescript/module/src/util/Translations.d.ts.map +1 -0
  164. package/lib/typescript/module/src/util/UIState.d.ts +45 -0
  165. package/lib/typescript/module/src/util/UIState.d.ts.map +1 -0
  166. package/livevoice-sdk-react-native.podspec +58 -0
  167. package/package.json +207 -0
  168. package/react-native.config.js +12 -0
  169. package/src/components/AudioOutputSwitchView.tsx +145 -0
  170. package/src/components/BrandingView.tsx +66 -0
  171. package/src/components/ChannelView.tsx +99 -0
  172. package/src/components/ErrorView.tsx +89 -0
  173. package/src/components/LiveVoiceView.tsx +120 -0
  174. package/src/components/PlayButtonView.tsx +181 -0
  175. package/src/components/ReconnectingView.tsx +133 -0
  176. package/src/components/WarningView.tsx +60 -0
  177. package/src/components/index.tsx +19 -0
  178. package/src/icons/branding.png +0 -0
  179. package/src/icons/cpu.png +0 -0
  180. package/src/icons/headphones.png +0 -0
  181. package/src/icons/mic.png +0 -0
  182. package/src/icons/pause.png +0 -0
  183. package/src/icons/play.png +0 -0
  184. package/src/icons/speaker.png +0 -0
  185. package/src/index.tsx +221 -0
  186. package/src/specs/NativeLiveVoiceSdk.ts +75 -0
  187. package/src/util/Colors.ts +27 -0
  188. package/src/util/ForegroundServiceConfig.tsx +32 -0
  189. package/src/util/PlayingState.ts +18 -0
  190. package/src/util/Translations.ts +39 -0
  191. package/src/util/UIState.ts +65 -0
@@ -0,0 +1,234 @@
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // This source file is part of the LiveVoice SDK project
4
+ //
5
+ // Copyright (c) LiveVoice GmbH
6
+ // Licensed under the MIT license
7
+ //
8
+ // See LICENSE for license information
9
+ //
10
+ // SPDX-License-Identifier: MIT
11
+ //
12
+ //===----------------------------------------------------------------------===//
13
+
14
+ #import "LiveVoiceSdkReactNative.h"
15
+ #import "LiveVoiceSDK/LiveVoiceSDK.h"
16
+
17
+ // Declare conformance privately
18
+ @interface LiveVoiceSdkReactNative () <LiveVoiceDelegate>
19
+ @end
20
+
21
+ @implementation LiveVoiceSdkReactNative
22
+ RCT_EXPORT_MODULE(LiveVoiceModule)
23
+
24
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
25
+ (const facebook::react::ObjCTurboModule::InitParams &)params
26
+ {
27
+ return std::make_shared<facebook::react::NativeLiveVoiceSdkSpecJSI>(params);
28
+ }
29
+
30
+ - (void)initialize:(NSString * _Nullable)androidServiceConfig
31
+ {
32
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
33
+ [LiveVoice initializeWithDelegate:self];
34
+ }
35
+
36
+ - (void)joinEvent:(nonnull NSString *)joinCode
37
+ password:(nullable NSString *)password
38
+ apiKey:(nonnull NSString *)apiKey
39
+ {
40
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
41
+ [LiveVoice joinEventWithCode:joinCode password:password apiKey:apiKey];
42
+ }
43
+
44
+ - (void)leaveEvent
45
+ {
46
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
47
+ [LiveVoice leaveEvent];
48
+ }
49
+
50
+ - (void)reconnect
51
+ {
52
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
53
+ [LiveVoice reconnect];
54
+ }
55
+
56
+ #pragma mark - Initial values
57
+
58
+ - (nullable NSString *)getCurrentClaims
59
+ {
60
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
61
+ return [LiveVoice currentClaims];
62
+ }
63
+
64
+ - (nonnull NSString *)getCurrentUiState
65
+ {
66
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
67
+ return [LiveVoice currentViewState];
68
+ }
69
+
70
+ //true=speaker, false=headphones
71
+ - (nonnull NSNumber *)getCurrentAudioState
72
+ {
73
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
74
+ return [NSNumber numberWithBool:[LiveVoice currentAudioOutputIsSpeaker]];
75
+ }
76
+
77
+ - (nonnull NSString *)getCurrentAvailableSubtitleConfigs
78
+ {
79
+ NSString *current = [LiveVoice currentAvailableSubtitles];
80
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, current);
81
+ return current;
82
+ }
83
+
84
+ - (nonnull NSString *)getCurrentSubtitles
85
+ {
86
+ NSString *current = [LiveVoice currentSubtitles];
87
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, current);
88
+ return current;
89
+ }
90
+
91
+ #pragma mark - Actions
92
+
93
+ - (void)setLiveVoiceUseSpeaker:(BOOL)useSpeaker
94
+ {
95
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, useSpeaker ? @"speaker" : @"receiver");
96
+ [LiveVoice setAudioOutputToSpeaker:useSpeaker];
97
+ }
98
+
99
+ - (void)startChannel:(double)channelID
100
+ {
101
+ NSLog(@"[SDK] %s %d", __PRETTY_FUNCTION__, (int)channelID);
102
+ [LiveVoice startWithChannelID:channelID];
103
+ }
104
+
105
+ - (void)stopChannel
106
+ {
107
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
108
+ [LiveVoice stop];
109
+ }
110
+
111
+ #pragma mark - Subtitles
112
+
113
+ - (void)startSubtitles:(double)channelId languageCode:(nullable NSString *)languageCode
114
+ {
115
+ NSLog(@"[SDK] %s channel: %f, language: %@", __PRETTY_FUNCTION__, channelId, languageCode);
116
+ NSNumber * _Nullable optionalChannelID = (channelId == -1) ? nil : [NSNumber numberWithLongLong:channelId];
117
+ [LiveVoice startSubtitlesWithChannelID:optionalChannelID languageCode:languageCode];
118
+ }
119
+
120
+ - (void)stopSubtitles
121
+ {
122
+ NSLog(@"[SDK] %s", __PRETTY_FUNCTION__);
123
+ [LiveVoice stopSubtitles];
124
+ }
125
+
126
+ #pragma mark - Translations
127
+
128
+ - (nonnull NSString *)channelStatusOffline {
129
+ return [Translations channel_status_offline];
130
+ }
131
+
132
+ - (nonnull NSString *)errorScreenRetrying {
133
+ return [Translations error_screen_retrying];
134
+ }
135
+
136
+ - (nonnull NSString *)errorScreenRetryingIn:(double)seconds {
137
+ return [Translations error_screen_retrying_in:(int)seconds];
138
+ }
139
+
140
+ - (nonnull NSString *)sdkErrorGeneric {
141
+ return [Translations sdk_error_generic];
142
+ }
143
+
144
+ - (nonnull NSString *)sdkErrorInactive {
145
+ return [Translations sdk_error_inactive];
146
+ }
147
+
148
+ - (nonnull NSString *)sdkErrorInvalidApiKey {
149
+ return [Translations sdk_error_invalid_api_key];
150
+ }
151
+
152
+ - (nonnull NSString *)sdkErrorListenerLimitReached {
153
+ return [Translations sdk_error_listener_limit_reached];
154
+ }
155
+
156
+ - (nonnull NSString *)sdkErrorNoNetwork {
157
+ return [Translations sdk_error_no_network];
158
+ }
159
+
160
+ - (nonnull NSString *)sdkErrorNotFound {
161
+ return [Translations sdk_error_not_found];
162
+ }
163
+
164
+ - (nonnull NSString *)sdkErrorRequestFailed:(double)errorCode {
165
+ return [Translations sdk_error_request_failed:[NSString stringWithFormat:@"%1.0f", errorCode]];
166
+ }
167
+
168
+ - (nonnull NSString *)sdkErrorWrongPassword {
169
+ return [Translations sdk_error_wrong_password];
170
+ }
171
+
172
+ - (nonnull NSString *)sdkNoMatchingChannels {
173
+ return [Translations sdk_no_matching_channels];
174
+ }
175
+
176
+ - (nonnull NSString *)streamingByTitle {
177
+ return [Translations streaming_by_title];
178
+ }
179
+
180
+ - (nonnull NSString *)accessibilityChannelPlay {
181
+ return [Translations a11y_channel_play];
182
+ }
183
+
184
+
185
+ - (nonnull NSString *)accessibilityChannelStatusMuted {
186
+ return [Translations a11y_channel_status_muted];
187
+ }
188
+
189
+
190
+ - (nonnull NSString *)accessibilityChannelStop {
191
+ return [Translations a11y_channel_stop];
192
+ }
193
+
194
+
195
+ - (nonnull NSString *)isAiChannelStatusMessage {
196
+ return [Translations channel_status_is_ai];
197
+ }
198
+
199
+
200
+ - (nonnull NSString *)noChannels {
201
+ return [Translations sdk_no_matching_channels];
202
+ }
203
+
204
+ - (nonnull NSString *)errorRetryNowButton {
205
+ return [Translations action_retry_now];
206
+ }
207
+
208
+ #pragma mark - LiveVoiceDelegate
209
+
210
+ - (void)viewStateDidChange:(nonnull NSString *)serializedState
211
+ {
212
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, serializedState);
213
+ [self emitOnUiStateChanged:serializedState];
214
+ }
215
+
216
+ - (void)audioOutputDidChange:(BOOL)useSpeaker
217
+ {
218
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, useSpeaker ? @"speaker" : @"receiver");
219
+ [self emitOnAudioOutputChanged:useSpeaker];
220
+ }
221
+
222
+ - (void)availableSubtitlesDidChange:(NSString *)available
223
+ {
224
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, available);
225
+ [self emitOnAvailableSubtitleConfigsChanged:available];
226
+ }
227
+
228
+ - (void)subtitlesDidChange:(NSString *)subtitles
229
+ {
230
+ NSLog(@"[SDK] %s %@", __PRETTY_FUNCTION__, subtitles);
231
+ [self emitOnSubtitlesChanged:subtitles];
232
+ }
233
+
234
+ @end
@@ -0,0 +1,285 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #import "RNLiveVoiceSpec.h"
15
+
16
+
17
+ @implementation NativeLiveVoiceSdkSpecBase
18
+ - (void)emitOnUiStateChanged:(NSString *_Nonnull)value
19
+ {
20
+ _eventEmitterCallback("onUiStateChanged", value);
21
+ }
22
+ - (void)emitOnAudioOutputChanged:(BOOL)value
23
+ {
24
+ _eventEmitterCallback("onAudioOutputChanged", [NSNumber numberWithBool:value]);
25
+ }
26
+ - (void)emitOnAvailableSubtitleConfigsChanged:(NSString *_Nonnull)value
27
+ {
28
+ _eventEmitterCallback("onAvailableSubtitleConfigsChanged", value);
29
+ }
30
+ - (void)emitOnSubtitlesChanged:(NSString *_Nonnull)value
31
+ {
32
+ _eventEmitterCallback("onSubtitlesChanged", value);
33
+ }
34
+
35
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
36
+ {
37
+ _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
38
+ }
39
+ @end
40
+
41
+
42
+ namespace facebook::react {
43
+
44
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_initialize(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
45
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "initialize", @selector(initialize:), args, count);
46
+ }
47
+
48
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_joinEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
49
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "joinEvent", @selector(joinEvent:password:apiKey:), args, count);
50
+ }
51
+
52
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_leaveEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
53
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "leaveEvent", @selector(leaveEvent), args, count);
54
+ }
55
+
56
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_reconnect(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
57
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "reconnect", @selector(reconnect), args, count);
58
+ }
59
+
60
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentClaims(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
61
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentClaims", @selector(getCurrentClaims), args, count);
62
+ }
63
+
64
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentUiState(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
65
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentUiState", @selector(getCurrentUiState), args, count);
66
+ }
67
+
68
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAudioState(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
69
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, BooleanKind, "getCurrentAudioState", @selector(getCurrentAudioState), args, count);
70
+ }
71
+
72
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
73
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentSubtitles", @selector(getCurrentSubtitles), args, count);
74
+ }
75
+
76
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAvailableSubtitleConfigs(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
77
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentAvailableSubtitleConfigs", @selector(getCurrentAvailableSubtitleConfigs), args, count);
78
+ }
79
+
80
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_setLiveVoiceUseSpeaker(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
81
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "setLiveVoiceUseSpeaker", @selector(setLiveVoiceUseSpeaker:), args, count);
82
+ }
83
+
84
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_startChannel(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
85
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "startChannel", @selector(startChannel:), args, count);
86
+ }
87
+
88
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
89
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "stopChannel", @selector(stopChannel), args, count);
90
+ }
91
+
92
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
93
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "startSubtitles", @selector(startSubtitles:languageCode:), args, count);
94
+ }
95
+
96
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
97
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "stopSubtitles", @selector(stopSubtitles), args, count);
98
+ }
99
+
100
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_channelStatusOffline(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
101
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "channelStatusOffline", @selector(channelStatusOffline), args, count);
102
+ }
103
+
104
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_noChannels(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
105
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "noChannels", @selector(noChannels), args, count);
106
+ }
107
+
108
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_isAiChannelStatusMessage(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
109
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "isAiChannelStatusMessage", @selector(isAiChannelStatusMessage), args, count);
110
+ }
111
+
112
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkNoMatchingChannels(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
113
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkNoMatchingChannels", @selector(sdkNoMatchingChannels), args, count);
114
+ }
115
+
116
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetrying(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
117
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "errorScreenRetrying", @selector(errorScreenRetrying), args, count);
118
+ }
119
+
120
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetryingIn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
121
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "errorScreenRetryingIn", @selector(errorScreenRetryingIn:), args, count);
122
+ }
123
+
124
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorGeneric(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
125
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorGeneric", @selector(sdkErrorGeneric), args, count);
126
+ }
127
+
128
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInactive(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
129
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorInactive", @selector(sdkErrorInactive), args, count);
130
+ }
131
+
132
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInvalidApiKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
133
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorInvalidApiKey", @selector(sdkErrorInvalidApiKey), args, count);
134
+ }
135
+
136
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorListenerLimitReached(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
137
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorListenerLimitReached", @selector(sdkErrorListenerLimitReached), args, count);
138
+ }
139
+
140
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNoNetwork(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
141
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorNoNetwork", @selector(sdkErrorNoNetwork), args, count);
142
+ }
143
+
144
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNotFound(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
145
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorNotFound", @selector(sdkErrorNotFound), args, count);
146
+ }
147
+
148
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorRequestFailed(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
149
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorRequestFailed", @selector(sdkErrorRequestFailed:), args, count);
150
+ }
151
+
152
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorWrongPassword(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
153
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorWrongPassword", @selector(sdkErrorWrongPassword), args, count);
154
+ }
155
+
156
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_streamingByTitle(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
157
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "streamingByTitle", @selector(streamingByTitle), args, count);
158
+ }
159
+
160
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorRetryNowButton(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
161
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "errorRetryNowButton", @selector(errorRetryNowButton), args, count);
162
+ }
163
+
164
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelPlay(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
165
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "accessibilityChannelPlay", @selector(accessibilityChannelPlay), args, count);
166
+ }
167
+
168
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStatusMuted(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
169
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "accessibilityChannelStatusMuted", @selector(accessibilityChannelStatusMuted), args, count);
170
+ }
171
+
172
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStop(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
173
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "accessibilityChannelStop", @selector(accessibilityChannelStop), args, count);
174
+ }
175
+
176
+ NativeLiveVoiceSdkSpecJSI::NativeLiveVoiceSdkSpecJSI(const ObjCTurboModule::InitParams &params)
177
+ : ObjCTurboModule(params) {
178
+
179
+ methodMap_["initialize"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_initialize};
180
+
181
+
182
+ methodMap_["joinEvent"] = MethodMetadata {3, __hostFunction_NativeLiveVoiceSdkSpecJSI_joinEvent};
183
+
184
+
185
+ methodMap_["leaveEvent"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_leaveEvent};
186
+
187
+
188
+ methodMap_["reconnect"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_reconnect};
189
+
190
+
191
+ methodMap_["getCurrentClaims"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentClaims};
192
+
193
+
194
+ methodMap_["getCurrentUiState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentUiState};
195
+
196
+
197
+ methodMap_["getCurrentAudioState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAudioState};
198
+
199
+
200
+ methodMap_["getCurrentSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentSubtitles};
201
+
202
+
203
+ methodMap_["getCurrentAvailableSubtitleConfigs"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAvailableSubtitleConfigs};
204
+
205
+
206
+ methodMap_["setLiveVoiceUseSpeaker"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_setLiveVoiceUseSpeaker};
207
+
208
+
209
+ methodMap_["startChannel"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_startChannel};
210
+
211
+
212
+ methodMap_["stopChannel"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel};
213
+
214
+
215
+ methodMap_["startSubtitles"] = MethodMetadata {2, __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles};
216
+
217
+
218
+ methodMap_["stopSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles};
219
+
220
+
221
+ methodMap_["channelStatusOffline"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_channelStatusOffline};
222
+
223
+
224
+ methodMap_["noChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_noChannels};
225
+
226
+
227
+ methodMap_["isAiChannelStatusMessage"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_isAiChannelStatusMessage};
228
+
229
+
230
+ methodMap_["sdkNoMatchingChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkNoMatchingChannels};
231
+
232
+
233
+ methodMap_["errorScreenRetrying"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetrying};
234
+
235
+
236
+ methodMap_["errorScreenRetryingIn"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetryingIn};
237
+
238
+
239
+ methodMap_["sdkErrorGeneric"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorGeneric};
240
+
241
+
242
+ methodMap_["sdkErrorInactive"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInactive};
243
+
244
+
245
+ methodMap_["sdkErrorInvalidApiKey"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInvalidApiKey};
246
+
247
+
248
+ methodMap_["sdkErrorListenerLimitReached"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorListenerLimitReached};
249
+
250
+
251
+ methodMap_["sdkErrorNoNetwork"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNoNetwork};
252
+
253
+
254
+ methodMap_["sdkErrorNotFound"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNotFound};
255
+
256
+
257
+ methodMap_["sdkErrorRequestFailed"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorRequestFailed};
258
+
259
+
260
+ methodMap_["sdkErrorWrongPassword"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorWrongPassword};
261
+
262
+
263
+ methodMap_["streamingByTitle"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_streamingByTitle};
264
+
265
+
266
+ methodMap_["errorRetryNowButton"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorRetryNowButton};
267
+
268
+
269
+ methodMap_["accessibilityChannelPlay"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelPlay};
270
+
271
+
272
+ methodMap_["accessibilityChannelStatusMuted"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStatusMuted};
273
+
274
+
275
+ methodMap_["accessibilityChannelStop"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStop};
276
+
277
+ eventEmitterMap_["onUiStateChanged"] = std::make_shared<AsyncEventEmitter<id>>();
278
+ eventEmitterMap_["onAudioOutputChanged"] = std::make_shared<AsyncEventEmitter<id>>();
279
+ eventEmitterMap_["onAvailableSubtitleConfigsChanged"] = std::make_shared<AsyncEventEmitter<id>>();
280
+ eventEmitterMap_["onSubtitlesChanged"] = std::make_shared<AsyncEventEmitter<id>>();
281
+ setEventEmitterCallback([&](const std::string &name, id value) {
282
+ static_cast<AsyncEventEmitter<id> &>(*eventEmitterMap_[name]).emit(value);
283
+ });
284
+ }
285
+ } // namespace facebook::react
@@ -0,0 +1,100 @@
1
+ /**
2
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
+ *
4
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
5
+ * once the code is regenerated.
6
+ *
7
+ * @generated by codegen project: GenerateModuleObjCpp
8
+ *
9
+ * We create an umbrella header (and corresponding implementation) here since
10
+ * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
+ * must have a single output. More files => more genrule()s => slower builds.
12
+ */
13
+
14
+ #ifndef __cplusplus
15
+ #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
+ #endif
17
+
18
+ // Avoid multiple includes of RNLiveVoiceSpec symbols
19
+ #ifndef RNLiveVoiceSpec_H
20
+ #define RNLiveVoiceSpec_H
21
+
22
+ #import <Foundation/Foundation.h>
23
+ #import <RCTRequired/RCTRequired.h>
24
+ #import <RCTTypeSafety/RCTConvertHelpers.h>
25
+ #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
+ #import <React/RCTBridgeModule.h>
27
+ #import <React/RCTCxxConvert.h>
28
+ #import <React/RCTManagedPointer.h>
29
+ #import <ReactCommon/RCTTurboModule.h>
30
+ #import <optional>
31
+ #import <vector>
32
+
33
+
34
+ NS_ASSUME_NONNULL_BEGIN
35
+
36
+ @protocol NativeLiveVoiceSdkSpec <RCTBridgeModule, RCTTurboModule>
37
+
38
+ - (void)initialize:(NSString * _Nullable)androidServiceConfig;
39
+ - (void)joinEvent:(NSString *)joinCode
40
+ password:(NSString * _Nullable)password
41
+ apiKey:(NSString *)apiKey;
42
+ - (void)leaveEvent;
43
+ - (void)reconnect;
44
+ - (NSString * _Nullable)getCurrentClaims;
45
+ - (NSString *)getCurrentUiState;
46
+ - (NSNumber *)getCurrentAudioState;
47
+ - (NSString *)getCurrentSubtitles;
48
+ - (NSString *)getCurrentAvailableSubtitleConfigs;
49
+ - (void)setLiveVoiceUseSpeaker:(BOOL)value;
50
+ - (void)startChannel:(double)id;
51
+ - (void)stopChannel;
52
+ - (void)startSubtitles:(double)channelId
53
+ languageCode:(NSString * _Nullable)languageCode;
54
+ - (void)stopSubtitles;
55
+ - (NSString *)channelStatusOffline;
56
+ - (NSString *)noChannels;
57
+ - (NSString *)isAiChannelStatusMessage;
58
+ - (NSString *)sdkNoMatchingChannels;
59
+ - (NSString *)errorScreenRetrying;
60
+ - (NSString *)errorScreenRetryingIn:(double)seconds;
61
+ - (NSString *)sdkErrorGeneric;
62
+ - (NSString *)sdkErrorInactive;
63
+ - (NSString *)sdkErrorInvalidApiKey;
64
+ - (NSString *)sdkErrorListenerLimitReached;
65
+ - (NSString *)sdkErrorNoNetwork;
66
+ - (NSString *)sdkErrorNotFound;
67
+ - (NSString *)sdkErrorRequestFailed:(double)errorCode;
68
+ - (NSString *)sdkErrorWrongPassword;
69
+ - (NSString *)streamingByTitle;
70
+ - (NSString *)errorRetryNowButton;
71
+ - (NSString *)accessibilityChannelPlay;
72
+ - (NSString *)accessibilityChannelStatusMuted;
73
+ - (NSString *)accessibilityChannelStop;
74
+
75
+ @end
76
+
77
+ @interface NativeLiveVoiceSdkSpecBase : NSObject {
78
+ @protected
79
+ facebook::react::EventEmitterCallback _eventEmitterCallback;
80
+ }
81
+ - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
82
+
83
+ - (void)emitOnUiStateChanged:(NSString *_Nonnull)value;
84
+ - (void)emitOnAudioOutputChanged:(BOOL)value;
85
+ - (void)emitOnAvailableSubtitleConfigsChanged:(NSString *_Nonnull)value;
86
+ - (void)emitOnSubtitlesChanged:(NSString *_Nonnull)value;
87
+ @end
88
+
89
+ namespace facebook::react {
90
+ /**
91
+ * ObjC++ class for module 'NativeLiveVoiceSdk'
92
+ */
93
+ class JSI_EXPORT NativeLiveVoiceSdkSpecJSI : public ObjCTurboModule {
94
+ public:
95
+ NativeLiveVoiceSdkSpecJSI(const ObjCTurboModule::InitParams &params);
96
+ };
97
+ } // namespace facebook::react
98
+
99
+ NS_ASSUME_NONNULL_END
100
+ #endif // RNLiveVoiceSpec_H