livevoice-sdk-react-native 1.0.2 → 2.0.0

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 (188) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  3. package/android/{generated/java/io/livevoice/react → app/build/generated/source/codegen/java/com/facebook/fbreact/specs}/NativeLiveVoiceSdkSpec.java +2 -2
  4. package/android/{generated → app/build/generated/source/codegen}/jni/CMakeLists.txt +1 -9
  5. package/android/{generated → app/build/generated/source/codegen}/jni/RNLiveVoiceSpec-generated.cpp +3 -3
  6. package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI.h +341 -0
  7. package/android/build.gradle +41 -84
  8. package/android/gradle.properties +10 -6
  9. package/android/src/main/java/io/livevoice/react/LiveVoiceModule.kt +17 -16
  10. package/android/src/main/java/io/livevoice/react/LiveVoiceSdkReactNativePackage.kt +12 -13
  11. package/android/src/main/java/io/livevoice/react/Mappings.kt +36 -5
  12. package/android/src/main/java/io/livevoice/react/NativeModels.kt +2 -0
  13. package/android/src/main/java/io/livevoice/react/__SDK.kt +1 -1
  14. package/ios/LiveVoiceSdkReactNative.h +5 -5
  15. package/ios/{LivevoiceSdkReactNative.mm → LiveVoiceSdkReactNative.mm} +59 -74
  16. package/ios/__SDK.h +1 -1
  17. package/lib/module/components/AudioOutputSwitchView.js +5 -1
  18. package/lib/module/components/AudioOutputSwitchView.js.map +1 -1
  19. package/lib/module/components/ChannelView.js +14 -38
  20. package/lib/module/components/ChannelView.js.map +1 -1
  21. package/lib/module/components/LiveVoiceView.js +61 -26
  22. package/lib/module/components/LiveVoiceView.js.map +1 -1
  23. package/lib/module/components/PlayButtonView.js +243 -84
  24. package/lib/module/components/PlayButtonView.js.map +1 -1
  25. package/lib/module/icons/captions@1x.png +0 -0
  26. package/lib/module/icons/captions@2x.png +0 -0
  27. package/lib/module/icons/pause@1x.png +0 -0
  28. package/lib/module/icons/pause@2x.png +0 -0
  29. package/lib/module/icons/play@1x.png +0 -0
  30. package/lib/module/icons/play@2x.png +0 -0
  31. package/lib/module/index.js +27 -21
  32. package/lib/module/index.js.map +1 -1
  33. package/lib/module/specs/NativeLiveVoiceSdk.js +4 -0
  34. package/lib/module/specs/NativeLiveVoiceSdk.js.map +1 -1
  35. package/lib/module/util/Colors.js +2 -1
  36. package/lib/module/util/Colors.js.map +1 -1
  37. package/lib/typescript/package.json +1 -0
  38. package/lib/typescript/src/components/AudioOutputSwitchView.d.ts.map +1 -0
  39. package/lib/typescript/src/components/BrandingView.d.ts.map +1 -0
  40. package/lib/typescript/{commonjs/src → src}/components/ChannelView.d.ts +4 -2
  41. package/lib/typescript/src/components/ChannelView.d.ts.map +1 -0
  42. package/lib/typescript/src/components/ErrorView.d.ts.map +1 -0
  43. package/lib/typescript/src/components/LiveVoiceView.d.ts.map +1 -0
  44. package/lib/typescript/src/components/PlayButtonView.d.ts +341 -0
  45. package/lib/typescript/src/components/PlayButtonView.d.ts.map +1 -0
  46. package/lib/typescript/src/components/ReconnectingView.d.ts.map +1 -0
  47. package/lib/typescript/src/components/WarningView.d.ts.map +1 -0
  48. package/lib/typescript/src/components/index.d.ts.map +1 -0
  49. package/lib/typescript/{commonjs/src → src}/index.d.ts +30 -18
  50. package/lib/typescript/src/index.d.ts.map +1 -0
  51. package/lib/typescript/{commonjs/src → src}/specs/NativeLiveVoiceSdk.d.ts +3 -3
  52. package/lib/typescript/src/specs/NativeLiveVoiceSdk.d.ts.map +1 -0
  53. package/lib/typescript/{commonjs/src → src}/util/Colors.d.ts +2 -1
  54. package/lib/typescript/src/util/Colors.d.ts.map +1 -0
  55. package/lib/typescript/src/util/ForegroundServiceConfig.d.ts.map +1 -0
  56. package/lib/typescript/src/util/PlayingState.d.ts.map +1 -0
  57. package/lib/typescript/src/util/Translations.d.ts.map +1 -0
  58. package/lib/typescript/{module/src → src}/util/UIState.d.ts +22 -1
  59. package/lib/typescript/src/util/UIState.d.ts.map +1 -0
  60. package/livevoice-sdk-react-native.podspec +6 -27
  61. package/package.json +33 -123
  62. package/src/components/AudioOutputSwitchView.tsx +10 -9
  63. package/src/components/ChannelView.tsx +18 -25
  64. package/src/components/LiveVoiceView.tsx +143 -83
  65. package/src/components/PlayButtonView.tsx +280 -87
  66. package/src/icons/captions@1x.png +0 -0
  67. package/src/icons/captions@2x.png +0 -0
  68. package/src/icons/pause@1x.png +0 -0
  69. package/src/icons/pause@2x.png +0 -0
  70. package/src/icons/play@1x.png +0 -0
  71. package/src/icons/play@2x.png +0 -0
  72. package/src/index.tsx +99 -75
  73. package/src/specs/NativeLiveVoiceSdk.ts +7 -5
  74. package/src/util/Colors.ts +3 -1
  75. package/src/util/UIState.ts +25 -1
  76. package/android/generated/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI-generated.cpp +0 -245
  77. package/android/generated/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI.h +0 -398
  78. package/android/src/main/AndroidManifest.xml +0 -3
  79. package/ios/generated/RNLiveVoiceSpec/RNLiveVoiceSpec-generated.mm +0 -292
  80. package/ios/generated/RNLiveVoiceSpec/RNLiveVoiceSpec.h +0 -101
  81. package/ios/generated/RNLiveVoiceSpecJSI-generated.cpp +0 -245
  82. package/ios/generated/RNLiveVoiceSpecJSI.h +0 -398
  83. package/lib/commonjs/components/AudioOutputSwitchView.js +0 -140
  84. package/lib/commonjs/components/AudioOutputSwitchView.js.map +0 -1
  85. package/lib/commonjs/components/BrandingView.js +0 -78
  86. package/lib/commonjs/components/BrandingView.js.map +0 -1
  87. package/lib/commonjs/components/ChannelView.js +0 -117
  88. package/lib/commonjs/components/ChannelView.js.map +0 -1
  89. package/lib/commonjs/components/ErrorView.js +0 -88
  90. package/lib/commonjs/components/ErrorView.js.map +0 -1
  91. package/lib/commonjs/components/LiveVoiceView.js +0 -95
  92. package/lib/commonjs/components/LiveVoiceView.js.map +0 -1
  93. package/lib/commonjs/components/PlayButtonView.js +0 -161
  94. package/lib/commonjs/components/PlayButtonView.js.map +0 -1
  95. package/lib/commonjs/components/ReconnectingView.js +0 -109
  96. package/lib/commonjs/components/ReconnectingView.js.map +0 -1
  97. package/lib/commonjs/components/WarningView.js +0 -58
  98. package/lib/commonjs/components/WarningView.js.map +0 -1
  99. package/lib/commonjs/components/index.js +0 -94
  100. package/lib/commonjs/components/index.js.map +0 -1
  101. package/lib/commonjs/icons/branding.png +0 -0
  102. package/lib/commonjs/icons/cpu.png +0 -0
  103. package/lib/commonjs/icons/headphones.png +0 -0
  104. package/lib/commonjs/icons/mic.png +0 -0
  105. package/lib/commonjs/icons/pause.png +0 -0
  106. package/lib/commonjs/icons/play.png +0 -0
  107. package/lib/commonjs/icons/speaker.png +0 -0
  108. package/lib/commonjs/index.js +0 -319
  109. package/lib/commonjs/index.js.map +0 -1
  110. package/lib/commonjs/specs/NativeLiveVoiceSdk.js +0 -19
  111. package/lib/commonjs/specs/NativeLiveVoiceSdk.js.map +0 -1
  112. package/lib/commonjs/util/Colors.js +0 -30
  113. package/lib/commonjs/util/Colors.js.map +0 -1
  114. package/lib/commonjs/util/ForegroundServiceConfig.js +0 -33
  115. package/lib/commonjs/util/ForegroundServiceConfig.js.map +0 -1
  116. package/lib/commonjs/util/PlayingState.js +0 -24
  117. package/lib/commonjs/util/PlayingState.js.map +0 -1
  118. package/lib/commonjs/util/Translations.js +0 -47
  119. package/lib/commonjs/util/Translations.js.map +0 -1
  120. package/lib/commonjs/util/UIState.js +0 -6
  121. package/lib/commonjs/util/UIState.js.map +0 -1
  122. package/lib/module/icons/pause.png +0 -0
  123. package/lib/module/icons/play.png +0 -0
  124. package/lib/typescript/commonjs/package.json +0 -1
  125. package/lib/typescript/commonjs/src/components/AudioOutputSwitchView.d.ts.map +0 -1
  126. package/lib/typescript/commonjs/src/components/BrandingView.d.ts.map +0 -1
  127. package/lib/typescript/commonjs/src/components/ChannelView.d.ts.map +0 -1
  128. package/lib/typescript/commonjs/src/components/ErrorView.d.ts.map +0 -1
  129. package/lib/typescript/commonjs/src/components/LiveVoiceView.d.ts.map +0 -1
  130. package/lib/typescript/commonjs/src/components/PlayButtonView.d.ts +0 -146
  131. package/lib/typescript/commonjs/src/components/PlayButtonView.d.ts.map +0 -1
  132. package/lib/typescript/commonjs/src/components/ReconnectingView.d.ts.map +0 -1
  133. package/lib/typescript/commonjs/src/components/WarningView.d.ts.map +0 -1
  134. package/lib/typescript/commonjs/src/components/index.d.ts.map +0 -1
  135. package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
  136. package/lib/typescript/commonjs/src/specs/NativeLiveVoiceSdk.d.ts.map +0 -1
  137. package/lib/typescript/commonjs/src/util/Colors.d.ts.map +0 -1
  138. package/lib/typescript/commonjs/src/util/ForegroundServiceConfig.d.ts.map +0 -1
  139. package/lib/typescript/commonjs/src/util/PlayingState.d.ts.map +0 -1
  140. package/lib/typescript/commonjs/src/util/Translations.d.ts.map +0 -1
  141. package/lib/typescript/commonjs/src/util/UIState.d.ts +0 -45
  142. package/lib/typescript/commonjs/src/util/UIState.d.ts.map +0 -1
  143. package/lib/typescript/module/src/components/AudioOutputSwitchView.d.ts +0 -6
  144. package/lib/typescript/module/src/components/AudioOutputSwitchView.d.ts.map +0 -1
  145. package/lib/typescript/module/src/components/BrandingView.d.ts +0 -6
  146. package/lib/typescript/module/src/components/BrandingView.d.ts.map +0 -1
  147. package/lib/typescript/module/src/components/ChannelView.d.ts +0 -13
  148. package/lib/typescript/module/src/components/ChannelView.d.ts.map +0 -1
  149. package/lib/typescript/module/src/components/ErrorView.d.ts +0 -9
  150. package/lib/typescript/module/src/components/ErrorView.d.ts.map +0 -1
  151. package/lib/typescript/module/src/components/LiveVoiceView.d.ts +0 -6
  152. package/lib/typescript/module/src/components/LiveVoiceView.d.ts.map +0 -1
  153. package/lib/typescript/module/src/components/PlayButtonView.d.ts +0 -146
  154. package/lib/typescript/module/src/components/PlayButtonView.d.ts.map +0 -1
  155. package/lib/typescript/module/src/components/ReconnectingView.d.ts +0 -9
  156. package/lib/typescript/module/src/components/ReconnectingView.d.ts.map +0 -1
  157. package/lib/typescript/module/src/components/WarningView.d.ts +0 -8
  158. package/lib/typescript/module/src/components/WarningView.d.ts.map +0 -1
  159. package/lib/typescript/module/src/components/index.d.ts +0 -9
  160. package/lib/typescript/module/src/components/index.d.ts.map +0 -1
  161. package/lib/typescript/module/src/index.d.ts +0 -133
  162. package/lib/typescript/module/src/index.d.ts.map +0 -1
  163. package/lib/typescript/module/src/specs/NativeLiveVoiceSdk.d.ts +0 -48
  164. package/lib/typescript/module/src/specs/NativeLiveVoiceSdk.d.ts.map +0 -1
  165. package/lib/typescript/module/src/util/Colors.d.ts +0 -13
  166. package/lib/typescript/module/src/util/Colors.d.ts.map +0 -1
  167. package/lib/typescript/module/src/util/ForegroundServiceConfig.d.ts +0 -12
  168. package/lib/typescript/module/src/util/ForegroundServiceConfig.d.ts.map +0 -1
  169. package/lib/typescript/module/src/util/PlayingState.d.ts +0 -7
  170. package/lib/typescript/module/src/util/PlayingState.d.ts.map +0 -1
  171. package/lib/typescript/module/src/util/Translations.d.ts +0 -22
  172. package/lib/typescript/module/src/util/Translations.d.ts.map +0 -1
  173. package/lib/typescript/module/src/util/UIState.d.ts.map +0 -1
  174. package/react-native.config.js +0 -12
  175. package/src/icons/pause.png +0 -0
  176. package/src/icons/play.png +0 -0
  177. /package/android/{generated → app/build/generated/source/codegen}/jni/RNLiveVoiceSpec.h +0 -0
  178. /package/lib/{typescript/module → module}/package.json +0 -0
  179. /package/lib/typescript/{commonjs/src → src}/components/AudioOutputSwitchView.d.ts +0 -0
  180. /package/lib/typescript/{commonjs/src → src}/components/BrandingView.d.ts +0 -0
  181. /package/lib/typescript/{commonjs/src → src}/components/ErrorView.d.ts +0 -0
  182. /package/lib/typescript/{commonjs/src → src}/components/LiveVoiceView.d.ts +0 -0
  183. /package/lib/typescript/{commonjs/src → src}/components/ReconnectingView.d.ts +0 -0
  184. /package/lib/typescript/{commonjs/src → src}/components/WarningView.d.ts +0 -0
  185. /package/lib/typescript/{commonjs/src → src}/components/index.d.ts +0 -0
  186. /package/lib/typescript/{commonjs/src → src}/util/ForegroundServiceConfig.d.ts +0 -0
  187. /package/lib/typescript/{commonjs/src → src}/util/PlayingState.d.ts +0 -0
  188. /package/lib/typescript/{commonjs/src → src}/util/Translations.d.ts +0 -0
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 LiveVoice GmbH
3
+ Copyright (c) 2026 LiveVoice GmbH
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
  of this software and associated documentation files (the "Software"), to deal
