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
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
// Internal state accessors used by LiveVoiceView. These are intentionally NOT re-exported from
|
|
17
|
+
// the package entry point (`src/index.tsx`); the public, app-facing way to consume state is the
|
|
18
|
+
// `renderChannel` prop on `LiveVoiceView`. The deprecated public wrappers in `LiveVoiceSdk.ts`
|
|
19
|
+
// delegate here, which keeps the SDK's own usage free of deprecation warnings.
|
|
20
|
+
|
|
21
|
+
import LiveVoiceSdkReactNative from "../specs/NativeLiveVoiceSdk.js";
|
|
22
|
+
import { logUiState } from "../util/logger.js";
|
|
23
|
+
|
|
24
|
+
/** Authorization features for the joined event. Internal: the view uses it for branding/gating. */
|
|
25
|
+
|
|
26
|
+
export function getCurrentClaims() {
|
|
27
|
+
const claims = LiveVoiceSdkReactNative.getCurrentClaims();
|
|
28
|
+
if (claims == null) return null;
|
|
29
|
+
return JSON.parse(claims);
|
|
30
|
+
}
|
|
31
|
+
export function getCurrentUiState() {
|
|
32
|
+
return parseUiState(LiveVoiceSdkReactNative.getCurrentUiState());
|
|
33
|
+
}
|
|
34
|
+
export function onUiStateChanged(handler) {
|
|
35
|
+
return LiveVoiceSdkReactNative.onUiStateChanged(data => {
|
|
36
|
+
const state = parseUiState(data);
|
|
37
|
+
logUiState(state);
|
|
38
|
+
handler(state);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function parseUiState(data) {
|
|
42
|
+
return hydrateUiState(JSON.parse(data));
|
|
43
|
+
}
|
|
44
|
+
function hydrateUiState(state) {
|
|
45
|
+
if (state.type === 'ready') {
|
|
46
|
+
const {
|
|
47
|
+
isHeadphonesOnly: _ignored,
|
|
48
|
+
...publicState
|
|
49
|
+
} = state;
|
|
50
|
+
return publicState;
|
|
51
|
+
}
|
|
52
|
+
if (state.type !== 'reconnecting') {
|
|
53
|
+
return state;
|
|
54
|
+
}
|
|
55
|
+
if (state.state.type !== 'awaitingRetry') {
|
|
56
|
+
return state;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
...state,
|
|
60
|
+
state: {
|
|
61
|
+
...state.state,
|
|
62
|
+
retryAt: new Date(state.state.atTimestamp * 1000)
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=LiveVoiceState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LiveVoiceSdkReactNative","logUiState","getCurrentClaims","claims","JSON","parse","getCurrentUiState","parseUiState","onUiStateChanged","handler","data","state","hydrateUiState","type","isHeadphonesOnly","_ignored","publicState","retryAt","Date","atTimestamp"],"sourceRoot":"../../../src","sources":["sdk/LiveVoiceState.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,OAAOA,uBAAuB,MAAM,gCAA6B;AAEjE,SAASC,UAAU,QAAQ,mBAAgB;;AAE3C;;AAqBA,OAAO,SAASC,gBAAgBA,CAAA,EAAkB;EAChD,MAAMC,MAAM,GAAGH,uBAAuB,CAACE,gBAAgB,CAAC,CAAC;EACzD,IAAIC,MAAM,IAAI,IAAI,EAAE,OAAO,IAAI;EAC/B,OAAOC,IAAI,CAACC,KAAK,CAACF,MAAM,CAAC;AAC3B;AAEA,OAAO,SAASG,iBAAiBA,CAAA,EAAY;EAC3C,OAAOC,YAAY,CAACP,uBAAuB,CAACM,iBAAiB,CAAC,CAAC,CAAC;AAClE;AAEA,OAAO,SAASE,gBAAgBA,CAACC,OAA+B,EAE9D;EACA,OAAOT,uBAAuB,CAACQ,gBAAgB,CAAEE,IAAY,IAAK;IAChE,MAAMC,KAAK,GAAGJ,YAAY,CAACG,IAAI,CAAC;IAChCT,UAAU,CAACU,KAAK,CAAC;IACjBF,OAAO,CAACE,KAAK,CAAC;EAChB,CAAC,CAAC;AACJ;AAEA,SAASJ,YAAYA,CAACG,IAAY,EAAW;EAC3C,OAAOE,cAAc,CAACR,IAAI,CAACC,KAAK,CAACK,IAAI,CAAgB,CAAC;AACxD;AAEA,SAASE,cAAcA,CAACD,KAAkB,EAAW;EACnD,IAAIA,KAAK,CAACE,IAAI,KAAK,OAAO,EAAE;IAC1B,MAAM;MAAEC,gBAAgB,EAAEC,QAAQ;MAAE,GAAGC;IAAY,CAAC,GAAGL,KAAK;IAC5D,OAAOK,WAAW;EACpB;EAEA,IAAIL,KAAK,CAACE,IAAI,KAAK,cAAc,EAAE;IACjC,OAAOF,KAAK;EACd;EAEA,IAAIA,KAAK,CAACA,KAAK,CAACE,IAAI,KAAK,eAAe,EAAE;IACxC,OAAOF,KAAK;EACd;EAEA,OAAO;IACL,GAAGA,KAAK;IACRA,KAAK,EAAE;MACL,GAAGA,KAAK,CAACA,KAAK;MACdM,OAAO,EAAE,IAAIC,IAAI,CAACP,KAAK,CAACA,KAAK,CAACQ,WAAW,GAAG,IAAI;IAClD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
//===----------------------------------------------------------------------===//
|
|
13
15
|
|
|
14
16
|
import { TurboModuleRegistry } from 'react-native';
|
|
15
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeLiveVoiceSdk.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAA6C,cAAc;;AAEvF;AACA;;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../../src","sources":["specs/NativeLiveVoiceSdk.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,mBAAmB,QAA6C,cAAc;;AAEvF;AACA;;AAoEA,eAAeA,mBAAmB,CAACC,YAAY,CAAO,iBAAiB,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
//===----------------------------------------------------------------------===//
|
|
13
15
|
|
|
14
16
|
export const COLORS = {
|
|
15
17
|
primary: '#F1521B',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["COLORS","primary","bg","bgDark","cardBg","cardBgDark","divider","dividerDark","white","black","gray"],"sourceRoot":"../../../src","sources":["util/Colors.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,MAAM,GAAG;EACpBC,OAAO,EAAE,SAAS;EAElBC,EAAE,EAAE,SAAS;EACbC,MAAM,EAAE,SAAS;EAEjBC,MAAM,EAAE,MAAM;EACdC,UAAU,EAAE,SAAS;EAErBC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EAEtBC,KAAK,EAAE,MAAM;EACbC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EAEf,UAAU,EAAE;AACd,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["COLORS","primary","bg","bgDark","cardBg","cardBgDark","divider","dividerDark","white","black","gray"],"sourceRoot":"../../../src","sources":["util/Colors.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,MAAM,GAAG;EACpBC,OAAO,EAAE,SAAS;EAElBC,EAAE,EAAE,SAAS;EACbC,MAAM,EAAE,SAAS;EAEjBC,MAAM,EAAE,MAAM;EACdC,UAAU,EAAE,SAAS;EAErBC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EAEtBC,KAAK,EAAE,MAAM;EACbC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EAEf,UAAU,EAAE;AACd,CAAC","ignoreList":[]}
|
|
@@ -1,25 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
//===----------------------------------------------------------------------===//
|
|
13
15
|
|
|
14
16
|
// Define the union type and interfaces
|
|
15
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Sentinel sent to the native module to request the SDK's built-in default notification
|
|
20
|
+
* message. The Android native module recognizes this exact string (see
|
|
21
|
+
* `DEFAULT_MESSAGE_SENTINEL` in `LiveVoiceModule.kt`) and substitutes the real default — the
|
|
22
|
+
* two must stay in sync. iOS ignores the foreground-service config entirely.
|
|
23
|
+
*/
|
|
24
|
+
export const DEFAULT_MESSAGE_SENTINEL = 'LV_NOTIFICATION_DEFAULT_MESSAGE';
|
|
25
|
+
|
|
16
26
|
// Named exports for the constants and function
|
|
17
27
|
export const serviceDisabled = {
|
|
18
28
|
type: 'Disabled'
|
|
19
29
|
};
|
|
20
30
|
export const serviceEnabledWithDefaultMessage = {
|
|
21
31
|
type: 'Enabled',
|
|
22
|
-
message:
|
|
32
|
+
message: DEFAULT_MESSAGE_SENTINEL
|
|
23
33
|
};
|
|
24
34
|
export const serviceEnabledWithMessage = message => ({
|
|
25
35
|
type: 'Enabled',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["serviceDisabled","type","serviceEnabledWithDefaultMessage","message","serviceEnabledWithMessage"],"sourceRoot":"../../../src","sources":["util/ForegroundServiceConfig.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAYA;AACA,OAAO,MAAMA,eAAyB,GAAG;EAAEC,IAAI,EAAE;AAAW,CAAC;AAE7D,OAAO,MAAMC,gCAAyC,GAAG;EAAED,IAAI,EAAE,SAAS;EAAEE,OAAO,
|
|
1
|
+
{"version":3,"names":["DEFAULT_MESSAGE_SENTINEL","serviceDisabled","type","serviceEnabledWithDefaultMessage","message","serviceEnabledWithMessage"],"sourceRoot":"../../../src","sources":["util/ForegroundServiceConfig.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,GAAG,iCAAiC;;AAEzE;AACA,OAAO,MAAMC,eAAyB,GAAG;EAAEC,IAAI,EAAE;AAAW,CAAC;AAE7D,OAAO,MAAMC,gCAAyC,GAAG;EAAED,IAAI,EAAE,SAAS;EAAEE,OAAO,EAAEJ;AAAyB,CAAC;AAE/G,OAAO,MAAMK,yBAAyB,GAAID,OAAsB,KAAe;EAC7EF,IAAI,EAAE,SAAS;EACfE;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
//===----------------------------------------------------------------------===//
|
|
13
15
|
|
|
14
16
|
export let PlayingState = /*#__PURE__*/function (PlayingState) {
|
|
15
17
|
PlayingState["STOPPED"] = "STOPPED";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PlayingState"],"sourceRoot":"../../../src","sources":["util/PlayingState.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAIvB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PlayingState"],"sourceRoot":"../../../src","sources":["util/PlayingState.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAIvB","ignoreList":[]}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+
//===----------------------------------------------------------------------===//
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
17
|
* @fileoverview Translated strings for the React Native SDK.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LiveVoiceSdkReactNative","Translations","channelStatusOffline","noChannels","isAiChannelStatusMessage","sdkNoMatchingChannels","errorScreenRetrying","errorScreenRetryingIn","seconds","sdkErrorGeneric","sdkErrorInactive","sdkErrorInvalidApiKey","sdkErrorListenerLimitReached","sdkErrorNoNetwork","sdkErrorNotFound","sdkErrorRequestFailed","errorCode","sdkErrorWrongPassword","errorRetryNowButton","streamingByTitle","accessibilityChannelPlay","accessibilityChannelStatusMuted","accessibilityChannelStop"],"sourceRoot":"../../../src","sources":["util/Translations.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAOA,uBAAuB,MAAM,gCAA6B;AAEjE,OAAO,MAAMC,YAAY,GAAG;EAC1BC,oBAAoB,EAAEA,CAAA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,KAAcrB,uBAAuB,CAACqB,+BAA+B,CAAC,CAAC;EACxGC,wBAAwB,EAAEA,CAAA,KAActB,uBAAuB,CAACsB,wBAAwB,CAAC;AAC3F,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["LiveVoiceSdkReactNative","Translations","channelStatusOffline","noChannels","isAiChannelStatusMessage","sdkNoMatchingChannels","errorScreenRetrying","errorScreenRetryingIn","seconds","sdkErrorGeneric","sdkErrorInactive","sdkErrorInvalidApiKey","sdkErrorListenerLimitReached","sdkErrorNoNetwork","sdkErrorNotFound","sdkErrorRequestFailed","errorCode","sdkErrorWrongPassword","errorRetryNowButton","streamingByTitle","accessibilityChannelPlay","accessibilityChannelStatusMuted","accessibilityChannelStop"],"sourceRoot":"../../../src","sources":["util/Translations.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAOA,uBAAuB,MAAM,gCAA6B;AAEjE,OAAO,MAAMC,YAAY,GAAG;EAC1BC,oBAAoB,EAAEA,CAAA,KAAcF,uBAAuB,CAACE,oBAAoB,CAAC,CAAC;EAClFC,UAAU,EAAEA,CAAA,KAAcH,uBAAuB,CAACG,UAAU,CAAC,CAAC;EAC9DC,wBAAwB,EAAEA,CAAA,KAAcJ,uBAAuB,CAACI,wBAAwB,CAAC,CAAC;EAC1FC,qBAAqB,EAAEA,CAAA,KAAcL,uBAAuB,CAACK,qBAAqB,CAAC,CAAC;EACpFC,mBAAmB,EAAEA,CAAA,KAAcN,uBAAuB,CAACM,mBAAmB,CAAC,CAAC;EAChFC,qBAAqB,EAAGC,OAAe,IAAaR,uBAAuB,CAACO,qBAAqB,CAACC,OAAO,CAAC;EAC1GC,eAAe,EAAEA,CAAA,KAAcT,uBAAuB,CAACS,eAAe,CAAC,CAAC;EACxEC,gBAAgB,EAAEA,CAAA,KAAcV,uBAAuB,CAACU,gBAAgB,CAAC,CAAC;EAC1EC,qBAAqB,EAAEA,CAAA,KAAcX,uBAAuB,CAACW,qBAAqB,CAAC,CAAC;EACpFC,4BAA4B,EAAEA,CAAA,KAAcZ,uBAAuB,CAACY,4BAA4B,CAAC,CAAC;EAClGC,iBAAiB,EAAEA,CAAA,KAAcb,uBAAuB,CAACa,iBAAiB,CAAC,CAAC;EAC5EC,gBAAgB,EAAEA,CAAA,KAAcd,uBAAuB,CAACc,gBAAgB,CAAC,CAAC;EAC1EC,qBAAqB,EAAGC,SAAiB,IAAahB,uBAAuB,CAACe,qBAAqB,CAACC,SAAS,CAAC;EAC9GC,qBAAqB,EAAEA,CAAA,KAAcjB,uBAAuB,CAACiB,qBAAqB,CAAC,CAAC;EACpFC,mBAAmB,EAAEA,CAAA,KAAclB,uBAAuB,CAACkB,mBAAmB,CAAC,CAAC;EAChFC,gBAAgB,EAAEA,CAAA,KAAcnB,uBAAuB,CAACmB,gBAAgB,CAAC,CAAC;EAC1EC,wBAAwB,EAAEA,CAAA,KAAcpB,uBAAuB,CAACoB,wBAAwB,CAAC,CAAC;EAC1FC,+BAA+B,EAAEA,CAAA,KAAcrB,uBAAuB,CAACqB,+BAA+B,CAAC,CAAC;EACxGC,wBAAwB,EAAEA,CAAA,KAActB,uBAAuB,CAACsB,wBAAwB,CAAC;AAC3F,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
export const LiveVoiceLogEvent = {
|
|
17
|
+
init: "LV_INIT",
|
|
18
|
+
joinRequest: "LV_JOIN_REQUEST",
|
|
19
|
+
leave: "LV_LEAVE",
|
|
20
|
+
reconnectRequest: "LV_RECONNECT_REQUEST",
|
|
21
|
+
uiState: "LV_UI_STATE",
|
|
22
|
+
audioOutputSet: "LV_AUDIO_OUTPUT_SET",
|
|
23
|
+
audioOutputChanged: "LV_AUDIO_OUTPUT_CHANGED",
|
|
24
|
+
channelStart: "LV_CHANNEL_START",
|
|
25
|
+
channelStop: "LV_CHANNEL_STOP",
|
|
26
|
+
subtitlesStart: "LV_SUBTITLES_START",
|
|
27
|
+
subtitlesStop: "LV_SUBTITLES_STOP",
|
|
28
|
+
openWebsite: "LV_OPEN_WEBSITE"
|
|
29
|
+
};
|
|
30
|
+
export function logInfo(event, fields) {
|
|
31
|
+
console.info(formatMessage("INFO", event, fields));
|
|
32
|
+
}
|
|
33
|
+
export function logUiState(state) {
|
|
34
|
+
logInfo(LiveVoiceLogEvent.uiState, describeUiState(state));
|
|
35
|
+
}
|
|
36
|
+
export function logAudioOutputChanged(useSpeaker) {
|
|
37
|
+
logInfo(LiveVoiceLogEvent.audioOutputChanged, {
|
|
38
|
+
mode: useSpeaker ? "speaker" : "receiver"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export function describeForegroundServiceConfig(serviceConfig) {
|
|
42
|
+
if (serviceConfig.type === "Disabled") return "disabled";
|
|
43
|
+
return serviceConfig.message == null ? "default" : "custom";
|
|
44
|
+
}
|
|
45
|
+
function describeUiState(state) {
|
|
46
|
+
switch (state.type) {
|
|
47
|
+
case "loading":
|
|
48
|
+
return {
|
|
49
|
+
type: "loading"
|
|
50
|
+
};
|
|
51
|
+
case "ready":
|
|
52
|
+
return {
|
|
53
|
+
channelCount: state.channels.length,
|
|
54
|
+
outputMode: state.outputMode,
|
|
55
|
+
type: "ready"
|
|
56
|
+
};
|
|
57
|
+
case "error":
|
|
58
|
+
return {
|
|
59
|
+
canBeRetried: state.canBeRetried,
|
|
60
|
+
type: "error"
|
|
61
|
+
};
|
|
62
|
+
case "reconnecting":
|
|
63
|
+
return {
|
|
64
|
+
retryState: describeRetryState(state.state),
|
|
65
|
+
type: "reconnecting"
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function describeRetryState(state) {
|
|
70
|
+
return state.type;
|
|
71
|
+
}
|
|
72
|
+
function formatMessage(level, event, fields) {
|
|
73
|
+
const fieldText = fields == null ? "" : Object.entries(fields).filter(([, value]) => value != null).sort(([left], [right]) => left.localeCompare(right)).map(([key, value]) => `${key}=${value}`).join(" ");
|
|
74
|
+
return ["[LiveVoiceSDK]", level, event, fieldText].filter(part => part.length > 0).join(" ");
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["LiveVoiceLogEvent","init","joinRequest","leave","reconnectRequest","uiState","audioOutputSet","audioOutputChanged","channelStart","channelStop","subtitlesStart","subtitlesStop","openWebsite","logInfo","event","fields","console","info","formatMessage","logUiState","state","describeUiState","logAudioOutputChanged","useSpeaker","mode","describeForegroundServiceConfig","serviceConfig","type","message","channelCount","channels","length","outputMode","canBeRetried","retryState","describeRetryState","level","fieldText","Object","entries","filter","value","sort","left","right","localeCompare","map","key","join","part"],"sourceRoot":"../../../src","sources":["util/logger.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,OAAO,MAAMA,iBAAiB,GAAG;EAC/BC,IAAI,EAAE,SAAS;EACfC,WAAW,EAAE,iBAAiB;EAC9BC,KAAK,EAAE,UAAU;EACjBC,gBAAgB,EAAE,sBAAsB;EACxCC,OAAO,EAAE,aAAa;EACtBC,cAAc,EAAE,qBAAqB;EACrCC,kBAAkB,EAAE,yBAAyB;EAC7CC,YAAY,EAAE,kBAAkB;EAChCC,WAAW,EAAE,iBAAiB;EAC9BC,cAAc,EAAE,oBAAoB;EACpCC,aAAa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ACrD,OAAOA,KAAK,CAACO,IAAI;AACnB;AAEA,SAAST,aAAaA,CAACkB,KAAa,EAAEtB,KAAa,EAAEC,MAAkB,EAAU;EAC/E,MAAMsB,SAAS,GAAGtB,MAAM,IAAI,IAAI,GAAG,EAAE,GAAGuB,MAAM,CAACC,OAAO,CAACxB,MAAM,CAAC,CAC3DyB,MAAM,CAAC,CAAC,GAAGC,KAAK,CAAC,KAAKA,KAAK,IAAI,IAAI,CAAC,CACpCC,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAACC,KAAK,CAAC,KAAKD,IAAI,CAACE,aAAa,CAACD,KAAK,CAAC,CAAC,CACpDE,GAAG,CAAC,CAAC,CAACC,GAAG,EAAEN,KAAK,CAAC,KAAK,GAAGM,GAAG,IAAIN,KAAK,EAAE,CAAC,CACxCO,IAAI,CAAC,GAAG,CAAC;EAEZ,OAAO,CAAC,gBAAgB,EAAEZ,KAAK,EAAEtB,KAAK,EAAEuB,SAAS,CAAC,CAC/CG,MAAM,CAAES,IAAI,IAAKA,IAAI,CAAClB,MAAM,GAAG,CAAC,CAAC,CACjCiB,IAAI,CAAC,GAAG,CAAC;AACd","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioOutputSwitchView.d.ts","sourceRoot":"","sources":["../../../../src/components/AudioOutputSwitchView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AudioOutputSwitchView.d.ts","sourceRoot":"","sources":["../../../../src/components/AudioOutputSwitchView.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAW5D,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA2ElE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrandingView.d.ts","sourceRoot":"","sources":["../../../../src/components/BrandingView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrandingView.d.ts","sourceRoot":"","sources":["../../../../src/components/BrandingView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyBhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelView.d.ts","sourceRoot":"","sources":["../../../../src/components/ChannelView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChannelView.d.ts","sourceRoot":"","sources":["../../../../src/components/ChannelView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4C9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorView.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorView.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,UAAU,CAAA;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA6B1C,CAAC"}
|
|
@@ -1,5 +1,27 @@
|
|
|
1
|
+
import { type Channel } from "../util/UIState";
|
|
2
|
+
/** Per-cell helpers passed to {@link LiveVoiceViewProps.renderChannel}, mirroring the native SDKs. */
|
|
3
|
+
export interface ChannelCellHelpers {
|
|
4
|
+
/** Whether this is the last channel in the (filtered) list — e.g. to omit a trailing divider. */
|
|
5
|
+
isLastInList: boolean;
|
|
6
|
+
/** Toggle audio for this channel: starts it if stopped, stops it if playing. */
|
|
7
|
+
onAudioPress: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** Renders a custom channel cell. See {@link LiveVoiceViewProps.renderChannel}. */
|
|
10
|
+
export type RenderChannel = (channel: Channel, helpers: ChannelCellHelpers) => React.ReactNode;
|
|
1
11
|
export interface LiveVoiceViewProps {
|
|
2
12
|
isDarkMode?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Return true for channels that should be displayed by the drop-in view.
|
|
15
|
+
*/
|
|
16
|
+
filter?: (channel: Channel) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Render a custom channel cell instead of the default one.
|
|
19
|
+
*
|
|
20
|
+
* Requires an API key that permits custom UI. If a `renderChannel` is provided but the joined
|
|
21
|
+
* event's key doesn't allow custom UI, the view shows the invalid-api-key error instead — the
|
|
22
|
+
* same gating the native SDKs apply. When omitted, the default cell is used.
|
|
23
|
+
*/
|
|
24
|
+
renderChannel?: RenderChannel;
|
|
3
25
|
}
|
|
4
26
|
export declare const LiveVoiceView: React.FC<LiveVoiceViewProps>;
|
|
5
27
|
export default LiveVoiceView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveVoiceView.d.ts","sourceRoot":"","sources":["../../../../src/components/LiveVoiceView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LiveVoiceView.d.ts","sourceRoot":"","sources":["../../../../src/components/LiveVoiceView.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAE,KAAK,OAAO,EAAgB,MAAM,iBAAiB,CAAC;AAG7D,sGAAsG;AACtG,MAAM,WAAW,kBAAkB;IACjC,iGAAiG;IACjG,YAAY,EAAE,OAAO,CAAC;IACtB,gFAAgF;IAChF,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,kBAAkB,KACxB,KAAK,CAAC,SAAS,CAAC;AAErB,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IACvC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAiCD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAwKtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayButtonView.d.ts","sourceRoot":"","sources":["../../../../src/components/PlayButtonView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlayButtonView.d.ts","sourceRoot":"","sources":["../../../../src/components/PlayButtonView.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAA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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReconnectingView.d.ts","sourceRoot":"","sources":["../../../../src/components/ReconnectingView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReconnectingView.d.ts","sourceRoot":"","sources":["../../../../src/components/ReconnectingView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,KAAK,EAAE,YAAY,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiExD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningView.d.ts","sourceRoot":"","sources":["../../../../src/components/WarningView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningView.d.ts","sourceRoot":"","sources":["../../../../src/components/WarningView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAiB9C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.tsx"],"names":[],"mappings":"AAaA,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
@@ -1,145 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export * from "./components";
|
|
8
|
-
export * from "./util/Translations";
|
|
9
|
-
export * from "./util/ForegroundServiceConfig";
|
|
10
|
-
export * from "./util/UIState";
|
|
11
|
-
export * from "./util/PlayingState";
|
|
12
|
-
/**
|
|
13
|
-
* Initialize the LiveVoice SDK.
|
|
14
|
-
*
|
|
15
|
-
* @param {ForegroundServiceConfig} [androidServiceConfig=serviceDisabled] - Pass the service config on Android.
|
|
16
|
-
*/
|
|
17
|
-
export declare function initialize(androidServiceConfig?: ForegroundServiceConfig): void;
|
|
18
|
-
/**
|
|
19
|
-
* Join an event.
|
|
20
|
-
*
|
|
21
|
-
* @abstract By joining an event you can display the event's channels.
|
|
22
|
-
*
|
|
23
|
-
* @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'.
|
|
24
|
-
* @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.
|
|
25
|
-
* @param {string} apiKey - Your API key. You can find your API key in the account page when logged in on the website.
|
|
26
|
-
*/
|
|
27
|
-
export declare function joinEvent(joinCode: string, password: string | null, apiKey: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Leave the current event.
|
|
30
|
-
*
|
|
31
|
-
* @abstract You can explicitly leave an event to tear down any network connections the SDK uses when you no longer display any channels.
|
|
32
|
-
*/
|
|
33
|
-
export declare function leaveEvent(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Reconnect when a connection error occurred.
|
|
36
|
-
*
|
|
37
|
-
* @abstract Call this method to try to reconnect when a connection error has occurred.
|
|
38
|
-
*/
|
|
39
|
-
export declare function reconnect(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Get the claims for the current event.
|
|
42
|
-
*
|
|
43
|
-
* @abstract The claims determine the authorized features for an API key. Claims are available, once an event has been joined.
|
|
44
|
-
* @returns {Claims | null} The authorization claims, or `nil` if not yet joined
|
|
45
|
-
*/
|
|
46
|
-
export declare function getCurrentClaims(): Claims | null;
|
|
47
|
-
/**
|
|
48
|
-
* Get the current state of the LiveVoice SDK.
|
|
49
|
-
*
|
|
50
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onUiStateChanged}
|
|
51
|
-
` to be updated about the view state.
|
|
52
|
-
* @returns {UiState} The current view state
|
|
53
|
-
*/
|
|
54
|
-
export declare function getCurrentUiState(): UiState;
|
|
55
|
-
/**
|
|
56
|
-
* Get the current available subtitle configurations LiveVoice SDK.
|
|
57
|
-
*
|
|
58
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onAvailableSubtitleConfigsChanged}
|
|
59
|
-
` to be updated when the available subtitle configurations change.
|
|
60
|
-
* @returns {[AvailableSubtitle]} The current available subtitles
|
|
61
|
-
*/
|
|
62
|
-
export declare function getCurrentSubtitleConfiguration(): [AvailableSubtitle];
|
|
63
|
-
/**
|
|
64
|
-
* Get the current subtitle elemens LiveVoice SDK.
|
|
65
|
-
*
|
|
66
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onSubtitlesChanged}
|
|
67
|
-
` to be updated when the new subtitles are added.
|
|
68
|
-
* @returns {[String]} The current subtitles
|
|
69
|
-
*/
|
|
70
|
-
export declare function getCurrentSubtitles(): [String];
|
|
71
|
-
/**
|
|
72
|
-
* Get the current state of the audio output.
|
|
73
|
-
*
|
|
74
|
-
* @abstract You should only need to call this method to get an initial value. Use {@link onAudioOutputChanged}
|
|
75
|
-
` to be updated about the audio state.
|
|
76
|
-
* @returns {boolean} `true` for the speaker and `false` for the receiver.
|
|
77
|
-
*/
|
|
78
|
-
export declare function getCurrentAudioState(): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* Set the audio output.
|
|
81
|
-
* @param {boolean} value - Set to `true` to use the speaker, and `false` to use the receiver.
|
|
82
|
-
*/
|
|
83
|
-
export declare function setLiveVoiceUseSpeaker(value: boolean): void;
|
|
84
|
-
/**
|
|
85
|
-
* Start playing a channel.
|
|
86
|
-
* @abstract You can find the channel ID for a channel in the admin web-interface at the bottom when tapping *Edit Channel*.
|
|
87
|
-
* @param {number} [id] - The channel ID.
|
|
88
|
-
*/
|
|
89
|
-
export declare function startChannel(id: number): void;
|
|
90
|
-
/**
|
|
91
|
-
* Stop playing the currently playing channel.
|
|
92
|
-
*/
|
|
93
|
-
export declare function stopChannel(): void;
|
|
94
|
-
/**
|
|
95
|
-
* Start receiving subtitles.
|
|
96
|
-
* @abstract The SDK can receive a single stream of subtitle fragments at a time.
|
|
97
|
-
* You can stop receiving subtitles using {@link stopSubtitles()}.
|
|
98
|
-
* Whenever you call this method, any previous subtitle streams are stopped automatically and you receive the subtitles for the requested channel and language instead.
|
|
99
|
-
*
|
|
100
|
-
* 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.
|
|
101
|
-
*
|
|
102
|
-
* @param {number | null} channelId - The channel to receive subtitles for. Set to `null` to always receive subtitles for the currently playing channel.
|
|
103
|
-
*/
|
|
104
|
-
export declare function startSubtitles(channelId: number | null): void;
|
|
105
|
-
/**
|
|
106
|
-
* Stop receiving subtitles.
|
|
107
|
-
*/
|
|
108
|
-
export declare function stopSubtitles(): void;
|
|
109
|
-
/**
|
|
110
|
-
* Handle changes of the audio output.
|
|
111
|
-
*
|
|
112
|
-
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
113
|
-
*/
|
|
114
|
-
export declare function onAudioOutputChanged(handler: (useSpeaker: boolean) => void): {
|
|
115
|
-
remove: () => void;
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Handle changes of the UI state.
|
|
119
|
-
*
|
|
120
|
-
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
121
|
-
*/
|
|
122
|
-
export declare function onUiStateChanged(handler: (arg: UiState) => void): {
|
|
123
|
-
remove: () => void;
|
|
124
|
-
};
|
|
125
|
-
/**
|
|
126
|
-
* Handle changes of the available subtitles.
|
|
127
|
-
*
|
|
128
|
-
* @returns { object } - An object with a`remove` method to unsubscribe from the event.
|
|
129
|
-
*/
|
|
130
|
-
export declare function onAvailableSubtitleConfigsChanged(handler: (arg: [AvailableSubtitle]) => void): {
|
|
131
|
-
remove: () => void;
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* Handle changes of the available subtitles.
|
|
135
|
-
*
|
|
136
|
-
* @returns {object} - An object with a `remove` method to unsubscribe from the event.
|
|
137
|
-
*/
|
|
138
|
-
export declare function onSubtitlesChanged(handler: (arg: [String]) => void): {
|
|
139
|
-
remove: () => void;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Open the LiveVoice website in the device's default browser.
|
|
143
|
-
*/
|
|
144
|
-
export declare function openLiveVoiceWebsite(): void;
|
|
1
|
+
export * from './sdk/LiveVoiceSdk';
|
|
2
|
+
export * from './components';
|
|
3
|
+
export * from './util/Translations';
|
|
4
|
+
export * from './util/ForegroundServiceConfig';
|
|
5
|
+
export * from './util/UIState';
|
|
6
|
+
export * from './util/PlayingState';
|
|
145
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|