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,238 @@
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: GenerateModuleCpp.js
8
+ */
9
+
10
+ #include "RNLiveVoiceSpecJSI.h"
11
+
12
+ namespace facebook::react {
13
+
14
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_initialize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
15
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->initialize(
16
+ rt,
17
+ count <= 0 || args[0].isNull() || args[0].isUndefined() ? std::nullopt : std::make_optional(args[0].asString(rt))
18
+ );
19
+ return jsi::Value::undefined();
20
+ }
21
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_joinEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
22
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->joinEvent(
23
+ rt,
24
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
25
+ count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt)),
26
+ count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt)
27
+ );
28
+ return jsi::Value::undefined();
29
+ }
30
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_leaveEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
31
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->leaveEvent(
32
+ rt
33
+ );
34
+ return jsi::Value::undefined();
35
+ }
36
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_reconnect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
37
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->reconnect(
38
+ rt
39
+ );
40
+ return jsi::Value::undefined();
41
+ }
42
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentClaims(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
43
+ auto result = static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->getCurrentClaims(
44
+ rt
45
+ );
46
+ return result ? jsi::Value(std::move(*result)) : jsi::Value::null();
47
+ }
48
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentUiState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
49
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->getCurrentUiState(
50
+ rt
51
+ );
52
+ }
53
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentAudioState(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
54
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->getCurrentAudioState(
55
+ rt
56
+ );
57
+ }
58
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentSubtitles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
59
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->getCurrentSubtitles(
60
+ rt
61
+ );
62
+ }
63
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentAvailableSubtitleConfigs(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
64
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->getCurrentAvailableSubtitleConfigs(
65
+ rt
66
+ );
67
+ }
68
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_setLiveVoiceUseSpeaker(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
69
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->setLiveVoiceUseSpeaker(
70
+ rt,
71
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool()
72
+ );
73
+ return jsi::Value::undefined();
74
+ }
75
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_startChannel(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
76
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->startChannel(
77
+ rt,
78
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
79
+ );
80
+ return jsi::Value::undefined();
81
+ }
82
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_stopChannel(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
83
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->stopChannel(
84
+ rt
85
+ );
86
+ return jsi::Value::undefined();
87
+ }
88
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_startSubtitles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
89
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->startSubtitles(
90
+ rt,
91
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(),
92
+ count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt))
93
+ );
94
+ return jsi::Value::undefined();
95
+ }
96
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_stopSubtitles(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
97
+ static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->stopSubtitles(
98
+ rt
99
+ );
100
+ return jsi::Value::undefined();
101
+ }
102
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_channelStatusOffline(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
103
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->channelStatusOffline(
104
+ rt
105
+ );
106
+ }
107
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_noChannels(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
108
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->noChannels(
109
+ rt
110
+ );
111
+ }
112
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_isAiChannelStatusMessage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
113
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->isAiChannelStatusMessage(
114
+ rt
115
+ );
116
+ }
117
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkNoMatchingChannels(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
118
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkNoMatchingChannels(
119
+ rt
120
+ );
121
+ }
122
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetrying(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
123
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->errorScreenRetrying(
124
+ rt
125
+ );
126
+ }
127
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetryingIn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
128
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->errorScreenRetryingIn(
129
+ rt,
130
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
131
+ );
132
+ }
133
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorGeneric(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
134
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorGeneric(
135
+ rt
136
+ );
137
+ }
138
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInactive(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
139
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorInactive(
140
+ rt
141
+ );
142
+ }
143
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInvalidApiKey(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
144
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorInvalidApiKey(
145
+ rt
146
+ );
147
+ }
148
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorListenerLimitReached(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
149
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorListenerLimitReached(
150
+ rt
151
+ );
152
+ }
153
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNoNetwork(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
154
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorNoNetwork(
155
+ rt
156
+ );
157
+ }
158
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNotFound(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
159
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorNotFound(
160
+ rt
161
+ );
162
+ }
163
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorRequestFailed(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
164
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorRequestFailed(
165
+ rt,
166
+ count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
167
+ );
168
+ }
169
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorWrongPassword(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
170
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorWrongPassword(
171
+ rt
172
+ );
173
+ }
174
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_streamingByTitle(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
175
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->streamingByTitle(
176
+ rt
177
+ );
178
+ }
179
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorRetryNowButton(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
180
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->errorRetryNowButton(
181
+ rt
182
+ );
183
+ }
184
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelPlay(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
185
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->accessibilityChannelPlay(
186
+ rt
187
+ );
188
+ }
189
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStatusMuted(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
190
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->accessibilityChannelStatusMuted(
191
+ rt
192
+ );
193
+ }
194
+ static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
195
+ return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->accessibilityChannelStop(
196
+ rt
197
+ );
198
+ }
199
+
200
+ NativeLiveVoiceSdkCxxSpecJSI::NativeLiveVoiceSdkCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
201
+ : TurboModule("LiveVoiceModule", jsInvoker) {
202
+ methodMap_["initialize"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_initialize};
203
+ methodMap_["joinEvent"] = MethodMetadata {3, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_joinEvent};
204
+ methodMap_["leaveEvent"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_leaveEvent};
205
+ methodMap_["reconnect"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_reconnect};
206
+ methodMap_["getCurrentClaims"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentClaims};
207
+ methodMap_["getCurrentUiState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentUiState};
208
+ methodMap_["getCurrentAudioState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentAudioState};
209
+ methodMap_["getCurrentSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentSubtitles};
210
+ methodMap_["getCurrentAvailableSubtitleConfigs"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentAvailableSubtitleConfigs};
211
+ methodMap_["setLiveVoiceUseSpeaker"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_setLiveVoiceUseSpeaker};
212
+ methodMap_["startChannel"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_startChannel};
213
+ methodMap_["stopChannel"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_stopChannel};
214
+ methodMap_["startSubtitles"] = MethodMetadata {2, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_startSubtitles};
215
+ methodMap_["stopSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_stopSubtitles};
216
+ methodMap_["channelStatusOffline"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_channelStatusOffline};
217
+ methodMap_["noChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_noChannels};
218
+ methodMap_["isAiChannelStatusMessage"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_isAiChannelStatusMessage};
219
+ methodMap_["sdkNoMatchingChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkNoMatchingChannels};
220
+ methodMap_["errorScreenRetrying"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetrying};
221
+ methodMap_["errorScreenRetryingIn"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetryingIn};
222
+ methodMap_["sdkErrorGeneric"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorGeneric};
223
+ methodMap_["sdkErrorInactive"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInactive};
224
+ methodMap_["sdkErrorInvalidApiKey"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInvalidApiKey};
225
+ methodMap_["sdkErrorListenerLimitReached"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorListenerLimitReached};
226
+ methodMap_["sdkErrorNoNetwork"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNoNetwork};
227
+ methodMap_["sdkErrorNotFound"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNotFound};
228
+ methodMap_["sdkErrorRequestFailed"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorRequestFailed};
229
+ methodMap_["sdkErrorWrongPassword"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorWrongPassword};
230
+ methodMap_["streamingByTitle"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_streamingByTitle};
231
+ methodMap_["errorRetryNowButton"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorRetryNowButton};
232
+ methodMap_["accessibilityChannelPlay"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelPlay};
233
+ methodMap_["accessibilityChannelStatusMuted"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStatusMuted};
234
+ methodMap_["accessibilityChannelStop"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStop};
235
+ }
236
+
237
+
238
+ } // namespace facebook::react
@@ -0,0 +1,389 @@
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
+ class JSI_EXPORT NativeLiveVoiceSdkCxxSpecJSI : public TurboModule {
19
+ protected:
20
+ NativeLiveVoiceSdkCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
21
+
22
+ public:
23
+ virtual void initialize(jsi::Runtime &rt, std::optional<jsi::String> androidServiceConfig) = 0;
24
+ virtual void joinEvent(jsi::Runtime &rt, jsi::String joinCode, std::optional<jsi::String> password, jsi::String apiKey) = 0;
25
+ virtual void leaveEvent(jsi::Runtime &rt) = 0;
26
+ virtual void reconnect(jsi::Runtime &rt) = 0;
27
+ virtual std::optional<jsi::String> getCurrentClaims(jsi::Runtime &rt) = 0;
28
+ virtual jsi::String getCurrentUiState(jsi::Runtime &rt) = 0;
29
+ virtual bool getCurrentAudioState(jsi::Runtime &rt) = 0;
30
+ virtual jsi::String getCurrentSubtitles(jsi::Runtime &rt) = 0;
31
+ virtual jsi::String getCurrentAvailableSubtitleConfigs(jsi::Runtime &rt) = 0;
32
+ virtual void setLiveVoiceUseSpeaker(jsi::Runtime &rt, bool value) = 0;
33
+ virtual void startChannel(jsi::Runtime &rt, double id) = 0;
34
+ virtual void stopChannel(jsi::Runtime &rt) = 0;
35
+ virtual void startSubtitles(jsi::Runtime &rt, double channelId, std::optional<jsi::String> languageCode) = 0;
36
+ virtual void stopSubtitles(jsi::Runtime &rt) = 0;
37
+ virtual jsi::String channelStatusOffline(jsi::Runtime &rt) = 0;
38
+ virtual jsi::String noChannels(jsi::Runtime &rt) = 0;
39
+ virtual jsi::String isAiChannelStatusMessage(jsi::Runtime &rt) = 0;
40
+ virtual jsi::String sdkNoMatchingChannels(jsi::Runtime &rt) = 0;
41
+ virtual jsi::String errorScreenRetrying(jsi::Runtime &rt) = 0;
42
+ virtual jsi::String errorScreenRetryingIn(jsi::Runtime &rt, double seconds) = 0;
43
+ virtual jsi::String sdkErrorGeneric(jsi::Runtime &rt) = 0;
44
+ virtual jsi::String sdkErrorInactive(jsi::Runtime &rt) = 0;
45
+ virtual jsi::String sdkErrorInvalidApiKey(jsi::Runtime &rt) = 0;
46
+ virtual jsi::String sdkErrorListenerLimitReached(jsi::Runtime &rt) = 0;
47
+ virtual jsi::String sdkErrorNoNetwork(jsi::Runtime &rt) = 0;
48
+ virtual jsi::String sdkErrorNotFound(jsi::Runtime &rt) = 0;
49
+ virtual jsi::String sdkErrorRequestFailed(jsi::Runtime &rt, double errorCode) = 0;
50
+ virtual jsi::String sdkErrorWrongPassword(jsi::Runtime &rt) = 0;
51
+ virtual jsi::String streamingByTitle(jsi::Runtime &rt) = 0;
52
+ virtual jsi::String errorRetryNowButton(jsi::Runtime &rt) = 0;
53
+ virtual jsi::String accessibilityChannelPlay(jsi::Runtime &rt) = 0;
54
+ virtual jsi::String accessibilityChannelStatusMuted(jsi::Runtime &rt) = 0;
55
+ virtual jsi::String accessibilityChannelStop(jsi::Runtime &rt) = 0;
56
+
57
+ };
58
+
59
+ template <typename T>
60
+ class JSI_EXPORT NativeLiveVoiceSdkCxxSpec : public TurboModule {
61
+ public:
62
+ jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
63
+ return delegate_.create(rt, propName);
64
+ }
65
+
66
+ std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
67
+ return delegate_.getPropertyNames(runtime);
68
+ }
69
+
70
+ static constexpr std::string_view kModuleName = "LiveVoiceModule";
71
+
72
+ protected:
73
+ NativeLiveVoiceSdkCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
74
+ : TurboModule(std::string{NativeLiveVoiceSdkCxxSpec::kModuleName}, jsInvoker),
75
+ delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
76
+
77
+ template <typename OnUiStateChangedType> void emitOnUiStateChanged(OnUiStateChangedType value) {
78
+ static_assert(bridging::supportsFromJs<OnUiStateChangedType, jsi::String>, "value cannnot be converted to jsi::String");
79
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*delegate_.eventEmitterMap_["onUiStateChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
80
+ return bridging::toJs(rt, eventValue, jsInvoker);
81
+ });
82
+ }
83
+
84
+ template <typename OnAudioOutputChangedType> void emitOnAudioOutputChanged(OnAudioOutputChangedType value) {
85
+ static_assert(bridging::supportsFromJs<OnAudioOutputChangedType, bool>, "value cannnot be converted to bool");
86
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*delegate_.eventEmitterMap_["onAudioOutputChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
87
+ return bridging::toJs(rt, eventValue, jsInvoker);
88
+ });
89
+ }
90
+
91
+ template <typename OnAvailableSubtitleConfigsChangedType> void emitOnAvailableSubtitleConfigsChanged(OnAvailableSubtitleConfigsChangedType value) {
92
+ static_assert(bridging::supportsFromJs<OnAvailableSubtitleConfigsChangedType, jsi::String>, "value cannnot be converted to jsi::String");
93
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*delegate_.eventEmitterMap_["onAvailableSubtitleConfigsChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
94
+ return bridging::toJs(rt, eventValue, jsInvoker);
95
+ });
96
+ }
97
+
98
+ template <typename OnSubtitlesChangedType> void emitOnSubtitlesChanged(OnSubtitlesChangedType value) {
99
+ static_assert(bridging::supportsFromJs<OnSubtitlesChangedType, jsi::String>, "value cannnot be converted to jsi::String");
100
+ static_cast<AsyncEventEmitter<jsi::Value>&>(*delegate_.eventEmitterMap_["onSubtitlesChanged"]).emit([jsInvoker = jsInvoker_, eventValue = value](jsi::Runtime& rt) -> jsi::Value {
101
+ return bridging::toJs(rt, eventValue, jsInvoker);
102
+ });
103
+ }
104
+
105
+ private:
106
+ class Delegate : public NativeLiveVoiceSdkCxxSpecJSI {
107
+ public:
108
+ Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
109
+ NativeLiveVoiceSdkCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
110
+ eventEmitterMap_["onUiStateChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
111
+ eventEmitterMap_["onAudioOutputChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
112
+ eventEmitterMap_["onAvailableSubtitleConfigsChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
113
+ eventEmitterMap_["onSubtitlesChanged"] = std::make_shared<AsyncEventEmitter<jsi::Value>>();
114
+ }
115
+
116
+ void initialize(jsi::Runtime &rt, std::optional<jsi::String> androidServiceConfig) override {
117
+ static_assert(
118
+ bridging::getParameterCount(&T::initialize) == 2,
119
+ "Expected initialize(...) to have 2 parameters");
120
+
121
+ return bridging::callFromJs<void>(
122
+ rt, &T::initialize, jsInvoker_, instance_, std::move(androidServiceConfig));
123
+ }
124
+ void joinEvent(jsi::Runtime &rt, jsi::String joinCode, std::optional<jsi::String> password, jsi::String apiKey) override {
125
+ static_assert(
126
+ bridging::getParameterCount(&T::joinEvent) == 4,
127
+ "Expected joinEvent(...) to have 4 parameters");
128
+
129
+ return bridging::callFromJs<void>(
130
+ rt, &T::joinEvent, jsInvoker_, instance_, std::move(joinCode), std::move(password), std::move(apiKey));
131
+ }
132
+ void leaveEvent(jsi::Runtime &rt) override {
133
+ static_assert(
134
+ bridging::getParameterCount(&T::leaveEvent) == 1,
135
+ "Expected leaveEvent(...) to have 1 parameters");
136
+
137
+ return bridging::callFromJs<void>(
138
+ rt, &T::leaveEvent, jsInvoker_, instance_);
139
+ }
140
+ void reconnect(jsi::Runtime &rt) override {
141
+ static_assert(
142
+ bridging::getParameterCount(&T::reconnect) == 1,
143
+ "Expected reconnect(...) to have 1 parameters");
144
+
145
+ return bridging::callFromJs<void>(
146
+ rt, &T::reconnect, jsInvoker_, instance_);
147
+ }
148
+ std::optional<jsi::String> getCurrentClaims(jsi::Runtime &rt) override {
149
+ static_assert(
150
+ bridging::getParameterCount(&T::getCurrentClaims) == 1,
151
+ "Expected getCurrentClaims(...) to have 1 parameters");
152
+
153
+ return bridging::callFromJs<std::optional<jsi::String>>(
154
+ rt, &T::getCurrentClaims, jsInvoker_, instance_);
155
+ }
156
+ jsi::String getCurrentUiState(jsi::Runtime &rt) override {
157
+ static_assert(
158
+ bridging::getParameterCount(&T::getCurrentUiState) == 1,
159
+ "Expected getCurrentUiState(...) to have 1 parameters");
160
+
161
+ return bridging::callFromJs<jsi::String>(
162
+ rt, &T::getCurrentUiState, jsInvoker_, instance_);
163
+ }
164
+ bool getCurrentAudioState(jsi::Runtime &rt) override {
165
+ static_assert(
166
+ bridging::getParameterCount(&T::getCurrentAudioState) == 1,
167
+ "Expected getCurrentAudioState(...) to have 1 parameters");
168
+
169
+ return bridging::callFromJs<bool>(
170
+ rt, &T::getCurrentAudioState, jsInvoker_, instance_);
171
+ }
172
+ jsi::String getCurrentSubtitles(jsi::Runtime &rt) override {
173
+ static_assert(
174
+ bridging::getParameterCount(&T::getCurrentSubtitles) == 1,
175
+ "Expected getCurrentSubtitles(...) to have 1 parameters");
176
+
177
+ return bridging::callFromJs<jsi::String>(
178
+ rt, &T::getCurrentSubtitles, jsInvoker_, instance_);
179
+ }
180
+ jsi::String getCurrentAvailableSubtitleConfigs(jsi::Runtime &rt) override {
181
+ static_assert(
182
+ bridging::getParameterCount(&T::getCurrentAvailableSubtitleConfigs) == 1,
183
+ "Expected getCurrentAvailableSubtitleConfigs(...) to have 1 parameters");
184
+
185
+ return bridging::callFromJs<jsi::String>(
186
+ rt, &T::getCurrentAvailableSubtitleConfigs, jsInvoker_, instance_);
187
+ }
188
+ void setLiveVoiceUseSpeaker(jsi::Runtime &rt, bool value) override {
189
+ static_assert(
190
+ bridging::getParameterCount(&T::setLiveVoiceUseSpeaker) == 2,
191
+ "Expected setLiveVoiceUseSpeaker(...) to have 2 parameters");
192
+
193
+ return bridging::callFromJs<void>(
194
+ rt, &T::setLiveVoiceUseSpeaker, jsInvoker_, instance_, std::move(value));
195
+ }
196
+ void startChannel(jsi::Runtime &rt, double id) override {
197
+ static_assert(
198
+ bridging::getParameterCount(&T::startChannel) == 2,
199
+ "Expected startChannel(...) to have 2 parameters");
200
+
201
+ return bridging::callFromJs<void>(
202
+ rt, &T::startChannel, jsInvoker_, instance_, std::move(id));
203
+ }
204
+ void stopChannel(jsi::Runtime &rt) override {
205
+ static_assert(
206
+ bridging::getParameterCount(&T::stopChannel) == 1,
207
+ "Expected stopChannel(...) to have 1 parameters");
208
+
209
+ return bridging::callFromJs<void>(
210
+ rt, &T::stopChannel, jsInvoker_, instance_);
211
+ }
212
+ void startSubtitles(jsi::Runtime &rt, double channelId, std::optional<jsi::String> languageCode) override {
213
+ static_assert(
214
+ bridging::getParameterCount(&T::startSubtitles) == 3,
215
+ "Expected startSubtitles(...) to have 3 parameters");
216
+
217
+ return bridging::callFromJs<void>(
218
+ rt, &T::startSubtitles, jsInvoker_, instance_, std::move(channelId), std::move(languageCode));
219
+ }
220
+ void stopSubtitles(jsi::Runtime &rt) override {
221
+ static_assert(
222
+ bridging::getParameterCount(&T::stopSubtitles) == 1,
223
+ "Expected stopSubtitles(...) to have 1 parameters");
224
+
225
+ return bridging::callFromJs<void>(
226
+ rt, &T::stopSubtitles, jsInvoker_, instance_);
227
+ }
228
+ jsi::String channelStatusOffline(jsi::Runtime &rt) override {
229
+ static_assert(
230
+ bridging::getParameterCount(&T::channelStatusOffline) == 1,
231
+ "Expected channelStatusOffline(...) to have 1 parameters");
232
+
233
+ return bridging::callFromJs<jsi::String>(
234
+ rt, &T::channelStatusOffline, jsInvoker_, instance_);
235
+ }
236
+ jsi::String noChannels(jsi::Runtime &rt) override {
237
+ static_assert(
238
+ bridging::getParameterCount(&T::noChannels) == 1,
239
+ "Expected noChannels(...) to have 1 parameters");
240
+
241
+ return bridging::callFromJs<jsi::String>(
242
+ rt, &T::noChannels, jsInvoker_, instance_);
243
+ }
244
+ jsi::String isAiChannelStatusMessage(jsi::Runtime &rt) override {
245
+ static_assert(
246
+ bridging::getParameterCount(&T::isAiChannelStatusMessage) == 1,
247
+ "Expected isAiChannelStatusMessage(...) to have 1 parameters");
248
+
249
+ return bridging::callFromJs<jsi::String>(
250
+ rt, &T::isAiChannelStatusMessage, jsInvoker_, instance_);
251
+ }
252
+ jsi::String sdkNoMatchingChannels(jsi::Runtime &rt) override {
253
+ static_assert(
254
+ bridging::getParameterCount(&T::sdkNoMatchingChannels) == 1,
255
+ "Expected sdkNoMatchingChannels(...) to have 1 parameters");
256
+
257
+ return bridging::callFromJs<jsi::String>(
258
+ rt, &T::sdkNoMatchingChannels, jsInvoker_, instance_);
259
+ }
260
+ jsi::String errorScreenRetrying(jsi::Runtime &rt) override {
261
+ static_assert(
262
+ bridging::getParameterCount(&T::errorScreenRetrying) == 1,
263
+ "Expected errorScreenRetrying(...) to have 1 parameters");
264
+
265
+ return bridging::callFromJs<jsi::String>(
266
+ rt, &T::errorScreenRetrying, jsInvoker_, instance_);
267
+ }
268
+ jsi::String errorScreenRetryingIn(jsi::Runtime &rt, double seconds) override {
269
+ static_assert(
270
+ bridging::getParameterCount(&T::errorScreenRetryingIn) == 2,
271
+ "Expected errorScreenRetryingIn(...) to have 2 parameters");
272
+
273
+ return bridging::callFromJs<jsi::String>(
274
+ rt, &T::errorScreenRetryingIn, jsInvoker_, instance_, std::move(seconds));
275
+ }
276
+ jsi::String sdkErrorGeneric(jsi::Runtime &rt) override {
277
+ static_assert(
278
+ bridging::getParameterCount(&T::sdkErrorGeneric) == 1,
279
+ "Expected sdkErrorGeneric(...) to have 1 parameters");
280
+
281
+ return bridging::callFromJs<jsi::String>(
282
+ rt, &T::sdkErrorGeneric, jsInvoker_, instance_);
283
+ }
284
+ jsi::String sdkErrorInactive(jsi::Runtime &rt) override {
285
+ static_assert(
286
+ bridging::getParameterCount(&T::sdkErrorInactive) == 1,
287
+ "Expected sdkErrorInactive(...) to have 1 parameters");
288
+
289
+ return bridging::callFromJs<jsi::String>(
290
+ rt, &T::sdkErrorInactive, jsInvoker_, instance_);
291
+ }
292
+ jsi::String sdkErrorInvalidApiKey(jsi::Runtime &rt) override {
293
+ static_assert(
294
+ bridging::getParameterCount(&T::sdkErrorInvalidApiKey) == 1,
295
+ "Expected sdkErrorInvalidApiKey(...) to have 1 parameters");
296
+
297
+ return bridging::callFromJs<jsi::String>(
298
+ rt, &T::sdkErrorInvalidApiKey, jsInvoker_, instance_);
299
+ }
300
+ jsi::String sdkErrorListenerLimitReached(jsi::Runtime &rt) override {
301
+ static_assert(
302
+ bridging::getParameterCount(&T::sdkErrorListenerLimitReached) == 1,
303
+ "Expected sdkErrorListenerLimitReached(...) to have 1 parameters");
304
+
305
+ return bridging::callFromJs<jsi::String>(
306
+ rt, &T::sdkErrorListenerLimitReached, jsInvoker_, instance_);
307
+ }
308
+ jsi::String sdkErrorNoNetwork(jsi::Runtime &rt) override {
309
+ static_assert(
310
+ bridging::getParameterCount(&T::sdkErrorNoNetwork) == 1,
311
+ "Expected sdkErrorNoNetwork(...) to have 1 parameters");
312
+
313
+ return bridging::callFromJs<jsi::String>(
314
+ rt, &T::sdkErrorNoNetwork, jsInvoker_, instance_);
315
+ }
316
+ jsi::String sdkErrorNotFound(jsi::Runtime &rt) override {
317
+ static_assert(
318
+ bridging::getParameterCount(&T::sdkErrorNotFound) == 1,
319
+ "Expected sdkErrorNotFound(...) to have 1 parameters");
320
+
321
+ return bridging::callFromJs<jsi::String>(
322
+ rt, &T::sdkErrorNotFound, jsInvoker_, instance_);
323
+ }
324
+ jsi::String sdkErrorRequestFailed(jsi::Runtime &rt, double errorCode) override {
325
+ static_assert(
326
+ bridging::getParameterCount(&T::sdkErrorRequestFailed) == 2,
327
+ "Expected sdkErrorRequestFailed(...) to have 2 parameters");
328
+
329
+ return bridging::callFromJs<jsi::String>(
330
+ rt, &T::sdkErrorRequestFailed, jsInvoker_, instance_, std::move(errorCode));
331
+ }
332
+ jsi::String sdkErrorWrongPassword(jsi::Runtime &rt) override {
333
+ static_assert(
334
+ bridging::getParameterCount(&T::sdkErrorWrongPassword) == 1,
335
+ "Expected sdkErrorWrongPassword(...) to have 1 parameters");
336
+
337
+ return bridging::callFromJs<jsi::String>(
338
+ rt, &T::sdkErrorWrongPassword, jsInvoker_, instance_);
339
+ }
340
+ jsi::String streamingByTitle(jsi::Runtime &rt) override {
341
+ static_assert(
342
+ bridging::getParameterCount(&T::streamingByTitle) == 1,
343
+ "Expected streamingByTitle(...) to have 1 parameters");
344
+
345
+ return bridging::callFromJs<jsi::String>(
346
+ rt, &T::streamingByTitle, jsInvoker_, instance_);
347
+ }
348
+ jsi::String errorRetryNowButton(jsi::Runtime &rt) override {
349
+ static_assert(
350
+ bridging::getParameterCount(&T::errorRetryNowButton) == 1,
351
+ "Expected errorRetryNowButton(...) to have 1 parameters");
352
+
353
+ return bridging::callFromJs<jsi::String>(
354
+ rt, &T::errorRetryNowButton, jsInvoker_, instance_);
355
+ }
356
+ jsi::String accessibilityChannelPlay(jsi::Runtime &rt) override {
357
+ static_assert(
358
+ bridging::getParameterCount(&T::accessibilityChannelPlay) == 1,
359
+ "Expected accessibilityChannelPlay(...) to have 1 parameters");
360
+
361
+ return bridging::callFromJs<jsi::String>(
362
+ rt, &T::accessibilityChannelPlay, jsInvoker_, instance_);
363
+ }
364
+ jsi::String accessibilityChannelStatusMuted(jsi::Runtime &rt) override {
365
+ static_assert(
366
+ bridging::getParameterCount(&T::accessibilityChannelStatusMuted) == 1,
367
+ "Expected accessibilityChannelStatusMuted(...) to have 1 parameters");
368
+
369
+ return bridging::callFromJs<jsi::String>(
370
+ rt, &T::accessibilityChannelStatusMuted, jsInvoker_, instance_);
371
+ }
372
+ jsi::String accessibilityChannelStop(jsi::Runtime &rt) override {
373
+ static_assert(
374
+ bridging::getParameterCount(&T::accessibilityChannelStop) == 1,
375
+ "Expected accessibilityChannelStop(...) to have 1 parameters");
376
+
377
+ return bridging::callFromJs<jsi::String>(
378
+ rt, &T::accessibilityChannelStop, jsInvoker_, instance_);
379
+ }
380
+
381
+ private:
382
+ friend class NativeLiveVoiceSdkCxxSpec;
383
+ T *instance_;
384
+ };
385
+
386
+ Delegate delegate_;
387
+ };
388
+
389
+ } // namespace facebook::react