6
6
  in the Software without restriction, including without limitation the rights
package/README.md CHANGED
@@ -4,10 +4,10 @@ The React Native SDK for integrating the LiveVoice service into your app.
4
4
 
5
5
  ## Overview
6
6
 
7
- The LiveVoice SDK enables your app to browse and listen to your configured LiveVoice channels as
7
+ The LiveVoice SDK enables your app to browse and listen to your configured LiveVoice channels as
8
8
  well as present a channel's live subtitles if available.
9
9
 
10
- Using the LiveVoice SDK requires an account with SDK access enabled. Depending on your subscription,
11
- the SDK allows for hiding the LiveVoice branding or using a fully customized presentation. For more
12
- information contact sdk-support@livevoice.io . Once SDK access has been granted, you can see your
13
- personal API-key at the bottom of your account page at https://livevoice.io/en/account .
10
+ Using the LiveVoice SDK requires an account with SDK access enabled. Depending on your subscription,
11
+ the SDK allows for hiding the LiveVoice branding or using a fully customized presentation. For more
12
+ information contact sdk-support@livevoice.io . Once SDK access has been granted, you can see your
13
+ personal API-key at the bottom of your account page at https://livevoice.io/en/account .
@@ -10,7 +10,7 @@
10
10
  * @nolint
