livevoice-sdk-react-native 2.0.0 → 2.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.
- package/README.md +119 -7
- package/android/build.gradle +14 -3
- package/android/src/main/java/io/livevoice/react/LiveVoiceModule.kt +89 -123
- package/android/src/main/java/io/livevoice/react/__SDK.kt +16 -2
- package/ios/LiveVoiceSdkReactNative.mm +110 -37
- package/ios/__SDK.h +16 -2
- package/lib/module/components/AudioOutputSwitchView.js +13 -13
- package/lib/module/components/AudioOutputSwitchView.js.map +1 -1
- package/lib/module/components/BrandingView.js +13 -11
- package/lib/module/components/BrandingView.js.map +1 -1
- package/lib/module/components/ChannelView.js +14 -11
- package/lib/module/components/ChannelView.js.map +1 -1
- package/lib/module/components/ErrorView.js +12 -10
- package/lib/module/components/ErrorView.js.map +1 -1
- package/lib/module/components/LiveVoiceView.js +141 -72
- package/lib/module/components/LiveVoiceView.js.map +1 -1
- package/lib/module/components/PlayButtonView.js +12 -10
- package/lib/module/components/PlayButtonView.js.map +1 -1
- package/lib/module/components/ReconnectingView.js +16 -13
- package/lib/module/components/ReconnectingView.js.map +1 -1
- package/lib/module/components/WarningView.js +12 -10
- package/lib/module/components/WarningView.js.map +1 -1
- package/lib/module/components/index.js +12 -10
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/index.js +14 -220
- package/lib/module/index.js.map +1 -1
- package/lib/module/sdk/LiveVoiceSdk.js +371 -0
- package/lib/module/sdk/LiveVoiceSdk.js.map +1 -0
- package/lib/module/sdk/LiveVoiceState.js +66 -0
- package/lib/module/sdk/LiveVoiceState.js.map +1 -0
- package/lib/module/specs/NativeLiveVoiceSdk.js +12 -10
- package/lib/module/specs/NativeLiveVoiceSdk.js.map +1 -1
- package/lib/module/util/Colors.js +12 -10
- package/lib/module/util/Colors.js.map +1 -1
- package/lib/module/util/ForegroundServiceConfig.js +21 -11
- package/lib/module/util/ForegroundServiceConfig.js.map +1 -1
- package/lib/module/util/PlayingState.js +12 -10
- package/lib/module/util/PlayingState.js.map +1 -1
- package/lib/module/util/Translations.js +12 -10
- package/lib/module/util/Translations.js.map +1 -1
- package/lib/module/util/logger.js +76 -0
- package/lib/module/util/logger.js.map +1 -0
- package/lib/typescript/src/components/AudioOutputSwitchView.d.ts.map +1 -1
- package/lib/typescript/src/components/BrandingView.d.ts.map +1 -1
- package/lib/typescript/src/components/ChannelView.d.ts.map +1 -1
- package/lib/typescript/src/components/ErrorView.d.ts.map +1 -1
- package/lib/typescript/src/components/LiveVoiceView.d.ts +22 -0
- package/lib/typescript/src/components/LiveVoiceView.d.ts.map +1 -1
- package/lib/typescript/src/components/PlayButtonView.d.ts.map +1 -1
- package/lib/typescript/src/components/ReconnectingView.d.ts.map +1 -1
- package/lib/typescript/src/components/WarningView.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +6 -144
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/sdk/LiveVoiceSdk.d.ts +210 -0
- package/lib/typescript/src/sdk/LiveVoiceSdk.d.ts.map +1 -0
- package/lib/typescript/src/sdk/LiveVoiceState.d.ts +12 -0
- package/lib/typescript/src/sdk/LiveVoiceState.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeLiveVoiceSdk.d.ts +3 -0
- package/lib/typescript/src/specs/NativeLiveVoiceSdk.d.ts.map +1 -1
- package/lib/typescript/src/util/Colors.d.ts.map +1 -1
- package/lib/typescript/src/util/ForegroundServiceConfig.d.ts +7 -0
- package/lib/typescript/src/util/ForegroundServiceConfig.d.ts.map +1 -1
- package/lib/typescript/src/util/PlayingState.d.ts.map +1 -1
- package/lib/typescript/src/util/Translations.d.ts.map +1 -1
- package/lib/typescript/src/util/UIState.d.ts +22 -2
- package/lib/typescript/src/util/UIState.d.ts.map +1 -1
- package/lib/typescript/src/util/logger.d.ts +23 -0
- package/lib/typescript/src/util/logger.d.ts.map +1 -0
- package/livevoice-sdk-react-native.podspec +14 -14
- package/package.json +16 -7
- package/src/components/AudioOutputSwitchView.tsx +13 -13
- package/src/components/BrandingView.tsx +13 -11
- package/src/components/ChannelView.tsx +14 -11
- package/src/components/ErrorView.tsx +12 -10
- package/src/components/LiveVoiceView.tsx +183 -92
- package/src/components/PlayButtonView.tsx +12 -10
- package/src/components/ReconnectingView.tsx +20 -13
- package/src/components/WarningView.tsx +12 -10
- package/src/components/index.tsx +12 -10
- package/src/index.tsx +19 -252
- package/src/sdk/LiveVoiceSdk.ts +408 -0
- package/src/sdk/LiveVoiceState.ts +89 -0
- package/src/specs/NativeLiveVoiceSdk.ts +16 -10
- package/src/util/Colors.ts +12 -10
- package/src/util/ForegroundServiceConfig.tsx +21 -11
- package/src/util/PlayingState.ts +12 -10
- package/src/util/Translations.ts +12 -10
- package/src/util/UIState.ts +30 -13
- package/src/util/logger.ts +92 -0
- package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeLiveVoiceSdkSpec.java +0 -186
- package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
- package/android/app/build/generated/source/codegen/jni/RNLiveVoiceSpec-generated.cpp +0 -235
- package/android/app/build/generated/source/codegen/jni/RNLiveVoiceSpec.h +0 -31
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNLiveVoiceSpec/RNLiveVoiceSpecJSI.h +0 -341
- package/android/src/main/java/io/livevoice/react/Mappings.kt +0 -85
- package/android/src/main/java/io/livevoice/react/NativeModels.kt +0 -79
package/lib/module/index.js
CHANGED
|
@@ -1,228 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
//===----------------------------------------------------------------------===//
|
|
4
|
+
//
|
|
5
|
+
// This source file is part of the LiveVoice SDK project
|
|
6
|
+
//
|
|
7
|
+
// Copyright (c) LiveVoice GmbH
|
|
8
|
+
// Licensed under the MIT license
|
|
9
|
+
//
|
|
10
|
+
// See LICENSE for license information
|
|
11
|
+
//
|
|
12
|
+
// SPDX-License-Identifier: MIT
|
|
13
|
+
//
|
|
14
|
+
//===----------------------------------------------------------------------===//
|
|
15
|
+
|
|
16
|
+
export * from "./sdk/LiveVoiceSdk.js";
|
|
16
17
|
export * from "./components/index.js";
|
|
17
18
|
export * from "./util/Translations.js";
|
|
18
19
|
export * from "./util/ForegroundServiceConfig.js";
|
|
19
20
|
export * from "./util/UIState.js";
|
|
20
21
|
export * from "./util/PlayingState.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Initialize the LiveVoice SDK.
|
|
24
|
-
*
|
|
25
|
-
* @param {ForegroundServiceConfig} [androidServiceConfig=serviceDisabled] - Pass the service config on Android.
|
|
26
|
-
*/
|
|
27
|
-
export function initialize(androidServiceConfig = serviceDisabled) {
|
|
28
|
-
let serviceTypeAsString;
|
|
29
|
-
switch (androidServiceConfig.type) {
|
|
30
|
-
case "Disabled":
|
|
31
|
-
serviceTypeAsString = null;
|
|
32
|
-
break;
|
|
33
|
-
case "Enabled":
|
|
34
|
-
if (androidServiceConfig.message == null) serviceTypeAsString = "LV_NOTIFICATION_DEFAULT_MESSAGE";else serviceTypeAsString = androidServiceConfig.message;
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// Interface cannot take default-parameter, so we need to wrap it here
|
|
39
|
-
LiveVoiceSdkReactNative.initialize(serviceTypeAsString);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Join an event.
|
|
44
|
-
*
|
|
45
|
-
* @abstract By joining an event you can display the event's channels.
|
|
46
|
-
*
|
|
47
|
-
* @param {string} joinCode - The listener code of your event. You can find it on the event page of the admin web-interface by clicking on 'Share with your audience'.
|
|
48
|
-
* @param {string | null} password - The optional password to join the event. If a password has been set for listeners in your event, it can be found in the 'Access' tab of the event page of the admin web-interface.
|
|
49
|
-
* @param {string} apiKey - Your API key. You can find your API key in the account page when logged in on the website.
|
|
50
|
-
*/
|
|
51
|
-
export function joinEvent(joinCode, password, apiKey) {
|
|
52
|
-
return LiveVoiceSdkReactNative.joinEvent(joinCode, password, apiKey);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Leave the current event.
|
|
57
|
-
*
|
|
58
|
-
* @abstract You can explicitly leave an event to tear down any network connections the SDK uses when you no longer display any channels.
|
|
59
|
-
*/
|
|
60
|
-
export function leaveEvent() {
|
|
61
|
-
return LiveVoiceSdkReactNative.leaveEvent();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Reconnect when a connection error occurred.
|
|
66
|
-
*
|
|
67
|
-
* @abstract Call this method to try to reconnect when a connection error has occurred.
|
|
68
|
-
*/
|
|
69
|
-
export function reconnect() {
|
|
70
|
-
return LiveVoiceSdkReactNative.reconnect();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Get the claims for the current event.
|
|
75
|
-
*
|
|
76
|
-
* @abstract The claims determine the authorized features for an API key. Claims are available, once an event has been joined.
|
|
77
|
-
* @returns {Claims | null} The authorization claims, or `nil` if not yet joined
|
|
78
|
-
*/
|
|
79
|
-
export function getCurrentClaims() {
|
|
80
|
-
const claims = LiveVoiceSdkReactNative.getCurrentClaims();
|
|
81
|
-
if (claims == null) return null;
|
|
82
|
-
return JSON.parse(claims);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Get the current state of the LiveVoice SDK.
|
|
87
|
-
*
|
|
88
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onUiStateChanged}
|
|
89
|
-
` to be updated about the view state.
|
|
90
|
-
* @returns {UiState} The current view state
|
|
91
|
-
*/
|
|
92
|
-
export function getCurrentUiState() {
|
|
93
|
-
return JSON.parse(LiveVoiceSdkReactNative.getCurrentUiState());
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Get the current available subtitle configurations LiveVoice SDK.
|
|
98
|
-
*
|
|
99
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onAvailableSubtitleConfigsChanged}
|
|
100
|
-
` to be updated when the available subtitle configurations change.
|
|
101
|
-
* @returns {[AvailableSubtitle]} The current available subtitles
|
|
102
|
-
*/
|
|
103
|
-
export function getCurrentSubtitleConfiguration() {
|
|
104
|
-
return JSON.parse(LiveVoiceSdkReactNative.getCurrentAvailableSubtitleConfigs());
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Get the current subtitle elemens LiveVoice SDK.
|
|
109
|
-
*
|
|
110
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onSubtitlesChanged}
|
|
111
|
-
` to be updated when the new subtitles are added.
|
|
112
|
-
* @returns {[String]} The current subtitles
|
|
113
|
-
*/
|
|
114
|
-
export function getCurrentSubtitles() {
|
|
115
|
-
return JSON.parse(LiveVoiceSdkReactNative.getCurrentSubtitles());
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Get the current state of the audio output.
|
|
120
|
-
*
|
|
121
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onAudioOutputChanged}
|
|
122
|
-
` to be updated about the audio state.
|
|
123
|
-
* @returns {boolean} `true` for the speaker and `false` for the receiver.
|
|
124
|
-
*/
|
|
125
|
-
export function getCurrentAudioState() {
|
|
126
|
-
return LiveVoiceSdkReactNative.getCurrentAudioState();
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Set the audio output.
|
|
131
|
-
* @param {boolean} value - Set to `true` to use the speaker, and `false` to use the receiver.
|
|
132
|
-
*/
|
|
133
|
-
export function setLiveVoiceUseSpeaker(value) {
|
|
134
|
-
return LiveVoiceSdkReactNative.setLiveVoiceUseSpeaker(value);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Start playing a channel.
|
|
139
|
-
* @abstract You can find the channel ID for a channel in the admin web-interface at the bottom when tapping *Edit Channel*.
|
|
140
|
-
* @param {number} [id] - The channel ID.
|
|
141
|
-
*/
|
|
142
|
-
export function startChannel(id) {
|
|
143
|
-
return LiveVoiceSdkReactNative.startChannel(id);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Stop playing the currently playing channel.
|
|
148
|
-
*/
|
|
149
|
-
export function stopChannel() {
|
|
150
|
-
return LiveVoiceSdkReactNative.stopChannel();
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Start receiving subtitles.
|
|
155
|
-
* @abstract The SDK can receive a single stream of subtitle fragments at a time.
|
|
156
|
-
* You can stop receiving subtitles using {@link stopSubtitles()}.
|
|
157
|
-
* Whenever you call this method, any previous subtitle streams are stopped automatically and you receive the subtitles for the requested channel and language instead.
|
|
158
|
-
*
|
|
159
|
-
* Note: You have to make sure that subtitles for the given channel and language are enabled in the web-interface. You can use the {@link onAvailableSubtitleConfigsChanged} handler to check if subtitles are available for a given channel in a given language.
|
|
160
|
-
*
|
|
161
|
-
* @param {number | null} channelId - The channel to receive subtitles for. Set to `null` to always receive subtitles for the currently playing channel.
|
|
162
|
-
*/
|
|
163
|
-
export function startSubtitles(channelId) {
|
|
164
|
-
const nativeSafeId = channelId == null ? -1 : channelId;
|
|
165
|
-
LiveVoiceSdkReactNative.startSubtitles(nativeSafeId);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Stop receiving subtitles.
|
|
170
|
-
*/
|
|
171
|
-
export function stopSubtitles() {
|
|
172
|
-
return LiveVoiceSdkReactNative.stopSubtitles();
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// Event handlers
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Handle changes of the audio output.
|
|
179
|
-
*
|
|
180
|
-
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
181
|
-
*/
|
|
182
|
-
export function onAudioOutputChanged(handler) {
|
|
183
|
-
return LiveVoiceSdkReactNative.onAudioOutputChanged(data => {
|
|
184
|
-
handler(data);
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Handle changes of the UI state.
|
|
190
|
-
*
|
|
191
|
-
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
192
|
-
*/
|
|
193
|
-
export function onUiStateChanged(handler) {
|
|
194
|
-
return LiveVoiceSdkReactNative.onUiStateChanged(data => {
|
|
195
|
-
handler(JSON.parse(data));
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Handle changes of the available subtitles.
|
|
201
|
-
*
|
|
202
|
-
* @returns { object } - An object with a`remove` method to unsubscribe from the event.
|
|
203
|
-
*/
|
|
204
|
-
export function onAvailableSubtitleConfigsChanged(handler) {
|
|
205
|
-
return LiveVoiceSdkReactNative.onAvailableSubtitleConfigsChanged(data => {
|
|
206
|
-
handler(JSON.parse(data));
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Handle changes of the available subtitles.
|
|
212
|
-
*
|
|
213
|
-
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
214
|
-
*/
|
|
215
|
-
export function onSubtitlesChanged(handler) {
|
|
216
|
-
return LiveVoiceSdkReactNative.onSubtitlesChanged(data => {
|
|
217
|
-
const mapOfSubtitles = JSON.parse(data);
|
|
218
|
-
handler(mapOfSubtitles);
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Open the LiveVoice website in the device's default browser.
|
|
224
|
-
*/
|
|
225
|
-
export function openLiveVoiceWebsite() {
|
|
226
|
-
return LiveVoiceSdkReactNative.openLiveVoiceWebsite();
|
|
227
|
-
}
|
|
228
22
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,uBAAoB;AAClC,cAAc,uBAAc;AAC5B,cAAc,wBAAqB;AACnC,cAAc,mCAAgC;AAC9C,cAAc,mBAAgB;AAC9B,cAAc,wBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
//===----------------------------------------------------------------------===//
|
|
4
|
+
//
|
|
5
|
+
// This source file is part of the LiveVoice SDK project
|
|
6
|
+
//
|
|
7
|
+
// Copyright (c) LiveVoice GmbH
|
|
8
|
+
// Licensed under the MIT license
|
|
9
|
+
//
|
|
10
|
+
// See LICENSE for license information
|
|
11
|
+
//
|
|
12
|
+
// SPDX-License-Identifier: MIT
|
|
13
|
+
//
|
|
14
|
+
//===----------------------------------------------------------------------===//
|
|
15
|
+
|
|
16
|
+
import LiveVoiceSdkReactNative from "../specs/NativeLiveVoiceSdk.js";
|
|
17
|
+
import { serviceDisabled, DEFAULT_MESSAGE_SENTINEL } from "../util/ForegroundServiceConfig.js";
|
|
18
|
+
import { describeForegroundServiceConfig, LiveVoiceLogEvent, logAudioOutputChanged, logInfo } from "../util/logger.js";
|
|
19
|
+
import { getCurrentClaims as readCurrentClaims, getCurrentUiState as readCurrentUiState, onUiStateChanged as observeUiState } from "./LiveVoiceState.js";
|
|
20
|
+
|
|
21
|
+
// Claims stays part of the public type surface for backwards compatibility.
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The authorization features for the joined event. Both flags are `false` until an event is joined
|
|
25
|
+
* and ready.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Initialize the LiveVoice SDK.
|
|
30
|
+
*
|
|
31
|
+
* @param {ForegroundServiceConfig} [androidServiceConfig=serviceDisabled] - Pass the service config on Android.
|
|
32
|
+
*/
|
|
33
|
+
export function initialize(androidServiceConfig = serviceDisabled) {
|
|
34
|
+
logInfo(LiveVoiceLogEvent.init, {
|
|
35
|
+
androidServiceConfig: describeForegroundServiceConfig(androidServiceConfig)
|
|
36
|
+
});
|
|
37
|
+
let serviceTypeAsString;
|
|
38
|
+
switch (androidServiceConfig.type) {
|
|
39
|
+
case 'Disabled':
|
|
40
|
+
serviceTypeAsString = null;
|
|
41
|
+
break;
|
|
42
|
+
case 'Enabled':
|
|
43
|
+
if (androidServiceConfig.message == null) {
|
|
44
|
+
serviceTypeAsString = DEFAULT_MESSAGE_SENTINEL;
|
|
45
|
+
} else {
|
|
46
|
+
serviceTypeAsString = androidServiceConfig.message;
|
|
47
|
+
}
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Interface cannot take default-parameter, so we need to wrap it here
|
|
52
|
+
LiveVoiceSdkReactNative.initialize(serviceTypeAsString);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Join an event.
|
|
57
|
+
*
|
|
58
|
+
* @abstract By joining an event you can display the event's channels.
|
|
59
|
+
*
|
|
60
|
+
* @param {string} joinCode - The listener code of your event. You can find it on the event page of the admin web-interface by clicking on 'Share with your audience'.
|
|
61
|
+
* @param {string | null} password - The optional password to join the event. If a password has been set for listeners in your event, it can be found in the 'Access' tab of the event page of the admin web-interface.
|
|
62
|
+
* @param {string} apiKey - Your API key. You can find your API key in the account page when logged in on the website.
|
|
63
|
+
*/
|
|
64
|
+
export function joinEvent(joinCode, password, apiKey) {
|
|
65
|
+
logInfo(LiveVoiceLogEvent.joinRequest, {
|
|
66
|
+
hasPassword: password != null,
|
|
67
|
+
joinCode
|
|
68
|
+
});
|
|
69
|
+
return LiveVoiceSdkReactNative.joinEvent(joinCode, password, apiKey);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Leave the current event.
|
|
74
|
+
*
|
|
75
|
+
* @abstract You can explicitly leave an event to tear down any network connections the SDK uses when you no longer display any channels.
|
|
76
|
+
*/
|
|
77
|
+
export function leaveEvent() {
|
|
78
|
+
logInfo(LiveVoiceLogEvent.leave);
|
|
79
|
+
return LiveVoiceSdkReactNative.leaveEvent();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Reconnect when a connection error occurred.
|
|
84
|
+
*
|
|
85
|
+
* @abstract Call this method to try to reconnect when a connection error has occurred.
|
|
86
|
+
*/
|
|
87
|
+
export function reconnect() {
|
|
88
|
+
logInfo(LiveVoiceLogEvent.reconnectRequest);
|
|
89
|
+
return LiveVoiceSdkReactNative.reconnect();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Get the claims for the current event.
|
|
94
|
+
*
|
|
95
|
+
* @deprecated Use {@link getCurrentFeatures} / {@link onFeaturesChanged} to read the authorization
|
|
96
|
+
* features, or build your UI with the `renderChannel` prop on `LiveVoiceView` (which applies the
|
|
97
|
+
* customization gating for you). Scheduled for removal in a future major version.
|
|
98
|
+
* @returns {Claims | null} The authorization claims, or `null` if not yet joined
|
|
99
|
+
*/
|
|
100
|
+
export function getCurrentClaims() {
|
|
101
|
+
return readCurrentClaims();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Get the authorization features for the joined event.
|
|
106
|
+
*
|
|
107
|
+
* @abstract Reflects what the joined API key permits. Both flags are `false` until an event is
|
|
108
|
+
* joined and ready. You should only need this for an initial value; use {@link onFeaturesChanged}
|
|
109
|
+
* to observe changes.
|
|
110
|
+
* @returns {Features} The current features (`customUiAllowed` / `hideBranding`).
|
|
111
|
+
*/
|
|
112
|
+
export function getCurrentFeatures() {
|
|
113
|
+
const claims = readCurrentClaims();
|
|
114
|
+
return {
|
|
115
|
+
customUiAllowed: claims?.customUiAllowed ?? false,
|
|
116
|
+
hideBranding: claims?.hideBranding ?? false
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Get the current state of the LiveVoice SDK.
|
|
122
|
+
*
|
|
123
|
+
* @deprecated Build your UI with the `renderChannel` prop on `LiveVoiceView` instead of reading the
|
|
124
|
+
* raw UI state. Scheduled for removal in a future major version.
|
|
125
|
+
* @returns {UiState} The current view state
|
|
126
|
+
*/
|
|
127
|
+
export function getCurrentUiState() {
|
|
128
|
+
return readCurrentUiState();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Get the current available subtitle configurations.
|
|
133
|
+
*
|
|
134
|
+
* @abstract Returns `null` until the SDK has joined an event and reached the `ready` state, so you
|
|
135
|
+
* can tell "not loaded yet" (`null`) apart from "loaded, but none available" (`[]`). You should
|
|
136
|
+
* only need this for an initial value; use {@link onAvailableSubtitleConfigsChanged} to observe
|
|
137
|
+
* changes.
|
|
138
|
+
* @returns {AvailableSubtitle[] | null} The available subtitles, or `null` if not yet loaded.
|
|
139
|
+
*/
|
|
140
|
+
export function getCurrentSubtitleConfiguration() {
|
|
141
|
+
if (readCurrentUiState().type !== 'ready') return null;
|
|
142
|
+
return JSON.parse(LiveVoiceSdkReactNative.getCurrentAvailableSubtitleConfigs());
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get the current subtitle fragments.
|
|
147
|
+
*
|
|
148
|
+
* @deprecated Use {@link getCurrentSubtitleState}, which returns the full subtitle state (type +
|
|
149
|
+
* channel + fragments). Scheduled for removal in a future major version.
|
|
150
|
+
* @returns {string[]} The current subtitle fragments
|
|
151
|
+
*/
|
|
152
|
+
export function getCurrentSubtitles() {
|
|
153
|
+
return JSON.parse(LiveVoiceSdkReactNative.getCurrentSubtitles());
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Get the current subtitle state.
|
|
158
|
+
*
|
|
159
|
+
* @abstract Unlike {@link getCurrentSubtitles} (fragments only), this returns the full state: the
|
|
160
|
+
* {@link SubtitleState.type} (`disabled`/`automatic`/`specific`), the channel for `specific`, and
|
|
161
|
+
* the fragments. You should only need to call this for an initial value; use
|
|
162
|
+
* {@link onSubtitleStateChanged} to observe changes.
|
|
163
|
+
* @returns {SubtitleState} The current subtitle state
|
|
164
|
+
*/
|
|
165
|
+
export function getCurrentSubtitleState() {
|
|
166
|
+
return parseSubtitleState(LiveVoiceSdkReactNative.getCurrentSubtitleState());
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Get the current state of the audio output.
|
|
171
|
+
*
|
|
172
|
+
* @abstract You should only need to call this method to get an initial value. Use {@link onAudioOutputChanged}
|
|
173
|
+
` to be updated about the audio state.
|
|
174
|
+
* @returns {boolean} `true` for the speaker and `false` for the receiver.
|
|
175
|
+
*/
|
|
176
|
+
export function getCurrentAudioState() {
|
|
177
|
+
return LiveVoiceSdkReactNative.getCurrentAudioState();
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Set the audio output.
|
|
182
|
+
* @param {boolean} value - Set to `true` to use the speaker, and `false` to use the receiver.
|
|
183
|
+
*/
|
|
184
|
+
export function setLiveVoiceUseSpeaker(value) {
|
|
185
|
+
logInfo(LiveVoiceLogEvent.audioOutputSet, {
|
|
186
|
+
mode: value ? 'speaker' : 'receiver'
|
|
187
|
+
});
|
|
188
|
+
return LiveVoiceSdkReactNative.setLiveVoiceUseSpeaker(value);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Start playing a channel.
|
|
193
|
+
* @abstract You can find the channel ID for a channel in the admin web-interface at the bottom when tapping *Edit Channel*.
|
|
194
|
+
* @deprecated Manual audio playback control should only be driven through `LiveVoiceView` channel
|
|
195
|
+
* cells. Use the `onAudioPress` helper passed to `renderChannel` instead. Scheduled for removal in
|
|
196
|
+
* a future major version.
|
|
197
|
+
* @param {number} [id] - The channel ID.
|
|
198
|
+
*/
|
|
199
|
+
export function startChannel(id) {
|
|
200
|
+
logInfo(LiveVoiceLogEvent.channelStart, {
|
|
201
|
+
channelId: id
|
|
202
|
+
});
|
|
203
|
+
return LiveVoiceSdkReactNative.startChannel(id);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Stop playing the currently playing channel.
|
|
208
|
+
*
|
|
209
|
+
* @deprecated Manual audio playback control should only be driven through `LiveVoiceView` channel
|
|
210
|
+
* cells. Use the `onAudioPress` helper passed to `renderChannel` instead. Scheduled for removal in
|
|
211
|
+
* a future major version.
|
|
212
|
+
*/
|
|
213
|
+
export function stopChannel() {
|
|
214
|
+
logInfo(LiveVoiceLogEvent.channelStop);
|
|
215
|
+
return LiveVoiceSdkReactNative.stopChannel();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Start receiving subtitles.
|
|
220
|
+
* @abstract The SDK can receive a single stream of subtitle fragments at a time.
|
|
221
|
+
* You can stop receiving subtitles using {@link stopSubtitles()}.
|
|
222
|
+
* Whenever you call this method, any previous subtitle streams are stopped automatically and you receive the subtitles for the requested channel and language instead.
|
|
223
|
+
*
|
|
224
|
+
* Note: You have to make sure that subtitles for the given channel and language are enabled in the web-interface. You can use the {@link onAvailableSubtitleConfigsChanged} handler to check if subtitles are available for a given channel in a given language.
|
|
225
|
+
*
|
|
226
|
+
* @param {number | null} channelId - The channel to receive subtitles for. Set to `null` to always receive subtitles for the currently playing channel.
|
|
227
|
+
*/
|
|
228
|
+
export function startSubtitles(channelId) {
|
|
229
|
+
logInfo(LiveVoiceLogEvent.subtitlesStart, {
|
|
230
|
+
channelId: channelId == null ? 'current' : channelId
|
|
231
|
+
});
|
|
232
|
+
const nativeSafeId = channelId == null ? -1 : channelId;
|
|
233
|
+
LiveVoiceSdkReactNative.startSubtitles(nativeSafeId);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Stop receiving subtitles.
|
|
238
|
+
*/
|
|
239
|
+
export function stopSubtitles() {
|
|
240
|
+
logInfo(LiveVoiceLogEvent.subtitlesStop);
|
|
241
|
+
return LiveVoiceSdkReactNative.stopSubtitles();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// Event handlers
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Handle changes of the audio output.
|
|
248
|
+
*
|
|
249
|
+
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
250
|
+
*/
|
|
251
|
+
export function onAudioOutputChanged(handler) {
|
|
252
|
+
return LiveVoiceSdkReactNative.onAudioOutputChanged(data => {
|
|
253
|
+
logAudioOutputChanged(data);
|
|
254
|
+
handler(data);
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Handle changes of the UI state.
|
|
260
|
+
*
|
|
261
|
+
* @deprecated Build your UI with the `renderChannel` prop on `LiveVoiceView` instead of observing
|
|
262
|
+
* the raw UI state. Scheduled for removal in a future major version.
|
|
263
|
+
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
264
|
+
*/
|
|
265
|
+
export function onUiStateChanged(handler) {
|
|
266
|
+
return observeUiState(handler);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Handle changes of the authorization features.
|
|
271
|
+
*
|
|
272
|
+
* @abstract Re-emits whenever the joined session changes (join/leave/ready), so the
|
|
273
|
+
* `customUiAllowed` / `hideBranding` flags stay in sync with the current API key. Both are `false`
|
|
274
|
+
* while not joined.
|
|
275
|
+
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
276
|
+
*/
|
|
277
|
+
export function onFeaturesChanged(handler) {
|
|
278
|
+
return observeUiState(() => handler(getCurrentFeatures()));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Handle changes of the available subtitle configurations.
|
|
283
|
+
*
|
|
284
|
+
* @abstract Reports `null` until the SDK reaches the `ready` state (see
|
|
285
|
+
* {@link getCurrentSubtitleConfiguration}), then the loaded array (`[]` when none are available).
|
|
286
|
+
* Re-emits when the configs change while ready, and when the ready state itself changes.
|
|
287
|
+
* @returns { object } - An object with a`remove` method to unsubscribe from the event.
|
|
288
|
+
*/
|
|
289
|
+
export function onAvailableSubtitleConfigsChanged(handler) {
|
|
290
|
+
const isReady = () => readCurrentUiState().type === 'ready';
|
|
291
|
+
|
|
292
|
+
// Configs changed: emit them only once the SDK is ready, otherwise `null`.
|
|
293
|
+
const configsSubscription = LiveVoiceSdkReactNative.onAvailableSubtitleConfigsChanged(data => {
|
|
294
|
+
handler(isReady() ? JSON.parse(data) : null);
|
|
295
|
+
});
|
|
296
|
+
// Readiness changed: re-emit the current configs (or `null` if no longer ready).
|
|
297
|
+
const uiStateSubscription = observeUiState(() => {
|
|
298
|
+
handler(getCurrentSubtitleConfiguration());
|
|
299
|
+
});
|
|
300
|
+
return {
|
|
301
|
+
remove: () => {
|
|
302
|
+
configsSubscription.remove();
|
|
303
|
+
uiStateSubscription.remove();
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Handle changes of the subtitle fragments.
|
|
310
|
+
*
|
|
311
|
+
* @deprecated Use {@link onSubtitleStateChanged}, which reports the full subtitle state (type +
|
|
312
|
+
* channel + fragments). Scheduled for removal in a future major version.
|
|
313
|
+
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
314
|
+
*/
|
|
315
|
+
export function onSubtitlesChanged(handler) {
|
|
316
|
+
return LiveVoiceSdkReactNative.onSubtitlesChanged(data => {
|
|
317
|
+
const subtitles = JSON.parse(data);
|
|
318
|
+
handler(subtitles);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Handle changes of the subtitle state.
|
|
324
|
+
*
|
|
325
|
+
* @abstract Reports the full state (type + channel + fragments), unlike the fragments-only
|
|
326
|
+
* {@link onSubtitlesChanged}.
|
|
327
|
+
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
328
|
+
*/
|
|
329
|
+
export function onSubtitleStateChanged(handler) {
|
|
330
|
+
return LiveVoiceSdkReactNative.onSubtitleStateChanged(data => {
|
|
331
|
+
handler(parseSubtitleState(data));
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Open the LiveVoice website in the device's default browser.
|
|
337
|
+
*/
|
|
338
|
+
export function openLiveVoiceWebsite() {
|
|
339
|
+
logInfo(LiveVoiceLogEvent.openWebsite);
|
|
340
|
+
return LiveVoiceSdkReactNative.openLiveVoiceWebsite();
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Get the version of the LiveVoice React Native SDK.
|
|
345
|
+
*
|
|
346
|
+
* @returns {string} The SDK version, e.g. `"2.0.1"`.
|
|
347
|
+
*/
|
|
348
|
+
export function getSdkVersion() {
|
|
349
|
+
return LiveVoiceSdkReactNative.getSdkVersion();
|
|
350
|
+
}
|
|
351
|
+
function parseSubtitleState(data) {
|
|
352
|
+
const wire = JSON.parse(data);
|
|
353
|
+
switch (wire.type) {
|
|
354
|
+
case 'automatic':
|
|
355
|
+
return {
|
|
356
|
+
type: 'automatic',
|
|
357
|
+
fragments: wire.fragments ?? []
|
|
358
|
+
};
|
|
359
|
+
case 'specific':
|
|
360
|
+
return {
|
|
361
|
+
type: 'specific',
|
|
362
|
+
channelId: wire.channelId ?? -1,
|
|
363
|
+
fragments: wire.fragments ?? []
|
|
364
|
+
};
|
|
365
|
+
default:
|
|
366
|
+
return {
|
|
367
|
+
type: 'disabled'
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
//# sourceMappingURL=LiveVoiceSdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LiveVoiceSdkReactNative","serviceDisabled","DEFAULT_MESSAGE_SENTINEL","describeForegroundServiceConfig","LiveVoiceLogEvent","logAudioOutputChanged","logInfo","getCurrentClaims","readCurrentClaims","getCurrentUiState","readCurrentUiState","onUiStateChanged","observeUiState","initialize","androidServiceConfig","init","serviceTypeAsString","type","message","joinEvent","joinCode","password","apiKey","joinRequest","hasPassword","leaveEvent","leave","reconnect","reconnectRequest","getCurrentFeatures","claims","customUiAllowed","hideBranding","getCurrentSubtitleConfiguration","JSON","parse","getCurrentAvailableSubtitleConfigs","getCurrentSubtitles","getCurrentSubtitleState","parseSubtitleState","getCurrentAudioState","setLiveVoiceUseSpeaker","value","audioOutputSet","mode","startChannel","id","channelStart","channelId","stopChannel","channelStop","startSubtitles","subtitlesStart","nativeSafeId","stopSubtitles","subtitlesStop","onAudioOutputChanged","handler","data","onFeaturesChanged","onAvailableSubtitleConfigsChanged","isReady","configsSubscription","uiStateSubscription","remove","onSubtitlesChanged","subtitles","onSubtitleStateChanged","openLiveVoiceWebsite","openWebsite","getSdkVersion","wire","fragments"],"sourceRoot":"../../../src","sources":["sdk/LiveVoiceSdk.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,uBAAuB,MAAM,gCAA6B;AAEjE,SAEEC,eAAe,EACfC,wBAAwB,QACnB,oCAAiC;AACxC,SACEC,+BAA+B,EAC/BC,iBAAiB,EACjBC,qBAAqB,EACrBC,OAAO,QACF,mBAAgB;AACvB,SAEEC,gBAAgB,IAAIC,iBAAiB,EACrCC,iBAAiB,IAAIC,kBAAkB,EACvCC,gBAAgB,IAAIC,cAAc,QAC7B,qBAAkB;;AAEzB;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CACxBC,oBAA6C,GAAGb,eAAe,EACzD;EACNK,OAAO,CAACF,iBAAiB,CAACW,IAAI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