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
@@ -1,292 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleObjCpp
8
- *
9
- * We create an umbrella header (and corresponding implementation) here since
10
- * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
- * must have a single output. More files => more genrule()s => slower builds.
12
- */
13
-
14
- #import "RNLiveVoiceSpec.h"
15
-
16
-
17
- @implementation NativeLiveVoiceSdkSpecBase
18
- - (void)emitOnUiStateChanged:(NSString *_Nonnull)value
19
- {
20
- _eventEmitterCallback("onUiStateChanged", value);
21
- }
22
- - (void)emitOnAudioOutputChanged:(BOOL)value
23
- {
24
- _eventEmitterCallback("onAudioOutputChanged", [NSNumber numberWithBool:value]);
25
- }
26
- - (void)emitOnAvailableSubtitleConfigsChanged:(NSString *_Nonnull)value
27
- {
28
- _eventEmitterCallback("onAvailableSubtitleConfigsChanged", value);
29
- }
30
- - (void)emitOnSubtitlesChanged:(NSString *_Nonnull)value
31
- {
32
- _eventEmitterCallback("onSubtitlesChanged", value);
33
- }
34
-
35
- - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper
36
- {
37
- _eventEmitterCallback = std::move(eventEmitterCallbackWrapper->_eventEmitterCallback);
38
- }
39
- @end
40
-
41
-
42
- namespace facebook::react {
43
-
44
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_initialize(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
45
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "initialize", @selector(initialize:), args, count);
46
- }
47
-
48
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_joinEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
49
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "joinEvent", @selector(joinEvent:password:apiKey:), args, count);
50
- }
51
-
52
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_leaveEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
53
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "leaveEvent", @selector(leaveEvent), args, count);
54
- }
55
-
56
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_reconnect(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
57
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "reconnect", @selector(reconnect), args, count);
58
- }
59
-
60
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentClaims(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
61
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentClaims", @selector(getCurrentClaims), args, count);
62
- }
63
-
64
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentUiState(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
65
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentUiState", @selector(getCurrentUiState), args, count);
66
- }
67
-
68
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAudioState(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
69
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, BooleanKind, "getCurrentAudioState", @selector(getCurrentAudioState), args, count);
70
- }
71
-
72
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
73
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentSubtitles", @selector(getCurrentSubtitles), args, count);
74
- }
75
-
76
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAvailableSubtitleConfigs(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
77
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "getCurrentAvailableSubtitleConfigs", @selector(getCurrentAvailableSubtitleConfigs), args, count);
78
- }
79
-
80
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_setLiveVoiceUseSpeaker(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
81
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "setLiveVoiceUseSpeaker", @selector(setLiveVoiceUseSpeaker:), args, count);
82
- }
83
-
84
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_startChannel(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
85
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "startChannel", @selector(startChannel:), args, count);
86
- }
87
-
88
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
89
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "stopChannel", @selector(stopChannel), args, count);
90
- }
91
-
92
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
93
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "startSubtitles", @selector(startSubtitles:languageCode:), args, count);
94
- }
95
-
96
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
97
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "stopSubtitles", @selector(stopSubtitles), args, count);
98
- }
99
-
100
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_openLiveVoiceWebsite(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
101
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, VoidKind, "openLiveVoiceWebsite", @selector(openLiveVoiceWebsite), args, count);
102
- }
103
-
104
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_channelStatusOffline(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
105
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "channelStatusOffline", @selector(channelStatusOffline), args, count);
106
- }
107
-
108
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_noChannels(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
109
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "noChannels", @selector(noChannels), args, count);
110
- }
111
-
112
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_isAiChannelStatusMessage(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
113
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "isAiChannelStatusMessage", @selector(isAiChannelStatusMessage), args, count);
114
- }
115
-
116
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkNoMatchingChannels(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
117
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkNoMatchingChannels", @selector(sdkNoMatchingChannels), args, count);
118
- }
119
-
120
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetrying(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
121
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "errorScreenRetrying", @selector(errorScreenRetrying), args, count);
122
- }
123
-
124
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetryingIn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
125
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "errorScreenRetryingIn", @selector(errorScreenRetryingIn:), args, count);
126
- }
127
-
128
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorGeneric(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
129
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorGeneric", @selector(sdkErrorGeneric), args, count);
130
- }
131
-
132
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInactive(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
133
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorInactive", @selector(sdkErrorInactive), args, count);
134
- }
135
-
136
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInvalidApiKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
137
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorInvalidApiKey", @selector(sdkErrorInvalidApiKey), args, count);
138
- }
139
-
140
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorListenerLimitReached(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
141
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorListenerLimitReached", @selector(sdkErrorListenerLimitReached), args, count);
142
- }
143
-
144
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNoNetwork(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
145
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorNoNetwork", @selector(sdkErrorNoNetwork), args, count);
146
- }
147
-
148
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNotFound(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
149
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorNotFound", @selector(sdkErrorNotFound), args, count);
150
- }
151
-
152
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorRequestFailed(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
153
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorRequestFailed", @selector(sdkErrorRequestFailed:), args, count);
154
- }
155
-
156
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorWrongPassword(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
157
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "sdkErrorWrongPassword", @selector(sdkErrorWrongPassword), args, count);
158
- }
159
-
160
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_streamingByTitle(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
161
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "streamingByTitle", @selector(streamingByTitle), args, count);
162
- }
163
-
164
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorRetryNowButton(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
165
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "errorRetryNowButton", @selector(errorRetryNowButton), args, count);
166
- }
167
-
168
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelPlay(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
169
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "accessibilityChannelPlay", @selector(accessibilityChannelPlay), args, count);
170
- }
171
-
172
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStatusMuted(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
173
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "accessibilityChannelStatusMuted", @selector(accessibilityChannelStatusMuted), args, count);
174
- }
175
-
176
- static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStop(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
177
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, StringKind, "accessibilityChannelStop", @selector(accessibilityChannelStop), args, count);
178
- }
179
-
180
- NativeLiveVoiceSdkSpecJSI::NativeLiveVoiceSdkSpecJSI(const ObjCTurboModule::InitParams &params)
181
- : ObjCTurboModule(params) {
182
-
183
- methodMap_["initialize"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_initialize};
184
-
185
-
186
- methodMap_["joinEvent"] = MethodMetadata {3, __hostFunction_NativeLiveVoiceSdkSpecJSI_joinEvent};
187
-
188
-
189
- methodMap_["leaveEvent"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_leaveEvent};
190
-
191
-
192
- methodMap_["reconnect"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_reconnect};
193
-
194
-
195
- methodMap_["getCurrentClaims"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentClaims};
196
-
197
-
198
- methodMap_["getCurrentUiState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentUiState};
199
-
200
-
201
- methodMap_["getCurrentAudioState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAudioState};
202
-
203
-
204
- methodMap_["getCurrentSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentSubtitles};
205
-
206
-
207
- methodMap_["getCurrentAvailableSubtitleConfigs"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAvailableSubtitleConfigs};
208
-
209
-
210
- methodMap_["setLiveVoiceUseSpeaker"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_setLiveVoiceUseSpeaker};
211
-
212
-
213
- methodMap_["startChannel"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_startChannel};
214
-
215
-
216
- methodMap_["stopChannel"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel};
217
-
218
-
219
- methodMap_["startSubtitles"] = MethodMetadata {2, __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles};
220
-
221
-
222
- methodMap_["stopSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles};
223
-
224
-
225
- methodMap_["openLiveVoiceWebsite"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_openLiveVoiceWebsite};
226
-
227
-
228
- methodMap_["channelStatusOffline"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_channelStatusOffline};
229
-
230
-
231
- methodMap_["noChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_noChannels};
232
-
233
-
234
- methodMap_["isAiChannelStatusMessage"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_isAiChannelStatusMessage};
235
-
236
-
237
- methodMap_["sdkNoMatchingChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkNoMatchingChannels};
238
-
239
-
240
- methodMap_["errorScreenRetrying"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetrying};
241
-
242
-
243
- methodMap_["errorScreenRetryingIn"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetryingIn};
244
-
245
-
246
- methodMap_["sdkErrorGeneric"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorGeneric};
247
-
248
-
249
- methodMap_["sdkErrorInactive"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInactive};
250
-
251
-
252
- methodMap_["sdkErrorInvalidApiKey"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInvalidApiKey};
253
-
254
-
255
- methodMap_["sdkErrorListenerLimitReached"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorListenerLimitReached};
256
-
257
-
258
- methodMap_["sdkErrorNoNetwork"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNoNetwork};
259
-
260
-
261
- methodMap_["sdkErrorNotFound"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNotFound};
262
-
263
-
264
- methodMap_["sdkErrorRequestFailed"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorRequestFailed};
265
-
266
-
267
- methodMap_["sdkErrorWrongPassword"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorWrongPassword};
268
-
269
-
270
- methodMap_["streamingByTitle"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_streamingByTitle};
271
-
272
-
273
- methodMap_["errorRetryNowButton"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorRetryNowButton};
274
-
275
-
276
- methodMap_["accessibilityChannelPlay"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelPlay};
277
-
278
-
279
- methodMap_["accessibilityChannelStatusMuted"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStatusMuted};
280
-
281
-
282
- methodMap_["accessibilityChannelStop"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStop};
283
-
284
- eventEmitterMap_["onUiStateChanged"] = std::make_shared<AsyncEventEmitter<id>>();
285
- eventEmitterMap_["onAudioOutputChanged"] = std::make_shared<AsyncEventEmitter<id>>();
286
- eventEmitterMap_["onAvailableSubtitleConfigsChanged"] = std::make_shared<AsyncEventEmitter<id>>();
287
- eventEmitterMap_["onSubtitlesChanged"] = std::make_shared<AsyncEventEmitter<id>>();
288
- setEventEmitterCallback([&](const std::string &name, id value) {
289
- static_cast<AsyncEventEmitter<id> &>(*eventEmitterMap_[name]).emit(value);
290
- });
291
- }
292
- } // namespace facebook::react
@@ -1,101 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleObjCpp
8
- *
9
- * We create an umbrella header (and corresponding implementation) here since
10
- * Cxx compilation in BUCK has a limitation: source-code producing genrule()s
11
- * must have a single output. More files => more genrule()s => slower builds.
12
- */
13
-
14
- #ifndef __cplusplus
15
- #error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
16
- #endif
17
-
18
- // Avoid multiple includes of RNLiveVoiceSpec symbols
19
- #ifndef RNLiveVoiceSpec_H
20
- #define RNLiveVoiceSpec_H
21
-
22
- #import <Foundation/Foundation.h>
23
- #import <RCTRequired/RCTRequired.h>
24
- #import <RCTTypeSafety/RCTConvertHelpers.h>
25
- #import <RCTTypeSafety/RCTTypedModuleConstants.h>
26
- #import <React/RCTBridgeModule.h>
27
- #import <React/RCTCxxConvert.h>
28
- #import <React/RCTManagedPointer.h>
29
- #import <ReactCommon/RCTTurboModule.h>
30
- #import <optional>
31
- #import <vector>
32
-
33
-
34
- NS_ASSUME_NONNULL_BEGIN
35
-
36
- @protocol NativeLiveVoiceSdkSpec <RCTBridgeModule, RCTTurboModule>
37
-
38
- - (void)initialize:(NSString * _Nullable)androidServiceConfig;
39
- - (void)joinEvent:(NSString *)joinCode
40
- password:(NSString * _Nullable)password
41
- apiKey:(NSString *)apiKey;
42
- - (void)leaveEvent;
43
- - (void)reconnect;
44
- - (NSString * _Nullable)getCurrentClaims;
45
- - (NSString *)getCurrentUiState;
46
- - (NSNumber *)getCurrentAudioState;
47
- - (NSString *)getCurrentSubtitles;
48
- - (NSString *)getCurrentAvailableSubtitleConfigs;
49
- - (void)setLiveVoiceUseSpeaker:(BOOL)value;
50
- - (void)startChannel:(double)id;
51
- - (void)stopChannel;
52
- - (void)startSubtitles:(double)channelId
53
- languageCode:(NSString * _Nullable)languageCode;
54
- - (void)stopSubtitles;
55
- - (void)openLiveVoiceWebsite;
56
- - (NSString *)channelStatusOffline;
57
- - (NSString *)noChannels;
58
- - (NSString *)isAiChannelStatusMessage;
59
- - (NSString *)sdkNoMatchingChannels;
60
- - (NSString *)errorScreenRetrying;
61
- - (NSString *)errorScreenRetryingIn:(double)seconds;
62
- - (NSString *)sdkErrorGeneric;
63
- - (NSString *)sdkErrorInactive;
64
- - (NSString *)sdkErrorInvalidApiKey;
65
- - (NSString *)sdkErrorListenerLimitReached;
66
- - (NSString *)sdkErrorNoNetwork;
67
- - (NSString *)sdkErrorNotFound;
68
- - (NSString *)sdkErrorRequestFailed:(double)errorCode;
69
- - (NSString *)sdkErrorWrongPassword;
70
- - (NSString *)streamingByTitle;
71
- - (NSString *)errorRetryNowButton;
72
- - (NSString *)accessibilityChannelPlay;
73
- - (NSString *)accessibilityChannelStatusMuted;
74
- - (NSString *)accessibilityChannelStop;
75
-
76
- @end
77
-
78
- @interface NativeLiveVoiceSdkSpecBase : NSObject {
79
- @protected
80
- facebook::react::EventEmitterCallback _eventEmitterCallback;
81
- }
82
- - (void)setEventEmitterCallback:(EventEmitterCallbackWrapper *)eventEmitterCallbackWrapper;
83
-
84
- - (void)emitOnUiStateChanged:(NSString *_Nonnull)value;
85
- - (void)emitOnAudioOutputChanged:(BOOL)value;
86
- - (void)emitOnAvailableSubtitleConfigsChanged:(NSString *_Nonnull)value;
87
- - (void)emitOnSubtitlesChanged:(NSString *_Nonnull)value;
88
- @end
89
-
90
- namespace facebook::react {
91
- /**
92
- * ObjC++ class for module 'NativeLiveVoiceSdk'
93
- */
94
- class JSI_EXPORT NativeLiveVoiceSdkSpecJSI : public ObjCTurboModule {
95
- public:
96
- NativeLiveVoiceSdkSpecJSI(const ObjCTurboModule::InitParams &params);
97
- };
98
- } // namespace facebook::react
99
-
100
- NS_ASSUME_NONNULL_END
101
- #endif // RNLiveVoiceSpec_H
@@ -1,245 +0,0 @@
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_openLiveVoiceWebsite(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
103
- static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->openLiveVoiceWebsite(
104
- rt
105
- );
106
- return jsi::Value::undefined();
107
- }
108
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_channelStatusOffline(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
109
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->channelStatusOffline(
110
- rt
111
- );
112
- }
113
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_noChannels(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
114
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->noChannels(
115
- rt
116
- );
117
- }
118
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_isAiChannelStatusMessage(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
119
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->isAiChannelStatusMessage(
120
- rt
121
- );
122
- }
123
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkNoMatchingChannels(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
124
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkNoMatchingChannels(
125
- rt
126
- );
127
- }
128
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetrying(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
129
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->errorScreenRetrying(
130
- rt
131
- );
132
- }
133
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetryingIn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
134
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->errorScreenRetryingIn(
135
- rt,
136
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
137
- );
138
- }
139
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorGeneric(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
140
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorGeneric(
141
- rt
142
- );
143
- }
144
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInactive(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
145
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorInactive(
146
- rt
147
- );
148
- }
149
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInvalidApiKey(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
150
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorInvalidApiKey(
151
- rt
152
- );
153
- }
154
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorListenerLimitReached(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
155
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorListenerLimitReached(
156
- rt
157
- );
158
- }
159
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNoNetwork(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
160
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorNoNetwork(
161
- rt
162
- );
163
- }
164
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNotFound(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
165
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorNotFound(
166
- rt
167
- );
168
- }
169
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorRequestFailed(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
170
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorRequestFailed(
171
- rt,
172
- count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber()
173
- );
174
- }
175
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorWrongPassword(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
176
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->sdkErrorWrongPassword(
177
- rt
178
- );
179
- }
180
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_streamingByTitle(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
181
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->streamingByTitle(
182
- rt
183
- );
184
- }
185
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorRetryNowButton(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
186
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->errorRetryNowButton(
187
- rt
188
- );
189
- }
190
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelPlay(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
191
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->accessibilityChannelPlay(
192
- rt
193
- );
194
- }
195
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStatusMuted(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
196
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->accessibilityChannelStatusMuted(
197
- rt
198
- );
199
- }
200
- static jsi::Value __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
201
- return static_cast<NativeLiveVoiceSdkCxxSpecJSI *>(&turboModule)->accessibilityChannelStop(
202
- rt
203
- );
204
- }
205
-
206
- NativeLiveVoiceSdkCxxSpecJSI::NativeLiveVoiceSdkCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
207
- : TurboModule("LiveVoiceModule", jsInvoker) {
208
- methodMap_["initialize"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_initialize};
209
- methodMap_["joinEvent"] = MethodMetadata {3, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_joinEvent};
210
- methodMap_["leaveEvent"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_leaveEvent};
211
- methodMap_["reconnect"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_reconnect};
212
- methodMap_["getCurrentClaims"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentClaims};
213
- methodMap_["getCurrentUiState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentUiState};
214
- methodMap_["getCurrentAudioState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentAudioState};
215
- methodMap_["getCurrentSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentSubtitles};
216
- methodMap_["getCurrentAvailableSubtitleConfigs"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_getCurrentAvailableSubtitleConfigs};
217
- methodMap_["setLiveVoiceUseSpeaker"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_setLiveVoiceUseSpeaker};
218
- methodMap_["startChannel"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_startChannel};
219
- methodMap_["stopChannel"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_stopChannel};
220
- methodMap_["startSubtitles"] = MethodMetadata {2, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_startSubtitles};
221
- methodMap_["stopSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_stopSubtitles};
222
- methodMap_["openLiveVoiceWebsite"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_openLiveVoiceWebsite};
223
- methodMap_["channelStatusOffline"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_channelStatusOffline};
224
- methodMap_["noChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_noChannels};
225
- methodMap_["isAiChannelStatusMessage"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_isAiChannelStatusMessage};
226
- methodMap_["sdkNoMatchingChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkNoMatchingChannels};
227
- methodMap_["errorScreenRetrying"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetrying};
228
- methodMap_["errorScreenRetryingIn"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorScreenRetryingIn};
229
- methodMap_["sdkErrorGeneric"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorGeneric};
230
- methodMap_["sdkErrorInactive"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInactive};
231
- methodMap_["sdkErrorInvalidApiKey"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorInvalidApiKey};
232
- methodMap_["sdkErrorListenerLimitReached"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorListenerLimitReached};
233
- methodMap_["sdkErrorNoNetwork"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNoNetwork};
234
- methodMap_["sdkErrorNotFound"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorNotFound};
235
- methodMap_["sdkErrorRequestFailed"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorRequestFailed};
236
- methodMap_["sdkErrorWrongPassword"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_sdkErrorWrongPassword};
237
- methodMap_["streamingByTitle"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_streamingByTitle};
238
- methodMap_["errorRetryNowButton"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_errorRetryNowButton};
239
- methodMap_["accessibilityChannelPlay"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelPlay};
240
- methodMap_["accessibilityChannelStatusMuted"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStatusMuted};
241
- methodMap_["accessibilityChannelStop"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkCxxSpecJSI_accessibilityChannelStop};
242
- }
243
-
244
-
245
- } // namespace facebook::react