11
11
  */
12
12
 
13
- package io.livevoice.react;
13
+ package com.facebook.fbreact.specs;
14
14
 
15
15
  import com.facebook.proguard.annotations.DoNotStrip;
16
16
  import com.facebook.react.bridge.ReactApplicationContext;
@@ -98,7 +98,7 @@ public abstract class NativeLiveVoiceSdkSpec extends ReactContextBaseJavaModule
98
98
 
99
99
  @ReactMethod
100
100
  @DoNotStrip
101
- public abstract void startSubtitles(double channelId, @Nullable String languageCode);
101
+ public abstract void startSubtitles(double channelId);
102
102
 
103
103
  @ReactMethod
104
104
  @DoNotStrip
@@ -25,12 +25,4 @@ target_link_libraries(
25
25
  reactnative
26
26
  )
27
27
 
28
- target_compile_options(
29
- react_codegen_RNLiveVoiceSpec
30
- PRIVATE
31
- -DLOG_TAG=\"ReactNative\"
32
- -fexceptions
33
- -frtti
34
- -std=c++20
35
- -Wall
36
- )
28
+ target_compile_reactnative_options(react_codegen_RNLiveVoiceSpec PRIVATE)
@@ -74,7 +74,7 @@ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel
74
74
 
75
75
  static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
