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
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 LiveVoice GmbH
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # livevoice-sdk-react-native
2
+
3
+ The React Native SDK for integrating the LiveVoice service into your app.
4
+
5
+ ## Overview
6
+
7
+ The LiveVoice SDK enables your app to browse and listen to your configured LiveVoice channels as
8
+ well as present a channel's live subtitles if available.
9
+
10
+ Using the LiveVoice SDK requires an account with SDK access enabled. Depending on your subscription,
11
+ the SDK allows for hiding the LiveVoice branding or using a fully customized presentation. For more
12
+ information contact sdk-support@livevoice.io . Once SDK access has been granted, you can see your
13
+ personal API-key at the bottom of your account page at https://livevoice.io/en/account .
@@ -0,0 +1,135 @@
1
+ buildscript {
2
+ ext.getExtOrDefault = { name ->
3
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['LiveVoiceSdkReactNative_' + name]
4
+ }
5
+
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ }
10
+
11
+ dependencies {
12
+ classpath "com.android.tools.build:gradle:8.7.2"
13
+ // noinspection DifferentKotlinGradleVersion
14
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
+ classpath "org.jetbrains.kotlin:kotlin-serialization:${getExtOrDefault('kotlinVersion')}"
16
+ }
17
+ }
18
+
19
+
20
+ def isNewArchitectureEnabled() {
21
+ return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
22
+ }
23
+
24
+ apply plugin: "com.android.library"
25
+ apply plugin: "kotlin-android"
26
+ apply plugin: "kotlinx-serialization"
27
+
28
+ if (isNewArchitectureEnabled()) {
29
+ apply plugin: "com.facebook.react"
30
+ }
31
+
32
+ def getExtOrIntegerDefault(name) {
33
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["LiveVoiceSdkReactNative_" + name]).toInteger()
34
+ }
35
+
36
+ def supportsNamespace() {
37
+ def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
38
+ def major = parsed[0].toInteger()
39
+ def minor = parsed[1].toInteger()
40
+
41
+ // Namespace support was added in 7.3.0
42
+ return (major == 7 && minor >= 3) || major >= 8
43
+ }
44
+
45
+ android {
46
+ if (supportsNamespace()) {
47
+ namespace "com.livevoicesdkreactnative"
48
+
49
+ sourceSets {
50
+ main {
51
+ manifest.srcFile "src/main/AndroidManifestNew.xml"
52
+ }
53
+ }
54
+ }
55
+
56
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
57
+
58
+ defaultConfig {
59
+ minSdkVersion getExtOrIntegerDefault("minSdkVersion")
60
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
61
+ buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
62
+ }
63
+
64
+ buildFeatures {
65
+ buildConfig true
66
+ }
67
+
68
+ buildTypes {
69
+ release {
70
+ minifyEnabled false
71
+ }
72
+ }
73
+
74
+ lintOptions {
75
+ disable "GradleCompatible"
76
+ }
77
+
78
+ compileOptions {
79
+ sourceCompatibility JavaVersion.VERSION_1_8
80
+ targetCompatibility JavaVersion.VERSION_1_8
81
+ }
82
+
83
+ sourceSets {
84
+ main {
85
+ // if (isNewArchitectureEnabled()) {
86
+ java.srcDirs += [
87
+ "generated/java",
88
+ "generated/jni"
89
+ ]
90
+ // }
91
+ }
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Add the needed repositories to all gradle projects.
97
+ *
98
+ * This is needed, because react somehow doesn't honor/use the sources
99
+ * configured in the sdk "build.gradle"'s "repositories" block.
100
+ *
101
+ * By applying it recursively, starting from the "root" project, we circumvent this!
102
+ * see: https://github.com/facebook/react-native/issues/39114
103
+ */
104
+ rootProject.allprojects { Project project ->
105
+ println "Adding livevoice repository to project \"$project.name\""
106
+ project.repositories {
107
+ maven { url "https://jitpack.io" }
108
+ maven { url "https://sdks.livevoice.io/android" }
109
+ }
110
+ }
111
+
112
+ repositories {
113
+ mavenCentral()
114
+ google()
115
+ }
116
+
117
+ def kotlin_version = getExtOrDefault("kotlinVersion")
118
+
119
+ dependencies {
120
+ implementation "com.facebook.react:react-android:0.78.1"
121
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
122
+
123
+ implementation("io.livevoice.sdk:android:1.0.0")
124
+
125
+ implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.0")
126
+ implementation("com.jakewharton.timber:timber:5.0.1")
127
+ }
128
+
129
+ if (isNewArchitectureEnabled()) {
130
+ react {
131
+ jsRootDir = file("../src/")
132
+ libraryName = "LiveVoiceSdkReactNative"
133
+ codegenJavaPackageName = "com.livevoicesdkreactnative"
134
+ }
135
+ }
@@ -0,0 +1,182 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJavaSpec.js
9
+ *
10
+ * @nolint
11
+ */
12
+
13
+ package io.livevoice.react;
14
+
15
+ import com.facebook.proguard.annotations.DoNotStrip;
16
+ import com.facebook.react.bridge.ReactApplicationContext;
17
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
18
+ import com.facebook.react.bridge.ReactMethod;
19
+ import com.facebook.react.turbomodule.core.interfaces.TurboModule;
20
+ import javax.annotation.Nonnull;
21
+ import javax.annotation.Nullable;
22
+
23
+ public abstract class NativeLiveVoiceSdkSpec extends ReactContextBaseJavaModule implements TurboModule {
24
+ public static final String NAME = "LiveVoiceModule";
25
+
26
+ public NativeLiveVoiceSdkSpec(ReactApplicationContext reactContext) {
27
+ super(reactContext);
28
+ }
29
+
30
+ @Override
31
+ public @Nonnull String getName() {
32
+ return NAME;
33
+ }
34
+
35
+ protected final void emitOnUiStateChanged(String value) {
36
+ mEventEmitterCallback.invoke("onUiStateChanged", value);
37
+ }
38
+
39
+ protected final void emitOnAudioOutputChanged(boolean value) {
40
+ mEventEmitterCallback.invoke("onAudioOutputChanged", value);
41
+ }
42
+
43
+ protected final void emitOnAvailableSubtitleConfigsChanged(String value) {
44
+ mEventEmitterCallback.invoke("onAvailableSubtitleConfigsChanged", value);
45
+ }
46
+
47
+ protected final void emitOnSubtitlesChanged(String value) {
48
+ mEventEmitterCallback.invoke("onSubtitlesChanged", value);
49
+ }
50
+
51
+ @ReactMethod
52
+ @DoNotStrip
53
+ public abstract void initialize(@Nullable String androidServiceConfig);
54
+
55
+ @ReactMethod
56
+ @DoNotStrip
57
+ public abstract void joinEvent(String joinCode, @Nullable String password, String apiKey);
58
+
59
+ @ReactMethod
60
+ @DoNotStrip
61
+ public abstract void leaveEvent();
62
+
63
+ @ReactMethod
64
+ @DoNotStrip
65
+ public abstract void reconnect();
66
+
67
+ @ReactMethod(isBlockingSynchronousMethod = true)
68
+ @DoNotStrip
69
+ public abstract @Nullable String getCurrentClaims();
70
+
71
+ @ReactMethod(isBlockingSynchronousMethod = true)
72
+ @DoNotStrip
73
+ public abstract String getCurrentUiState();
74
+
75
+ @ReactMethod(isBlockingSynchronousMethod = true)
76
+ @DoNotStrip
77
+ public abstract boolean getCurrentAudioState();
78
+
79
+ @ReactMethod(isBlockingSynchronousMethod = true)
80
+ @DoNotStrip
81
+ public abstract String getCurrentSubtitles();
82
+
83
+ @ReactMethod(isBlockingSynchronousMethod = true)
84
+ @DoNotStrip
85
+ public abstract String getCurrentAvailableSubtitleConfigs();
86
+
87
+ @ReactMethod
88
+ @DoNotStrip
89
+ public abstract void setLiveVoiceUseSpeaker(boolean value);
90
+
91
+ @ReactMethod
92
+ @DoNotStrip
93
+ public abstract void startChannel(double id);
94
+
95
+ @ReactMethod
96
+ @DoNotStrip
97
+ public abstract void stopChannel();
98
+
99
+ @ReactMethod
100
+ @DoNotStrip
101
+ public abstract void startSubtitles(double channelId, @Nullable String languageCode);
102
+
103
+ @ReactMethod
104
+ @DoNotStrip
105
+ public abstract void stopSubtitles();
106
+
107
+ @ReactMethod(isBlockingSynchronousMethod = true)
108
+ @DoNotStrip
109
+ public abstract String channelStatusOffline();
110
+
111
+ @ReactMethod(isBlockingSynchronousMethod = true)
112
+ @DoNotStrip
113
+ public abstract String noChannels();
114
+
115
+ @ReactMethod(isBlockingSynchronousMethod = true)
116
+ @DoNotStrip
117
+ public abstract String isAiChannelStatusMessage();
118
+
119
+ @ReactMethod(isBlockingSynchronousMethod = true)
120
+ @DoNotStrip
121
+ public abstract String sdkNoMatchingChannels();
122
+
123
+ @ReactMethod(isBlockingSynchronousMethod = true)
124
+ @DoNotStrip
125
+ public abstract String errorScreenRetrying();
126
+
127
+ @ReactMethod(isBlockingSynchronousMethod = true)
128
+ @DoNotStrip
129
+ public abstract String errorScreenRetryingIn(double seconds);
130
+
131
+ @ReactMethod(isBlockingSynchronousMethod = true)
132
+ @DoNotStrip
133
+ public abstract String sdkErrorGeneric();
134
+
135
+ @ReactMethod(isBlockingSynchronousMethod = true)
136
+ @DoNotStrip
137
+ public abstract String sdkErrorInactive();
138
+
139
+ @ReactMethod(isBlockingSynchronousMethod = true)
140
+ @DoNotStrip
141
+ public abstract String sdkErrorInvalidApiKey();
142
+
143
+ @ReactMethod(isBlockingSynchronousMethod = true)
144
+ @DoNotStrip
145
+ public abstract String sdkErrorListenerLimitReached();
146
+
147
+ @ReactMethod(isBlockingSynchronousMethod = true)
148
+ @DoNotStrip
149
+ public abstract String sdkErrorNoNetwork();
150
+
151
+ @ReactMethod(isBlockingSynchronousMethod = true)
152
+ @DoNotStrip
153
+ public abstract String sdkErrorNotFound();
154
+
155
+ @ReactMethod(isBlockingSynchronousMethod = true)
156
+ @DoNotStrip
157
+ public abstract String sdkErrorRequestFailed(double errorCode);
158
+
159
+ @ReactMethod(isBlockingSynchronousMethod = true)
160
+ @DoNotStrip
161
+ public abstract String sdkErrorWrongPassword();
162
+
163
+ @ReactMethod(isBlockingSynchronousMethod = true)
164
+ @DoNotStrip
165
+ public abstract String streamingByTitle();
166
+
167
+ @ReactMethod(isBlockingSynchronousMethod = true)
168
+ @DoNotStrip
169
+ public abstract String errorRetryNowButton();
170
+
171
+ @ReactMethod(isBlockingSynchronousMethod = true)
172
+ @DoNotStrip
173
+ public abstract String accessibilityChannelPlay();
174
+
175
+ @ReactMethod(isBlockingSynchronousMethod = true)
176
+ @DoNotStrip
177
+ public abstract String accessibilityChannelStatusMuted();
178
+
179
+ @ReactMethod(isBlockingSynchronousMethod = true)
180
+ @DoNotStrip
181
+ public abstract String accessibilityChannelStop();
182
+ }
@@ -0,0 +1,36 @@
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ #
3
+ # This source code is licensed under the MIT license found in the
4
+ # LICENSE file in the root directory of this source tree.
5
+
6
+ cmake_minimum_required(VERSION 3.13)
7
+ set(CMAKE_VERBOSE_MAKEFILE on)
8
+
9
+ file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNLiveVoiceSpec/*.cpp)
10
+
11
+ add_library(
12
+ react_codegen_RNLiveVoiceSpec
13
+ OBJECT
14
+ ${react_codegen_SRCS}
15
+ )
16
+
17
+ target_include_directories(react_codegen_RNLiveVoiceSpec PUBLIC . react/renderer/components/RNLiveVoiceSpec)
18
+
19
+ target_link_libraries(
20
+ react_codegen_RNLiveVoiceSpec
21
+ fbjni
22
+ jsi
23
+ # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
+ # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
+ reactnative
26
+ )
27
+
28
+ target_compile_options(
29
+ react_codegen_RNLiveVoiceSpec
30
+ PRIVATE
31
+ -DLOG_TAG=\"ReactNative\"
32
+ -fexceptions
33
+ -frtti
34
+ -std=c++20
35
+ -Wall
36
+ )
@@ -0,0 +1,229 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniCpp.js
9
+ */
10
+
11
+ #include "RNLiveVoiceSpec.h"
12
+
13
+ namespace facebook::react {
14
+
15
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_initialize(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
16
+ static jmethodID cachedMethodId = nullptr;
17
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "initialize", "(Ljava/lang/String;)V", args, count, cachedMethodId);
18
+ }
19
+
20
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_joinEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
21
+ static jmethodID cachedMethodId = nullptr;
22
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "joinEvent", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", args, count, cachedMethodId);
23
+ }
24
+
25
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_leaveEvent(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
26
+ static jmethodID cachedMethodId = nullptr;
27
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "leaveEvent", "()V", args, count, cachedMethodId);
28
+ }
29
+
30
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_reconnect(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
31
+ static jmethodID cachedMethodId = nullptr;
32
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "reconnect", "()V", args, count, cachedMethodId);
33
+ }
34
+
35
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentClaims(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
36
+ static jmethodID cachedMethodId = nullptr;
37
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "getCurrentClaims", "()Ljava/lang/String;", args, count, cachedMethodId);
38
+ }
39
+
40
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentUiState(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
41
+ static jmethodID cachedMethodId = nullptr;
42
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "getCurrentUiState", "()Ljava/lang/String;", args, count, cachedMethodId);
43
+ }
44
+
45
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAudioState(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
46
+ static jmethodID cachedMethodId = nullptr;
47
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, BooleanKind, "getCurrentAudioState", "()Z", args, count, cachedMethodId);
48
+ }
49
+
50
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
51
+ static jmethodID cachedMethodId = nullptr;
52
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "getCurrentSubtitles", "()Ljava/lang/String;", args, count, cachedMethodId);
53
+ }
54
+
55
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAvailableSubtitleConfigs(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
56
+ static jmethodID cachedMethodId = nullptr;
57
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "getCurrentAvailableSubtitleConfigs", "()Ljava/lang/String;", args, count, cachedMethodId);
58
+ }
59
+
60
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_setLiveVoiceUseSpeaker(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
61
+ static jmethodID cachedMethodId = nullptr;
62
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "setLiveVoiceUseSpeaker", "(Z)V", args, count, cachedMethodId);
63
+ }
64
+
65
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_startChannel(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
66
+ static jmethodID cachedMethodId = nullptr;
67
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "startChannel", "(D)V", args, count, cachedMethodId);
68
+ }
69
+
70
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
71
+ static jmethodID cachedMethodId = nullptr;
72
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "stopChannel", "()V", args, count, cachedMethodId);
73
+ }
74
+
75
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
76
+ static jmethodID cachedMethodId = nullptr;
77
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "startSubtitles", "(DLjava/lang/String;)V", args, count, cachedMethodId);
78
+ }
79
+
80
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
81
+ static jmethodID cachedMethodId = nullptr;
82
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, VoidKind, "stopSubtitles", "()V", args, count, cachedMethodId);
83
+ }
84
+
85
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_channelStatusOffline(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
86
+ static jmethodID cachedMethodId = nullptr;
87
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "channelStatusOffline", "()Ljava/lang/String;", args, count, cachedMethodId);
88
+ }
89
+
90
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_noChannels(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
91
+ static jmethodID cachedMethodId = nullptr;
92
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "noChannels", "()Ljava/lang/String;", args, count, cachedMethodId);
93
+ }
94
+
95
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_isAiChannelStatusMessage(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
96
+ static jmethodID cachedMethodId = nullptr;
97
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "isAiChannelStatusMessage", "()Ljava/lang/String;", args, count, cachedMethodId);
98
+ }
99
+
100
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkNoMatchingChannels(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
101
+ static jmethodID cachedMethodId = nullptr;
102
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkNoMatchingChannels", "()Ljava/lang/String;", args, count, cachedMethodId);
103
+ }
104
+
105
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetrying(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
106
+ static jmethodID cachedMethodId = nullptr;
107
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "errorScreenRetrying", "()Ljava/lang/String;", args, count, cachedMethodId);
108
+ }
109
+
110
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetryingIn(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
111
+ static jmethodID cachedMethodId = nullptr;
112
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "errorScreenRetryingIn", "(D)Ljava/lang/String;", args, count, cachedMethodId);
113
+ }
114
+
115
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorGeneric(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
116
+ static jmethodID cachedMethodId = nullptr;
117
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorGeneric", "()Ljava/lang/String;", args, count, cachedMethodId);
118
+ }
119
+
120
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInactive(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
121
+ static jmethodID cachedMethodId = nullptr;
122
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorInactive", "()Ljava/lang/String;", args, count, cachedMethodId);
123
+ }
124
+
125
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInvalidApiKey(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
126
+ static jmethodID cachedMethodId = nullptr;
127
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorInvalidApiKey", "()Ljava/lang/String;", args, count, cachedMethodId);
128
+ }
129
+
130
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorListenerLimitReached(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
131
+ static jmethodID cachedMethodId = nullptr;
132
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorListenerLimitReached", "()Ljava/lang/String;", args, count, cachedMethodId);
133
+ }
134
+
135
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNoNetwork(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
136
+ static jmethodID cachedMethodId = nullptr;
137
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorNoNetwork", "()Ljava/lang/String;", args, count, cachedMethodId);
138
+ }
139
+
140
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNotFound(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
141
+ static jmethodID cachedMethodId = nullptr;
142
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorNotFound", "()Ljava/lang/String;", args, count, cachedMethodId);
143
+ }
144
+
145
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorRequestFailed(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
146
+ static jmethodID cachedMethodId = nullptr;
147
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorRequestFailed", "(D)Ljava/lang/String;", args, count, cachedMethodId);
148
+ }
149
+
150
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorWrongPassword(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
151
+ static jmethodID cachedMethodId = nullptr;
152
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "sdkErrorWrongPassword", "()Ljava/lang/String;", args, count, cachedMethodId);
153
+ }
154
+
155
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_streamingByTitle(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
156
+ static jmethodID cachedMethodId = nullptr;
157
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "streamingByTitle", "()Ljava/lang/String;", args, count, cachedMethodId);
158
+ }
159
+
160
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_errorRetryNowButton(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
161
+ static jmethodID cachedMethodId = nullptr;
162
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "errorRetryNowButton", "()Ljava/lang/String;", args, count, cachedMethodId);
163
+ }
164
+
165
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelPlay(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
166
+ static jmethodID cachedMethodId = nullptr;
167
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "accessibilityChannelPlay", "()Ljava/lang/String;", args, count, cachedMethodId);
168
+ }
169
+
170
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStatusMuted(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
171
+ static jmethodID cachedMethodId = nullptr;
172
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "accessibilityChannelStatusMuted", "()Ljava/lang/String;", args, count, cachedMethodId);
173
+ }
174
+
175
+ static facebook::jsi::Value __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStop(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
176
+ static jmethodID cachedMethodId = nullptr;
177
+ return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, StringKind, "accessibilityChannelStop", "()Ljava/lang/String;", args, count, cachedMethodId);
178
+ }
179
+
180
+ NativeLiveVoiceSdkSpecJSI::NativeLiveVoiceSdkSpecJSI(const JavaTurboModule::InitParams &params)
181
+ : JavaTurboModule(params) {
182
+ methodMap_["initialize"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_initialize};
183
+ methodMap_["joinEvent"] = MethodMetadata {3, __hostFunction_NativeLiveVoiceSdkSpecJSI_joinEvent};
184
+ methodMap_["leaveEvent"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_leaveEvent};
185
+ methodMap_["reconnect"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_reconnect};
186
+ methodMap_["getCurrentClaims"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentClaims};
187
+ methodMap_["getCurrentUiState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentUiState};
188
+ methodMap_["getCurrentAudioState"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAudioState};
189
+ methodMap_["getCurrentSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentSubtitles};
190
+ methodMap_["getCurrentAvailableSubtitleConfigs"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_getCurrentAvailableSubtitleConfigs};
191
+ methodMap_["setLiveVoiceUseSpeaker"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_setLiveVoiceUseSpeaker};
192
+ methodMap_["startChannel"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_startChannel};
193
+ methodMap_["stopChannel"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopChannel};
194
+ methodMap_["startSubtitles"] = MethodMetadata {2, __hostFunction_NativeLiveVoiceSdkSpecJSI_startSubtitles};
195
+ methodMap_["stopSubtitles"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_stopSubtitles};
196
+ methodMap_["channelStatusOffline"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_channelStatusOffline};
197
+ methodMap_["noChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_noChannels};
198
+ methodMap_["isAiChannelStatusMessage"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_isAiChannelStatusMessage};
199
+ methodMap_["sdkNoMatchingChannels"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkNoMatchingChannels};
200
+ methodMap_["errorScreenRetrying"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetrying};
201
+ methodMap_["errorScreenRetryingIn"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorScreenRetryingIn};
202
+ methodMap_["sdkErrorGeneric"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorGeneric};
203
+ methodMap_["sdkErrorInactive"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInactive};
204
+ methodMap_["sdkErrorInvalidApiKey"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorInvalidApiKey};
205
+ methodMap_["sdkErrorListenerLimitReached"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorListenerLimitReached};
206
+ methodMap_["sdkErrorNoNetwork"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNoNetwork};
207
+ methodMap_["sdkErrorNotFound"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorNotFound};
208
+ methodMap_["sdkErrorRequestFailed"] = MethodMetadata {1, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorRequestFailed};
209
+ methodMap_["sdkErrorWrongPassword"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_sdkErrorWrongPassword};
210
+ methodMap_["streamingByTitle"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_streamingByTitle};
211
+ methodMap_["errorRetryNowButton"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_errorRetryNowButton};
212
+ methodMap_["accessibilityChannelPlay"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelPlay};
213
+ methodMap_["accessibilityChannelStatusMuted"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStatusMuted};
214
+ methodMap_["accessibilityChannelStop"] = MethodMetadata {0, __hostFunction_NativeLiveVoiceSdkSpecJSI_accessibilityChannelStop};
215
+ eventEmitterMap_["onUiStateChanged"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
216
+ eventEmitterMap_["onAudioOutputChanged"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
217
+ eventEmitterMap_["onAvailableSubtitleConfigsChanged"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
218
+ eventEmitterMap_["onSubtitlesChanged"] = std::make_shared<AsyncEventEmitter<folly::dynamic>>();
219
+ setEventEmitterCallback(params.instance);
220
+ }
221
+
222
+ std::shared_ptr<TurboModule> RNLiveVoiceSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
223
+ if (moduleName == "LiveVoiceModule") {
224
+ return std::make_shared<NativeLiveVoiceSdkSpecJSI>(params);
225
+ }
226
+ return nullptr;
227
+ }
228
+
229
+ } // namespace facebook::react
@@ -0,0 +1,31 @@
1
+
2
+ /**
3
+ * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
+ *
5
+ * Do not edit this file as changes may cause incorrect behavior and will be lost
6
+ * once the code is regenerated.
7
+ *
8
+ * @generated by codegen project: GenerateModuleJniH.js
9
+ */
10
+
11
+ #pragma once
12
+
13
+ #include <ReactCommon/JavaTurboModule.h>
14
+ #include <ReactCommon/TurboModule.h>
15
+ #include <jsi/jsi.h>
16
+
17
+ namespace facebook::react {
18
+
19
+ /**
20
+ * JNI C++ class for module 'NativeLiveVoiceSdk'
21
+ */
22
+ class JSI_EXPORT NativeLiveVoiceSdkSpecJSI : public JavaTurboModule {
23
+ public:
24
+ NativeLiveVoiceSdkSpecJSI(const JavaTurboModule::InitParams &params);
25
+ };
26
+
27
+
28
+ JSI_EXPORT
29
+ std::shared_ptr<TurboModule> RNLiveVoiceSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
30
+
31
+ } // namespace facebook::react