76
76
  static jmethodID cachedMethodId = nullptr;
77
- return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "startSubtitles", "(DLjava/lang/String;)V", args, count, cachedMethodId);
77
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "startSubtitles", "(D)V", args, count, cachedMethodId);
78
78
  }
79
79
 
80
80
  static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
@@ -196,7 +196,7 @@ NativeLiveVoiceSdkSpecJSI::NativeLiveVoiceSdkSpecJSI(const JavaTurboModule::Init
196
196
  methodMap_["setLiveVoiceUseSpeaker"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_setLiveVoiceUseSpeaker};
197
197
  methodMap_["startChannel"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_startChannel};
198
198
  methodMap_["stopChannel"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel};
199
- methodMap_["startSubtitles"] = MethodMetadata {2, __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles};
199
+ methodMap_["startSubtitles"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles};
200
200
  methodMap_["stopSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles};
201
201
  methodMap_["openLiveVoiceWebsite"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_openLiveVoiceWebsite};
202
202
  methodMap_["channelStatusOffline"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_channelStatusOffline};
@@ -222,7 +222,7 @@ NativeLiveVoiceSdkSpecJSI::NativeLiveVoiceSdkSpecJSI(const JavaTurboModule::Init
222
222
  eventEmitterMap_["onAudioOutputChanged"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
223
223
  eventEmitterMap_["onAvailableSubtitleConfigsChanged"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
224
224
  eventEmitterMap_["onSubtitlesChanged"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
225
- setEventEmitterCallback(params.instance);
225
+ configureEventEmitterCallback();
226
226
  }
227
227
 
228
228
  std::shared_ptr<TurboModule> RNLiveVoiceSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
@@ -0,0 +1,341 @@
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: GenerateModuleH.js
8
+ */
9
+
10
+ #pragma once
11
+
12
+ #include <ReactCommon/TurboModule.h>
13
+ #include <react/bridging/Bridging.h>
14
+
15
+ namespace facebook::react {
16
+
17
+
18
+ template <typename T>
19
+ class JSI_EXPORT NativeLiveVoiceSdkCxxSpec : public TurboModule {
20
+ public:
21
+ static constexpr std::string_view kModuleName = "LiveVoiceModule";
22
+
23
+ protected:
24
+ NativeLiveVoiceSdkCxxSpec(std::shared_ptr<CallInvoker> jsInvoker) : TurboModule(std::string{NativeLiveVoiceSdkCxxSpec::kModuleName}, jsInvoker) {
25
+ methodMap_["initialize"] = MethodMetadata {.argCount = 1, .invoker = __initialize};
26
+ methodMap_["joinEvent"] = MethodMetadata {.argCount = 3, .invoker = __joinEvent};
27
+ methodMap_["leaveEvent"] = MethodMetadata {.argCount = 0, .invoker = __leaveEvent};
28
+ methodMap_["reconnect"] = MethodMetadata {.argCount = 0, .invoker = __reconnect};
29
+ methodMap_["getCurrentClaims"] = MethodMetadata {.argCount = 0, .invoker = __getCurrentClaims};
30
+ methodMap_["getCurrentUiState"] = MethodMetadata {.argCount = 0, .invoker = __getCurrentUiState};
31
+ methodMap_["getCurrentAudioState"] = MethodMetadata {.argCount = 0, .invoker = __getCurrentAudioState};
32
+ methodMap_["getCurrentSubtitles"] = MethodMetadata {.argCount = 0, .invoker = __getCurrentSubtitles};
33
+ methodMap_["getCurrentAvailableSubtitleConfigs"] = MethodMetadata {.argCount = 0, .invoker = __getCurrentAvailableSubtitleConfigs};
34
+ methodMap_["setLiveVoiceUseSpeaker"] = MethodMetadata {.argCount = 1, .invoker = __setLiveVoiceUseSpeaker};
35
+ methodMap_["startChannel"] = MethodMetadata {.argCount = 1, .invoker = __startChannel};
36
+ methodMap_["stopChannel"] = MethodMetadata {.argCount = 0, .invoker = __stopChannel};
37
+ methodMap_["startSubtitles"] = MethodMetadata {.argCount = 1, .invoker = __startSubtitles};
38
+ methodMap_["stopSubtitles"] = MethodMetadata {.argCount = 0, .invoker = __stopSubtitles};
39
+ methodMap_["openLiveVoiceWebsite"] = MethodMetadata {.argCount = 0, .invoker = __openLiveVoiceWebsite};
40
+ methodMap_["channelStatusOffline"] = MethodMetadata {.argCount = 0, .invoker = __channelStatusOffline};
41
+ methodMap_["noChannels"] = MethodMetadata {.argCount = 0, .invoker = __noChannels};
42
+ methodMap_["isAiChannelStatusMessage"] = MethodMetadata {.argCount = 0, .invoker = __isAiChannelStatusMessage};
43
+ methodMap_["sdkNoMatchingChannels"] = MethodMetadata {.argCount = 0, .invoker = __sdkNoMatchingChannels};
44
+ methodMap_["errorScreenRetrying"] = MethodMetadata {.argCount = 0, .invoker = __errorScreenRetrying};
45
+ methodMap_["errorScreenRetryingIn"] = MethodMetadata {.argCount = 1, .invoker = __errorScreenRetryingIn};
46
+ methodMap_["sdkErrorGeneric"] = MethodMetadata {.argCount = 0, .invoker = __sdkErrorGeneric};
47
+ methodMap_["sdkErrorInactive"] = MethodMetadata {.argCount = 0, .invoker = __sdkErrorInactive};
48
+ methodMap_["sdkErrorInvalidApiKey"] = MethodMetadata {.argCount = 0, .invoker = __sdkErrorInvalidApiKey};
49
+ methodMap_["sdkErrorListenerLimitReached"] = MethodMetadata {.argCount = 0, .invoker = __sdkErrorListenerLimitReached};
50
+ methodMap_["sdkErrorNoNetwork"] = MethodMetadata {.argCount = 0, .invoker = __sdkErrorNoNetwork};
51
+ methodMap_["sdkErrorNotFound"] = MethodMetadata {.argCount = 0, .invoker = __sdkErrorNotFound};
52
+ methodMap_["sdkErrorRequestFailed"] = MethodMetadata {.argCount = 1, .invoker = __sdkErrorRequestFailed};
53
+ methodMap_["sdkErrorWrongPassword"] = MethodMetadata {.argCount = 0, .invoker = __sdkErrorWrongPassword};
54
+ methodMap_["streamingByTitle"] = MethodMetadata {.argCount = 0, .invoker = __streamingByTitle};
55
+ methodMap_["errorRetryNowButton"] = MethodMetadata {.argCount = 0, .invoker = __errorRetryNowButton};
56
+ methodMap_["accessibilityChannelPlay"] = MethodMetadata {.argCount = 0, .invoker = __accessibilityChannelPlay};
57
+ methodMap_["accessibilityChannelStatusMuted"] = MethodMetadata {.argCount = 0, .invoker = __accessibilityChannelStatusMuted};
58
+ methodMap_["accessibilityChannelStop"] = MethodMetadata {.argCount = 0, .invoker = __accessibilityChannelStop};
59
+ eventEmitterMap_["onUiStateChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
60
+ eventEmitterMap_["onAudioOutputChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
61
+ eventEmitterMap_["onAvailableSubtitleConfigsChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
62
+ eventEmitterMap_["onSubtitlesChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
63
+ }
64
+
65
+ template <typename OnUiStateChangedType> void emitOnUiStateChanged(OnUiStateChangedType value) {
66
+ static_assert(bridging::supportsFromJs<OnUiStateChangedType, jsi::String>, "value cannnot be converted to jsi::String");
67
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*eventEmitterMap_["onUiStateChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
68
+ return bridging::toJs(rt, eventValue, jsInvoker);
69
+ });
70
+ }
71
+
72
+ template <typename OnAudioOutputChangedType> void emitOnAudioOutputChanged(OnAudioOutputChangedType value) {
73
+ static_assert(bridging::supportsFromJs<OnAudioOutputChangedType, bool>, "value cannnot be converted to bool");
74
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*eventEmitterMap_["onAudioOutputChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
75
+ return bridging::toJs(rt, eventValue, jsInvoker);
76
+ });
77
+ }
78
+
79
+ template <typename OnAvailableSubtitleConfigsChangedType> void emitOnAvailableSubtitleConfigsChanged(OnAvailableSubtitleConfigsChangedType value) {
80
+ static_assert(bridging::supportsFromJs<OnAvailableSubtitleConfigsChangedType, jsi::String>, "value cannnot be converted to jsi::String");
81
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*eventEmitterMap_["onAvailableSubtitleConfigsChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
82
+ return bridging::toJs(rt, eventValue, jsInvoker);
83
+ });
84
+ }
85
+
86
+ template <typename OnSubtitlesChangedType> void emitOnSubtitlesChanged(OnSubtitlesChangedType value) {
87
+ static_assert(bridging::supportsFromJs<OnSubtitlesChangedType, jsi::String>, "value cannnot be converted to jsi::String");
88
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*eventEmitterMap_["onSubtitlesChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
89
+ return bridging::toJs(rt, eventValue, jsInvoker);
90
+ });
91
+ }
92
+ private:
93
+ static jsi::Value __initialize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
94
+ static_assert(
95
+ bridging::getParameterCount(&T::initialize) == 2,
96
+ "Expected initialize(...) to have 2 parameters");
97
+ bridging::callFromJs<void>(rt, &T::initialize, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
98
+ count <= 0 || args[0].isNull() || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asString(rt)));return jsi::Value::undefined();
99
+ }
100
+
101
+ static jsi::Value __joinEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
102
+ static_assert(
103
+ bridging::getParameterCount(&T::joinEvent) == 4,
104
+ "Expected joinEvent(...) to have 4 parameters");
105
+ bridging::callFromJs<void>(rt, &T::joinEvent, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
106
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
107
+ count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt)),
108
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt));return jsi::Value::undefined();
109
+ }
110
+
111
+ static jsi::Value __leaveEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
112
+ static_assert(
113
+ bridging::getParameterCount(&T::leaveEvent) == 1,
114
+ "Expected leaveEvent(...) to have 1 parameters");
115
+ bridging::callFromJs<void>(rt, &T::leaveEvent, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
116
+ }
117
+
118
+ static jsi::Value __reconnect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
119
+ static_assert(
120
+ bridging::getParameterCount(&T::reconnect) == 1,
121
+ "Expected reconnect(...) to have 1 parameters");
122
+ bridging::callFromJs<void>(rt, &T::reconnect, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
123
+ }
124
+
125
+ static jsi::Value __getCurrentClaims(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
126
+ static_assert(
127
+ bridging::getParameterCount(&T::getCurrentClaims) == 1,
128
+ "Expected getCurrentClaims(...) to have 1 parameters");
129
+ auto result = bridging::callFromJs<std::optional<jsi::String>>(rt, &T::getCurrentClaims, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return result ? jsi::Value(std::move(*result)) : jsi::Value::null();
130
+ }
131
+
132
+ static jsi::Value __getCurrentUiState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
133
+ static_assert(
134
+ bridging::getParameterCount(&T::getCurrentUiState) == 1,
135
+ "Expected getCurrentUiState(...) to have 1 parameters");
136
+ return bridging::callFromJs<jsi::String>(rt, &T::getCurrentUiState, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
137
+ }
138
+
139
+ static jsi::Value __getCurrentAudioState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
140
+ static_assert(
141
+ bridging::getParameterCount(&T::getCurrentAudioState) == 1,
142
+ "Expected getCurrentAudioState(...) to have 1 parameters");
143
+ return bridging::callFromJs<bool>(rt, &T::getCurrentAudioState, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
144
+ }
145
+
146
+ static jsi::Value __getCurrentSubtitles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
147
+ static_assert(
148
+ bridging::getParameterCount(&T::getCurrentSubtitles) == 1,
149
+ "Expected getCurrentSubtitles(...) to have 1 parameters");
150
+ return bridging::callFromJs<jsi::String>(rt, &T::getCurrentSubtitles, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
151
+ }
152
+
153
+ static jsi::Value __getCurrentAvailableSubtitleConfigs(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
154
+ static_assert(
155
+ bridging::getParameterCount(&T::getCurrentAvailableSubtitleConfigs) == 1,
156
+ "Expected getCurrentAvailableSubtitleConfigs(...) to have 1 parameters");
157
+ return bridging::callFromJs<jsi::String>(rt, &T::getCurrentAvailableSubtitleConfigs, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
158
+ }
159
+
160
+ static jsi::Value __setLiveVoiceUseSpeaker(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
161
+ static_assert(
162
+ bridging::getParameterCount(&T::setLiveVoiceUseSpeaker) == 2,
163
+ "Expected setLiveVoiceUseSpeaker(...) to have 2 parameters");
164
+ bridging::callFromJs<void>(rt, &T::setLiveVoiceUseSpeaker, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
165
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool());return jsi::Value::undefined();
166
+ }
167
+
168
+ static jsi::Value __startChannel(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
169
+ static_assert(
170
+ bridging::getParameterCount(&T::startChannel) == 2,
171
+ "Expected startChannel(...) to have 2 parameters");
172
+ bridging::callFromJs<void>(rt, &T::startChannel, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
173
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());return jsi::Value::undefined();
174
+ }
175
+
176
+ static jsi::Value __stopChannel(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
177
+ static_assert(
178
+ bridging::getParameterCount(&T::stopChannel) == 1,
179
+ "Expected stopChannel(...) to have 1 parameters");
180
+ bridging::callFromJs<void>(rt, &T::stopChannel, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
181
+ }
182
+
183
+ static jsi::Value __startSubtitles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
184
+ static_assert(
185
+ bridging::getParameterCount(&T::startSubtitles) == 2,
186
+ "Expected startSubtitles(...) to have 2 parameters");
187
+ bridging::callFromJs<void>(rt, &T::startSubtitles, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
188
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());return jsi::Value::undefined();
189
+ }
190
+
191
+ static jsi::Value __stopSubtitles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
192
+ static_assert(
193
+ bridging::getParameterCount(&T::stopSubtitles) == 1,
194
+ "Expected stopSubtitles(...) to have 1 parameters");
195
+ bridging::callFromJs<void>(rt, &T::stopSubtitles, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
196
+ }
197
+
198
+ static jsi::Value __openLiveVoiceWebsite(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
199
+ static_assert(
200
+ bridging::getParameterCount(&T::openLiveVoiceWebsite) == 1,
201
+ "Expected openLiveVoiceWebsite(...) to have 1 parameters");
202
+ bridging::callFromJs<void>(rt, &T::openLiveVoiceWebsite, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));return jsi::Value::undefined();
203
+ }
204
+
205
+ static jsi::Value __channelStatusOffline(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
206
+ static_assert(
207
+ bridging::getParameterCount(&T::channelStatusOffline) == 1,
208
+ "Expected channelStatusOffline(...) to have 1 parameters");
209
+ return bridging::callFromJs<jsi::String>(rt, &T::channelStatusOffline, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
210
+ }
211
+
212
+ static jsi::Value __noChannels(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
213
+ static_assert(
214
+ bridging::getParameterCount(&T::noChannels) == 1,
215
+ "Expected noChannels(...) to have 1 parameters");
216
+ return bridging::callFromJs<jsi::String>(rt, &T::noChannels, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
217
+ }
218
+
219
+ static jsi::Value __isAiChannelStatusMessage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
220
+ static_assert(
221
+ bridging::getParameterCount(&T::isAiChannelStatusMessage) == 1,
222
+ "Expected isAiChannelStatusMessage(...) to have 1 parameters");
223
+ return bridging::callFromJs<jsi::String>(rt, &T::isAiChannelStatusMessage, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
224
+ }
225
+
226
+ static jsi::Value __sdkNoMatchingChannels(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
227
+ static_assert(
228
+ bridging::getParameterCount(&T::sdkNoMatchingChannels) == 1,
229
+ "Expected sdkNoMatchingChannels(...) to have 1 parameters");
230
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkNoMatchingChannels, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
231
+ }
232
+
233
+ static jsi::Value __errorScreenRetrying(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
234
+ static_assert(
235
+ bridging::getParameterCount(&T::errorScreenRetrying) == 1,
236
+ "Expected errorScreenRetrying(...) to have 1 parameters");
237
+ return bridging::callFromJs<jsi::String>(rt, &T::errorScreenRetrying, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
238
+ }
239
+
240
+ static jsi::Value __errorScreenRetryingIn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
241
+ static_assert(
242
+ bridging::getParameterCount(&T::errorScreenRetryingIn) == 2,
243
+ "Expected errorScreenRetryingIn(...) to have 2 parameters");
244
+ return bridging::callFromJs<jsi::String>(rt, &T::errorScreenRetryingIn, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
245
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());
246
+ }
247
+
248
+ static jsi::Value __sdkErrorGeneric(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
249
+ static_assert(
250
+ bridging::getParameterCount(&T::sdkErrorGeneric) == 1,
251
+ "Expected sdkErrorGeneric(...) to have 1 parameters");
252
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorGeneric, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
253
+ }
254
+
255
+ static jsi::Value __sdkErrorInactive(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
256
+ static_assert(
257
+ bridging::getParameterCount(&T::sdkErrorInactive) == 1,
258
+ "Expected sdkErrorInactive(...) to have 1 parameters");
259
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorInactive, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
260
+ }
261
+
262
+ static jsi::Value __sdkErrorInvalidApiKey(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
263
+ static_assert(
264
+ bridging::getParameterCount(&T::sdkErrorInvalidApiKey) == 1,
265
+ "Expected sdkErrorInvalidApiKey(...) to have 1 parameters");
266
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorInvalidApiKey, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
267
+ }
268
+
269
+ static jsi::Value __sdkErrorListenerLimitReached(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
270
+ static_assert(
271
+ bridging::getParameterCount(&T::sdkErrorListenerLimitReached) == 1,
272
+ "Expected sdkErrorListenerLimitReached(...) to have 1 parameters");
273
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorListenerLimitReached, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
274
+ }
275
+
276
+ static jsi::Value __sdkErrorNoNetwork(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
277
+ static_assert(
278
+ bridging::getParameterCount(&T::sdkErrorNoNetwork) == 1,
279
+ "Expected sdkErrorNoNetwork(...) to have 1 parameters");
280
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorNoNetwork, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
281
+ }
282
+
283
+ static jsi::Value __sdkErrorNotFound(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
284
+ static_assert(
285
+ bridging::getParameterCount(&T::sdkErrorNotFound) == 1,
286
+ "Expected sdkErrorNotFound(...) to have 1 parameters");
287
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorNotFound, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
288
+ }
289
+
290
+ static jsi::Value __sdkErrorRequestFailed(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
291
+ static_assert(
292
+ bridging::getParameterCount(&T::sdkErrorRequestFailed) == 2,
293
+ "Expected sdkErrorRequestFailed(...) to have 2 parameters");
294
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorRequestFailed, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule),
295
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber());
296
+ }
297
+
298
+ static jsi::Value __sdkErrorWrongPassword(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
299
+ static_assert(
300
+ bridging::getParameterCount(&T::sdkErrorWrongPassword) == 1,
301
+ "Expected sdkErrorWrongPassword(...) to have 1 parameters");
302
+ return bridging::callFromJs<jsi::String>(rt, &T::sdkErrorWrongPassword, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
303
+ }
304
+
305
+ static jsi::Value __streamingByTitle(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
306
+ static_assert(
307
+ bridging::getParameterCount(&T::streamingByTitle) == 1,
308
+ "Expected streamingByTitle(...) to have 1 parameters");
309
+ return bridging::callFromJs<jsi::String>(rt, &T::streamingByTitle, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
310
+ }
311
+
312
+ static jsi::Value __errorRetryNowButton(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
313
+ static_assert(
314
+ bridging::getParameterCount(&T::errorRetryNowButton) == 1,
315
+ "Expected errorRetryNowButton(...) to have 1 parameters");
316
+ return bridging::callFromJs<jsi::String>(rt, &T::errorRetryNowButton, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
317
+ }
318
+
319
+ static jsi::Value __accessibilityChannelPlay(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
320
+ static_assert(
321
+ bridging::getParameterCount(&T::accessibilityChannelPlay) == 1,
322
+ "Expected accessibilityChannelPlay(...) to have 1 parameters");
323
+ return bridging::callFromJs<jsi::String>(rt, &T::accessibilityChannelPlay, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
324
+ }
325
+
326
+ static jsi::Value __accessibilityChannelStatusMuted(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
327
+ static_assert(
328
+ bridging::getParameterCount(&T::accessibilityChannelStatusMuted) == 1,
329
+ "Expected accessibilityChannelStatusMuted(...) to have 1 parameters");
330
+ return bridging::callFromJs<jsi::String>(rt, &T::accessibilityChannelStatusMuted, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
331
+ }
332
+
333
+ static jsi::Value __accessibilityChannelStop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* /*args*/, size_t /*count*/) {
334
+ static_assert(
335
+ bridging::getParameterCount(&T::accessibilityChannelStop) == 1,
336
+ "Expected accessibilityChannelStop(...) to have 1 parameters");
337
+ return bridging::callFromJs<jsi::String>(rt, &T::accessibilityChannelStop, static_cast<NativeLiveVoiceSdkCxxSpec*>(&turboModule)->jsInvoker_, static_cast<T*>(&turboModule));
338
+ }
339
+ };
340
+
341
+ } // namespace facebook::react
@@ -1,6 +1,17 @@
1
1
  buildscript {
2
- ext.getExtOrDefault = { name ->
3
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['LiveVoiceSdkReactNative_' + name]
2
+ ext.LiveVoiceSdkReactNative = [
3
+ kotlinVersion: "2.0.21",
4
+ minSdkVersion: 24,
5
+ compileSdkVersion: 36,
6
+ targetSdkVersion: 36
7
+ ]
8
+
9
+ ext.getExtOrDefault = { prop ->
10
+ if (rootProject.ext.has(prop)) {
11
+ return rootProject.ext.get(prop)
12
+ }
13
+
14
+ return LiveVoiceSdkReactNative[prop]
4
15
  }
5
16
 
6
17
  repositories {
@@ -10,55 +21,26 @@ buildscript {
10
21
 
11
22
  dependencies {
12
23
  classpath "com.android.tools.build:gradle:8.7.2"
24
+ classpath "org.jetbrains.kotlin:kotlin-serialization:${getExtOrDefault('kotlinVersion')}"
13
25
  // noinspection DifferentKotlinGradleVersion
14
26
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
- classpath "org.jetbrains.kotlin:kotlin-serialization:${getExtOrDefault('kotlinVersion')}"
16
27
  }
17
28
  }
18
29
 
19
30
 
20
- def isNewArchitectureEnabled() {
21
- return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
22
- }
23
-
24
31
  apply plugin: "com.android.library"
25
32
  apply plugin: "kotlin-android"
26
33
  apply plugin: "kotlinx-serialization"
27
-
28
- if (isNewArchitectureEnabled()) {
29
- apply plugin: "com.facebook.react"
30
- }
31
-
32
- def getExtOrIntegerDefault(name) {
33
- return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["LiveVoiceSdkReactNative_" + name]).toInteger()
34
- }
35
-
36
- def supportsNamespace() {
37
- def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
38
- def major = parsed[0].toInteger()
39
- def minor = parsed[1].toInteger()
40
-
41
- // Namespace support was added in 7.3.0
42
- return (major == 7 && minor >= 3) || major >= 8
43
- }
34
+ apply plugin: "com.facebook.react"
44
35
 
45
36
  android {
46
- if (supportsNamespace()) {
47
- namespace "com.livevoicesdkreactnative"
48
-
49
- sourceSets {
50
- main {
51
- manifest.srcFile "src/main/AndroidManifestNew.xml"
52
- }
53
- }
54
- }
37
+ namespace "io.livevoice.react"
55
38
 
56
- compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
39
+ compileSdkVersion getExtOrDefault("compileSdkVersion")
57
40
 
58
41
  defaultConfig {
59
- minSdkVersion getExtOrIntegerDefault("minSdkVersion")
60
- targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
61
- buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
42
+ minSdkVersion getExtOrDefault("minSdkVersion")
43
+ targetSdkVersion getExtOrDefault("targetSdkVersion")
62
44
  }
63
45
 
64
46
  buildFeatures {
@@ -71,7 +53,7 @@ android {
71
53
  }
72
54
  }
73
55
 
74
- lintOptions {
56
+ lint {
75
57
  disable "GradleCompatible"
76
58
  }
77
59
 
@@ -80,56 +62,31 @@ android {
80
62
  targetCompatibility JavaVersion.VERSION_1_8
81
63
  }
82
64
 
83
- sourceSets {
84
- main {
85
- // if (isNewArchitectureEnabled()) {
86
- java.srcDirs += [
87
- "generated/java",
88
- "generated/jni"
89
- ]
90
- // }
65
+ /**
66
+ * Add the needed repositories to all gradle projects.
67
+ *
68
+ * This is needed, because react somehow doesn't honor/use the sources
69
+ * configured in the sdk "build.gradle"'s "repositories" block.
70
+ *
71
+ * By applying it recursively, starting from the "root" project, we circumvent this!
72
+ * see: https://github.com/facebook/react-native/issues/39114
73
+ */
74
+ rootProject.allprojects { Project project ->
75
+ println "Adding LiveVoice repository to project \"$project.name\""
76
+ project.repositories {
77
+ google()
78
+ mavenCentral()
79
+ maven { url "https://jitpack.io" }
80
+ maven { url "https://sdks.livevoice.io/android" }
91
81
  }
92
82
  }
93
83
  }
94
84
 
95
- /**
96
- * Add the needed repositories to all gradle projects.
97
- *
98
- * This is needed, because react somehow doesn't honor/use the sources
99
- * configured in the sdk "build.gradle"'s "repositories" block.
100
- *
101
- * By applying it recursively, starting from the "root" project, we circumvent this!
102
- * see: https://github.com/facebook/react-native/issues/39114
103
- */
104
- rootProject.allprojects { Project project ->
105
- println "Adding livevoice repository to project \"$project.name\""
106
- project.repositories {
107
- maven { url "https://jitpack.io" }
108
- maven { url "https://sdks.livevoice.io/android" }
109
- }
110
- }
111
-
112
- repositories {
113
- mavenCentral()
114
- google()
115
- }
116
-
117
- def kotlin_version = getExtOrDefault("kotlinVersion")
118
-
119
85
  dependencies {
120
- implementation "com.facebook.react:react-android:0.78.1"
121
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
122
-
123
- implementation("io.livevoice.sdk:android:1.0.1")
124
-
125
- implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")
126
- implementation("com.jakewharton.timber:timber:5.0.1")
127
- }
128
-
129
- if (isNewArchitectureEnabled()) {
130
- react {
131
- jsRootDir = file("../src/")
132
- libraryName = "LiveVoiceSdkReactNative"
133
- codegenJavaPackageName = "com.livevoicesdkreactnative"
86
+ implementation "com.facebook.react:react-android"
87
+ implementation("io.livevoice.sdk:android:2.0.0") {
88
+ exclude group: 'org.jspecify', module: 'jspecify'
134
89
  }
90
+ implementation("com.jakewharton.timber:timber:5.0.1")
91
+ implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")
135
92
  }
@@ -1,7 +1,11 @@
1
- LiveVoiceSdkReactNative_kotlinVersion=2.1.20
2
- LiveVoiceSdkReactNative_minSdkVersion=24
3
- LiveVoiceSdkReactNative_targetSdkVersion=34
4
- LiveVoiceSdkReactNative_compileSdkVersion=35
5
- LiveVoiceSdkReactNative_ndkVersion=27.1.12297006
1
+ # JVM options
2
+ org.gradle.jvmargs=-Xms128m -Xmx4096m -XX:ReservedCodeCacheSize=200m -XX:+UseCompressedOops
6
3
 
7
- android.useAndroidX=true
4
+ # Performance options
5
+ org.gradle.parallel=true
6
+ org.gradle.daemon=true
7
+ org.gradle.configureondemand=true
8
+ org.gradle.caching=true
9
+ org.gradle.workers.max=4
10
+ org.gradle.vfs.watch=true
11
+ org.gradle.incremental=true