livevoice-sdk-react-native 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -66
- package/android/build.gradle +5 -4
- package/android/src/main/java/io/livevoice/react/LiveVoiceModule.kt +122 -188
- package/android/src/main/java/io/livevoice/react/__SDK.kt +2 -2
- package/ios/LiveVoiceRNBridge.swift +362 -0
- package/ios/LiveVoiceSdkReactNative.mm +187 -158
- package/ios/__SDK.h +1 -1
- package/ios/livevoice_spm_backport.rb +202 -0
- package/lib/module/components/BrandingView.js +58 -39
- package/lib/module/components/BrandingView.js.map +1 -1
- package/lib/module/components/ChannelView.js +355 -44
- package/lib/module/components/ChannelView.js.map +1 -1
- package/lib/module/components/ErrorView.js +5 -6
- package/lib/module/components/ErrorView.js.map +1 -1
- package/lib/module/components/LiveVoiceSpinner.js +81 -0
- package/lib/module/components/LiveVoiceSpinner.js.map +1 -0
- package/lib/module/components/LiveVoiceView.js +311 -133
- package/lib/module/components/LiveVoiceView.js.map +1 -1
- package/lib/module/components/PasswordPrompt.js +165 -0
- package/lib/module/components/PasswordPrompt.js.map +1 -0
- package/lib/module/components/PlayButtonView.js +180 -244
- package/lib/module/components/PlayButtonView.js.map +1 -1
- package/lib/module/components/ReconnectingView.js +31 -53
- package/lib/module/components/ReconnectingView.js.map +1 -1
- package/lib/module/icons/branding-ios.png +0 -0
- package/lib/module/icons/camera-off-android.png +0 -0
- package/lib/module/icons/camera-off-android@2x.png +0 -0
- package/lib/module/icons/camera-off-android@3x.png +0 -0
- package/lib/module/icons/cpu-android.png +0 -0
- package/lib/module/icons/cpu-android@2x.png +0 -0
- package/lib/module/icons/cpu-android@3x.png +0 -0
- package/lib/module/icons/cpu-ios.png +0 -0
- package/lib/module/icons/cpu-ios@2x.png +0 -0
- package/lib/module/icons/cpu-ios@3x.png +0 -0
- package/lib/module/icons/lock-android.png +0 -0
- package/lib/module/icons/lock-android@2x.png +0 -0
- package/lib/module/icons/lock-android@3x.png +0 -0
- package/lib/module/icons/lock-ios.png +0 -0
- package/lib/module/icons/lock-ios@2x.png +0 -0
- package/lib/module/icons/lock-ios@3x.png +0 -0
- package/lib/module/icons/mic-off-android.png +0 -0
- package/lib/module/icons/mic-off-android@2x.png +0 -0
- package/lib/module/icons/mic-off-android@3x.png +0 -0
- package/lib/module/icons/mic-slash-ios.png +0 -0
- package/lib/module/icons/mic-slash-ios@2x.png +0 -0
- package/lib/module/icons/mic-slash-ios@3x.png +0 -0
- package/lib/module/icons/video-slash-ios.png +0 -0
- package/lib/module/icons/video-slash-ios@2x.png +0 -0
- package/lib/module/icons/video-slash-ios@3x.png +0 -0
- package/lib/module/index.js +11 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/sdk/Bridge.js +236 -0
- package/lib/module/sdk/Bridge.js.map +1 -0
- package/lib/module/sdk/Event.js +160 -0
- package/lib/module/sdk/Event.js.map +1 -0
- package/lib/module/sdk/Lifecycle.js +331 -0
- package/lib/module/sdk/Lifecycle.js.map +1 -0
- package/lib/module/sdk/LiveVoiceSdk.js +262 -268
- package/lib/module/sdk/LiveVoiceSdk.js.map +1 -1
- package/lib/module/sdk/LiveVoiceState.js +208 -40
- package/lib/module/sdk/LiveVoiceState.js.map +1 -1
- package/lib/module/sdk/LogEntries.js +99 -0
- package/lib/module/sdk/LogEntries.js.map +1 -0
- package/lib/module/sdk/Models.js +2 -0
- package/lib/module/{util/UIState.js.map → sdk/Models.js.map} +1 -1
- package/lib/module/{util/PlayingState.js → sdk/NativeSdkVersions.js} +9 -8
- package/lib/module/sdk/NativeSdkVersions.js.map +1 -0
- package/lib/module/sdk/Observables.js +391 -0
- package/lib/module/sdk/Observables.js.map +1 -0
- package/lib/module/sdk/Passwords.js +298 -0
- package/lib/module/sdk/Passwords.js.map +1 -0
- package/lib/module/sdk/Playback.js +35 -0
- package/lib/module/sdk/Playback.js.map +1 -0
- package/lib/module/specs/NativeLiveVoiceSdk.js.map +1 -1
- package/lib/module/util/Colors.js +2 -1
- package/lib/module/util/Colors.js.map +1 -1
- package/lib/module/util/Translations.js +34 -11
- package/lib/module/util/Translations.js.map +1 -1
- package/lib/module/util/freeze.js +26 -0
- package/lib/module/util/freeze.js.map +1 -0
- package/lib/module/util/logger.js +79 -41
- package/lib/module/util/logger.js.map +1 -1
- package/lib/typescript/src/components/BrandingView.d.ts +4 -0
- package/lib/typescript/src/components/BrandingView.d.ts.map +1 -1
- package/lib/typescript/src/components/ChannelView.d.ts +29 -3
- package/lib/typescript/src/components/ChannelView.d.ts.map +1 -1
- package/lib/typescript/src/components/ErrorView.d.ts +5 -3
- package/lib/typescript/src/components/ErrorView.d.ts.map +1 -1
- package/lib/typescript/src/components/LiveVoiceSpinner.d.ts +16 -0
- package/lib/typescript/src/components/LiveVoiceSpinner.d.ts.map +1 -0
- package/lib/typescript/src/components/LiveVoiceView.d.ts +81 -21
- package/lib/typescript/src/components/LiveVoiceView.d.ts.map +1 -1
- package/lib/typescript/src/components/PasswordPrompt.d.ts +13 -0
- package/lib/typescript/src/components/PasswordPrompt.d.ts.map +1 -0
- package/lib/typescript/src/components/PlayButtonView.d.ts +12 -329
- package/lib/typescript/src/components/PlayButtonView.d.ts.map +1 -1
- package/lib/typescript/src/components/ReconnectingView.d.ts +6 -3
- package/lib/typescript/src/components/ReconnectingView.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +15 -6
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/sdk/Bridge.d.ts +36 -0
- package/lib/typescript/src/sdk/Bridge.d.ts.map +1 -0
- package/lib/typescript/src/sdk/Event.d.ts +97 -0
- package/lib/typescript/src/sdk/Event.d.ts.map +1 -0
- package/lib/typescript/src/sdk/Lifecycle.d.ts +191 -0
- package/lib/typescript/src/sdk/Lifecycle.d.ts.map +1 -0
- package/lib/typescript/src/sdk/LiveVoiceSdk.d.ts +195 -190
- package/lib/typescript/src/sdk/LiveVoiceSdk.d.ts.map +1 -1
- package/lib/typescript/src/sdk/LiveVoiceState.d.ts +77 -9
- package/lib/typescript/src/sdk/LiveVoiceState.d.ts.map +1 -1
- package/lib/typescript/src/sdk/LogEntries.d.ts +28 -0
- package/lib/typescript/src/sdk/LogEntries.d.ts.map +1 -0
- package/lib/typescript/src/sdk/Models.d.ts +114 -0
- package/lib/typescript/src/sdk/Models.d.ts.map +1 -0
- package/lib/typescript/src/sdk/NativeSdkVersions.d.ts +6 -0
- package/lib/typescript/src/sdk/NativeSdkVersions.d.ts.map +1 -0
- package/lib/typescript/src/sdk/Observables.d.ts +123 -0
- package/lib/typescript/src/sdk/Observables.d.ts.map +1 -0
- package/lib/typescript/src/sdk/Passwords.d.ts +72 -0
- package/lib/typescript/src/sdk/Passwords.d.ts.map +1 -0
- package/lib/typescript/src/sdk/Playback.d.ts +9 -0
- package/lib/typescript/src/sdk/Playback.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeLiveVoiceSdk.d.ts +34 -31
- 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/Translations.d.ts +30 -8
- package/lib/typescript/src/util/Translations.d.ts.map +1 -1
- package/lib/typescript/src/util/freeze.d.ts +6 -0
- package/lib/typescript/src/util/freeze.d.ts.map +1 -0
- package/lib/typescript/src/util/logger.d.ts +17 -7
- package/lib/typescript/src/util/logger.d.ts.map +1 -1
- package/livevoice-sdk-react-native.podspec +29 -4
- package/package.json +12 -9
- package/src/components/BrandingView.tsx +42 -55
- package/src/components/ChannelView.tsx +329 -38
- package/src/components/ErrorView.tsx +9 -12
- package/src/components/LiveVoiceSpinner.tsx +87 -0
- package/src/components/LiveVoiceView.tsx +319 -201
- package/src/components/PasswordPrompt.tsx +144 -0
- package/src/components/PlayButtonView.tsx +165 -269
- package/src/components/ReconnectingView.tsx +28 -81
- package/src/icons/branding-ios.png +0 -0
- package/src/icons/camera-off-android.png +0 -0
- package/src/icons/camera-off-android@2x.png +0 -0
- package/src/icons/camera-off-android@3x.png +0 -0
- package/src/icons/cpu-android.png +0 -0
- package/src/icons/cpu-android@2x.png +0 -0
- package/src/icons/cpu-android@3x.png +0 -0
- package/src/icons/cpu-ios.png +0 -0
- package/src/icons/cpu-ios@2x.png +0 -0
- package/src/icons/cpu-ios@3x.png +0 -0
- package/src/icons/lock-android.png +0 -0
- package/src/icons/lock-android@2x.png +0 -0
- package/src/icons/lock-android@3x.png +0 -0
- package/src/icons/lock-ios.png +0 -0
- package/src/icons/lock-ios@2x.png +0 -0
- package/src/icons/lock-ios@3x.png +0 -0
- package/src/icons/mic-off-android.png +0 -0
- package/src/icons/mic-off-android@2x.png +0 -0
- package/src/icons/mic-off-android@3x.png +0 -0
- package/src/icons/mic-slash-ios.png +0 -0
- package/src/icons/mic-slash-ios@2x.png +0 -0
- package/src/icons/mic-slash-ios@3x.png +0 -0
- package/src/icons/video-slash-ios.png +0 -0
- package/src/icons/video-slash-ios@2x.png +0 -0
- package/src/icons/video-slash-ios@3x.png +0 -0
- package/src/index.tsx +92 -6
- package/src/sdk/Bridge.ts +259 -0
- package/src/sdk/Event.ts +187 -0
- package/src/sdk/Lifecycle.ts +366 -0
- package/src/sdk/LiveVoiceSdk.ts +285 -309
- package/src/sdk/LiveVoiceState.ts +230 -60
- package/src/sdk/LogEntries.ts +88 -0
- package/src/sdk/Models.ts +129 -0
- package/src/{util/PlayingState.ts → sdk/NativeSdkVersions.ts} +7 -6
- package/src/sdk/Observables.ts +414 -0
- package/src/sdk/Passwords.ts +286 -0
- package/src/sdk/Playback.ts +30 -0
- package/src/specs/NativeLiveVoiceSdk.ts +42 -38
- package/src/util/Colors.ts +2 -1
- package/src/util/Translations.ts +34 -12
- package/src/util/freeze.ts +23 -0
- package/src/util/logger.ts +79 -52
- package/lib/module/components/AudioOutputSwitchView.js +0 -138
- package/lib/module/components/AudioOutputSwitchView.js.map +0 -1
- package/lib/module/components/index.js +0 -24
- package/lib/module/components/index.js.map +0 -1
- package/lib/module/icons/mic.png +0 -0
- package/lib/module/util/ForegroundServiceConfig.js +0 -38
- package/lib/module/util/ForegroundServiceConfig.js.map +0 -1
- package/lib/module/util/PlayingState.js.map +0 -1
- package/lib/module/util/UIState.js +0 -4
- package/lib/typescript/src/components/AudioOutputSwitchView.d.ts +0 -6
- package/lib/typescript/src/components/AudioOutputSwitchView.d.ts.map +0 -1
- package/lib/typescript/src/components/index.d.ts +0 -9
- package/lib/typescript/src/components/index.d.ts.map +0 -1
- package/lib/typescript/src/util/ForegroundServiceConfig.d.ts +0 -19
- package/lib/typescript/src/util/ForegroundServiceConfig.d.ts.map +0 -1
- package/lib/typescript/src/util/PlayingState.d.ts +0 -7
- package/lib/typescript/src/util/PlayingState.d.ts.map +0 -1
- package/lib/typescript/src/util/UIState.d.ts +0 -86
- package/lib/typescript/src/util/UIState.d.ts.map +0 -1
- package/src/components/AudioOutputSwitchView.tsx +0 -146
- package/src/components/index.tsx +0 -21
- package/src/icons/mic.png +0 -0
- package/src/util/ForegroundServiceConfig.tsx +0 -42
- package/src/util/UIState.ts +0 -106
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
|
2
|
+
//
|
|
3
|
+
// This source file is part of the LiveVoice SDK project
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) LiveVoice GmbH
|
|
6
|
+
// Licensed under the MIT license
|
|
7
|
+
//
|
|
8
|
+
// See LICENSE for license information
|
|
9
|
+
//
|
|
10
|
+
// SPDX-License-Identifier: MIT
|
|
11
|
+
//
|
|
12
|
+
//===----------------------------------------------------------------------===//
|
|
13
|
+
|
|
14
|
+
// Internal: the action of a channel cell, the wrapper's only playback start. It is not exported
|
|
15
|
+
// from the package entry point; only `LiveVoiceView` calls it, for its default cells and for the
|
|
16
|
+
// `LiveVoiceChannelCell` objects it hands to `renderChannelCell`.
|
|
17
|
+
|
|
18
|
+
import { channelId as validateChannelId, invoke } from './Lifecycle';
|
|
19
|
+
|
|
20
|
+
/** Which kind of cell acts: native checks the custom-UI permission again for `custom`. */
|
|
21
|
+
export type CellKind = 'default' | 'custom';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Starts the channel if it is stopped, stops it if it is playing, as native decides from the
|
|
25
|
+
* current playback state at admission (bridge.md 3.3). Resolves once the channel plays or has
|
|
26
|
+
* stopped; rejects with the native error otherwise.
|
|
27
|
+
*/
|
|
28
|
+
export async function togglePlayback(channelId: number, cell: CellKind): Promise<void> {
|
|
29
|
+
await invoke('togglePlayback', { channelId: validateChannelId(channelId, 'togglePlayback'), cell });
|
|
30
|
+
}
|
|
@@ -18,43 +18,44 @@ import { TurboModuleRegistry, type TurboModule, type CodegenTypes } from 'react-
|
|
|
18
18
|
type EventEmitter<T> = CodegenTypes.EventEmitter<T>;
|
|
19
19
|
|
|
20
20
|
export interface Spec extends TurboModule {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* @param channelId: -1 denotes an unspecified channel (i.e: the currently playing one)
|
|
43
|
-
*/
|
|
44
|
-
startSubtitles(channelId: number): void
|
|
45
|
-
stopSubtitles(): void
|
|
21
|
+
// The wrapper bridge of the native SDKs (internal; see bridge.md). Every structured value is
|
|
22
|
+
// one JSON string, encoded and decoded by the native SDK.
|
|
23
|
+
|
|
24
|
+
/** Attaches the bridge, applies the configuration and resolves with the snapshot. */
|
|
25
|
+
initialize(configuration: string): Promise<string>;
|
|
26
|
+
/** Runs one command; resolves with its reply, rejects with the bridge form of its error. */
|
|
27
|
+
execute(command: string, payload: string): Promise<string>;
|
|
28
|
+
/** `{ "<code>": "<text>", … }`, the localised text of every error code. Works before `initialize`. */
|
|
29
|
+
getErrorMessages(): string;
|
|
30
|
+
/** `{output}`, the audio output preference. Works before `initialize`; never fails. */
|
|
31
|
+
setAudioOutput(payload: string): void;
|
|
32
|
+
/** `{event, level, fields}`: one of the wrapper's own entries for the SDK log. Works before `initialize`. */
|
|
33
|
+
writeLogEntry(payload: string): void;
|
|
34
|
+
/** `{requestId, password, failed?}`, the answer to an `onPasswordRequest`. */
|
|
35
|
+
answerPasswordRequest(payload: string): void;
|
|
36
|
+
/** `{requestId, ok, password?}`, the answer to an `onPasswordStoreRequest`. */
|
|
37
|
+
answerPasswordStoreRequest(payload: string): void;
|
|
38
|
+
/** `{isSet}`: whether the host set a password store, for changes after `initialize`. */
|
|
39
|
+
setPasswordStore(payload: string): void;
|
|
46
40
|
|
|
47
41
|
openLiveVoiceWebsite(): void
|
|
48
42
|
|
|
49
43
|
getSdkVersion(): string
|
|
44
|
+
getNativeSdkVersion(): string
|
|
50
45
|
|
|
51
46
|
// Events
|
|
52
47
|
|
|
53
|
-
|
|
54
|
-
readonly
|
|
55
|
-
|
|
56
|
-
readonly
|
|
57
|
-
|
|
48
|
+
/** `{state, revision, value}` for every change of a state after `initialize`. */
|
|
49
|
+
readonly onState: EventEmitter<string>
|
|
50
|
+
/** `{requestId, subject, isRetry, name?}`; answer each once with `answerPasswordRequest`. */
|
|
51
|
+
readonly onPasswordRequest: EventEmitter<string>
|
|
52
|
+
/** `{requestId}` of a request no operation waits for any more; dismiss its prompt. */
|
|
53
|
+
readonly onPasswordRequestCancelled: EventEmitter<string>
|
|
54
|
+
/** `{requestId, operation, subject, password?}` for the host's store; answer each once. */
|
|
55
|
+
readonly onPasswordStoreRequest: EventEmitter<string>
|
|
56
|
+
// One entry of the SDK log as JSON, the native SDK's or one the wrapper wrote with
|
|
57
|
+
// `writeLogEntry`: { event, level, fields, timestamp }. No current value and no replay.
|
|
58
|
+
readonly onLogEntry: EventEmitter<string>
|
|
58
59
|
|
|
59
60
|
// Translations
|
|
60
61
|
|
|
@@ -66,20 +67,23 @@ export interface Spec extends TurboModule {
|
|
|
66
67
|
errorScreenRetrying(): string
|
|
67
68
|
errorScreenRetryingIn(seconds: number): string
|
|
68
69
|
|
|
69
|
-
sdkErrorGeneric(): string
|
|
70
|
-
sdkErrorInactive(): string
|
|
71
|
-
sdkErrorInvalidApiKey(): string
|
|
72
|
-
sdkErrorListenerLimitReached(): string
|
|
73
|
-
sdkErrorNoNetwork(): string
|
|
74
|
-
sdkErrorNotFound(): string
|
|
75
|
-
sdkErrorRequestFailed(errorCode: number): string
|
|
76
|
-
sdkErrorWrongPassword(): string
|
|
77
70
|
streamingByTitle(): string
|
|
78
71
|
errorRetryNowButton(): string
|
|
79
72
|
|
|
80
73
|
accessibilityChannelPlay(): string
|
|
81
74
|
accessibilityChannelStatusMuted(): string
|
|
82
75
|
accessibilityChannelStop(): string
|
|
76
|
+
|
|
77
|
+
// The built-in password prompt (bridge.md 3.5)
|
|
78
|
+
|
|
79
|
+
passwordPromptTitle(): string
|
|
80
|
+
passwordPromptChannelMessage(): string
|
|
81
|
+
passwordPromptEventMessage(): string
|
|
82
|
+
passwordPromptWrongPassword(): string
|
|
83
|
+
passwordPromptField(): string
|
|
84
|
+
passwordPromptCancelButton(): string
|
|
85
|
+
passwordPromptChannelConfirmButton(): string
|
|
86
|
+
passwordPromptEventConfirmButton(): string
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
export default TurboModuleRegistry.getEnforcing<Spec>('LiveVoiceModule');
|
package/src/util/Colors.ts
CHANGED
package/src/util/Translations.ts
CHANGED
|
@@ -12,30 +12,52 @@
|
|
|
12
12
|
//===----------------------------------------------------------------------===//
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @fileoverview
|
|
16
|
-
*
|
|
17
|
-
* German, English, and Spanish are supported at this time.
|
|
15
|
+
* @fileoverview The native SDK's texts: the public `Translations` of the default view, and the
|
|
16
|
+
* built-in password prompt's own texts, which stay internal.
|
|
18
17
|
*/
|
|
19
18
|
import LiveVoiceSdkReactNative from '../specs/NativeLiveVoiceSdk';
|
|
20
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Localized strings the SDK uses for its default UI, in the device's language (English, German and
|
|
22
|
+
* Spanish).
|
|
23
|
+
*
|
|
24
|
+
* Reuse them in your own parts, such as a custom channel cell, so your UI matches the SDK's
|
|
25
|
+
* wording. Each call reads the text synchronously from the native SDK and needs no join. Error
|
|
26
|
+
* texts are not here: every error carries its own `message`.
|
|
27
|
+
*/
|
|
21
28
|
export const Translations = {
|
|
29
|
+
/** "Inactive": a channel without a speaker. */
|
|
22
30
|
channelStatusOffline: (): string => LiveVoiceSdkReactNative.channelStatusOffline(),
|
|
31
|
+
/** "This event currently has no channels visible for listeners." */
|
|
23
32
|
noChannels: (): string => LiveVoiceSdkReactNative.noChannels(),
|
|
33
|
+
/** "AI active": a channel whose speaker is an AI voice. */
|
|
24
34
|
isAiChannelStatusMessage: (): string => LiveVoiceSdkReactNative.isAiChannelStatusMessage(),
|
|
35
|
+
/** "No matching channels": a channel filter that leaves none. */
|
|
25
36
|
sdkNoMatchingChannels: (): string => LiveVoiceSdkReactNative.sdkNoMatchingChannels(),
|
|
37
|
+
/** "Attempting to reconnect…" */
|
|
26
38
|
errorScreenRetrying: (): string => LiveVoiceSdkReactNative.errorScreenRetrying(),
|
|
39
|
+
/** "Reconnecting in `seconds` seconds…" */
|
|
27
40
|
errorScreenRetryingIn: (seconds: number): string => LiveVoiceSdkReactNative.errorScreenRetryingIn(seconds),
|
|
28
|
-
|
|
29
|
-
sdkErrorInactive: (): string => LiveVoiceSdkReactNative.sdkErrorInactive(),
|
|
30
|
-
sdkErrorInvalidApiKey: (): string => LiveVoiceSdkReactNative.sdkErrorInvalidApiKey(),
|
|
31
|
-
sdkErrorListenerLimitReached: (): string => LiveVoiceSdkReactNative.sdkErrorListenerLimitReached(),
|
|
32
|
-
sdkErrorNoNetwork: (): string => LiveVoiceSdkReactNative.sdkErrorNoNetwork(),
|
|
33
|
-
sdkErrorNotFound: (): string => LiveVoiceSdkReactNative.sdkErrorNotFound(),
|
|
34
|
-
sdkErrorRequestFailed: (errorCode: number): string => LiveVoiceSdkReactNative.sdkErrorRequestFailed(errorCode),
|
|
35
|
-
sdkErrorWrongPassword: (): string => LiveVoiceSdkReactNative.sdkErrorWrongPassword(),
|
|
41
|
+
/** "Retry now" */
|
|
36
42
|
errorRetryNowButton: (): string => LiveVoiceSdkReactNative.errorRetryNowButton(),
|
|
43
|
+
/** "Live Audio Streaming by", before the LiveVoice logo. */
|
|
37
44
|
streamingByTitle: (): string => LiveVoiceSdkReactNative.streamingByTitle(),
|
|
45
|
+
/** "Play channel", the accessibility label of a channel's play button. */
|
|
38
46
|
accessibilityChannelPlay: (): string => LiveVoiceSdkReactNative.accessibilityChannelPlay(),
|
|
47
|
+
/** "Muted by speaker" */
|
|
39
48
|
accessibilityChannelStatusMuted: (): string => LiveVoiceSdkReactNative.accessibilityChannelStatusMuted(),
|
|
49
|
+
/** "Stop channel", the accessibility label of a channel's stop button. */
|
|
40
50
|
accessibilityChannelStop: (): string => LiveVoiceSdkReactNative.accessibilityChannelStop(),
|
|
41
|
-
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** Internal: the built-in password prompt's texts. Its title is the channel's or event's name when known. */
|
|
54
|
+
export const PasswordPromptTexts = {
|
|
55
|
+
title: (): string => LiveVoiceSdkReactNative.passwordPromptTitle(),
|
|
56
|
+
channelMessage: (): string => LiveVoiceSdkReactNative.passwordPromptChannelMessage(),
|
|
57
|
+
eventMessage: (): string => LiveVoiceSdkReactNative.passwordPromptEventMessage(),
|
|
58
|
+
wrongPassword: (): string => LiveVoiceSdkReactNative.passwordPromptWrongPassword(),
|
|
59
|
+
field: (): string => LiveVoiceSdkReactNative.passwordPromptField(),
|
|
60
|
+
cancelButton: (): string => LiveVoiceSdkReactNative.passwordPromptCancelButton(),
|
|
61
|
+
channelConfirmButton: (): string => LiveVoiceSdkReactNative.passwordPromptChannelConfirmButton(),
|
|
62
|
+
eventConfirmButton: (): string => LiveVoiceSdkReactNative.passwordPromptEventConfirmButton(),
|
|
63
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//===----------------------------------------------------------------------===//
|
|
2
|
+
//
|
|
3
|
+
// This source file is part of the LiveVoice SDK project
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) LiveVoice GmbH
|
|
6
|
+
// Licensed under the MIT license
|
|
7
|
+
//
|
|
8
|
+
// See LICENSE for license information
|
|
9
|
+
//
|
|
10
|
+
// SPDX-License-Identifier: MIT
|
|
11
|
+
//
|
|
12
|
+
//===----------------------------------------------------------------------===//
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Freezes `value` and every plain object and array inside it, so a host cannot change what the
|
|
16
|
+
* SDK handed out. `Date`s and errors are left as they are.
|
|
17
|
+
*/
|
|
18
|
+
export function deepFreeze<T>(value: T): T {
|
|
19
|
+
if (value === null || typeof value !== 'object' || Object.isFrozen(value)) return value;
|
|
20
|
+
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype) return value;
|
|
21
|
+
for (const nested of Object.values(value as object)) deepFreeze(nested);
|
|
22
|
+
return Object.freeze(value);
|
|
23
|
+
}
|
package/src/util/logger.ts
CHANGED
|
@@ -11,82 +11,109 @@
|
|
|
11
11
|
//
|
|
12
12
|
//===----------------------------------------------------------------------===//
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
// Internal: the wrapper's two outputs. Its own entries go through native into the one SDK log
|
|
15
|
+
// stream (`writeLogEntry`, bridge.md 3.6), which reaches the system log and `addLogListener`.
|
|
16
|
+
// Console lines are for development builds only. Neither ever carries a credential: the API key
|
|
17
|
+
// or a password. The join code is not one and may appear.
|
|
18
|
+
|
|
19
|
+
import Native from '../specs/NativeLiveVoiceSdk';
|
|
20
|
+
import type { ViewModel } from '../sdk/LiveVoiceState';
|
|
16
21
|
|
|
17
22
|
type LogFields = Record<string, string | number | boolean | null | undefined>;
|
|
18
23
|
|
|
24
|
+
/** The console tags of development builds. They are not entries of the SDK log. */
|
|
19
25
|
export const LiveVoiceLogEvent = {
|
|
20
|
-
init:
|
|
21
|
-
joinRequest:
|
|
22
|
-
leave:
|
|
23
|
-
reconnectRequest:
|
|
24
|
-
uiState:
|
|
25
|
-
audioOutputSet:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
openWebsite: "LV_OPEN_WEBSITE",
|
|
26
|
+
init: 'LV_INIT',
|
|
27
|
+
joinRequest: 'LV_JOIN_REQUEST',
|
|
28
|
+
leave: 'LV_LEAVE',
|
|
29
|
+
reconnectRequest: 'LV_RECONNECT_REQUEST',
|
|
30
|
+
uiState: 'LV_UI_STATE',
|
|
31
|
+
audioOutputSet: 'LV_AUDIO_OUTPUT_SET',
|
|
32
|
+
nowPlayingArtworkSet: 'LV_NOW_PLAYING_ARTWORK_SET',
|
|
33
|
+
channelStop: 'LV_CHANNEL_STOP',
|
|
34
|
+
subtitlesStart: 'LV_SUBTITLES_START',
|
|
35
|
+
subtitlesStop: 'LV_SUBTITLES_STOP',
|
|
36
|
+
openWebsite: 'LV_OPEN_WEBSITE',
|
|
32
37
|
} as const;
|
|
33
38
|
|
|
39
|
+
/** The entries the wrapper writes into the SDK log itself (bridge.md 3.6). */
|
|
40
|
+
export type WrapperLogEvent =
|
|
41
|
+
| 'LV_COMMAND_ERROR'
|
|
42
|
+
| 'LV_USAGE_ERROR'
|
|
43
|
+
| 'LV_CUSTOM_UI_DENIED'
|
|
44
|
+
| 'LV_PASSWORD_PROMPT'
|
|
45
|
+
| 'LV_BRIDGE_DECODE_ERROR';
|
|
46
|
+
|
|
47
|
+
/** Whether this is a development build, where the wrapper may write to the console. */
|
|
48
|
+
function isDevelopment(): boolean {
|
|
49
|
+
return typeof __DEV__ !== 'undefined' && __DEV__ === true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** A console line in development builds; nothing otherwise. */
|
|
34
53
|
export function logInfo(event: string, fields?: LogFields): void {
|
|
35
|
-
|
|
54
|
+
if (!isDevelopment()) return;
|
|
55
|
+
console.info(formatMessage('INFO', event, fields));
|
|
36
56
|
}
|
|
37
57
|
|
|
38
|
-
|
|
39
|
-
|
|
58
|
+
/** A host callback threw: reported on the console in development builds only, never in the log. */
|
|
59
|
+
export function logListenerError(event: string, error: unknown): void {
|
|
60
|
+
if (!isDevelopment()) return;
|
|
61
|
+
console.warn(`[LiveVoiceSDK] ${event}`, error);
|
|
40
62
|
}
|
|
41
63
|
|
|
42
|
-
export function
|
|
43
|
-
logInfo(LiveVoiceLogEvent.
|
|
44
|
-
mode: useSpeaker ? "speaker" : "receiver",
|
|
45
|
-
});
|
|
64
|
+
export function logViewState(model: ViewModel): void {
|
|
65
|
+
logInfo(LiveVoiceLogEvent.uiState, describeViewState(model));
|
|
46
66
|
}
|
|
47
67
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Writes one of the wrapper's own entries into the SDK log, where it reaches the system log and
|
|
70
|
+
* the log listeners like a native entry. Fields without a value are left out. Callers never pass
|
|
71
|
+
* a credential.
|
|
72
|
+
*/
|
|
73
|
+
export function writeLogEntry(
|
|
74
|
+
event: WrapperLogEvent,
|
|
75
|
+
level: 'info' | 'error',
|
|
76
|
+
fields: Record<string, string | undefined>,
|
|
77
|
+
): void {
|
|
78
|
+
const values: Record<string, string> = {};
|
|
79
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
80
|
+
if (value !== undefined) values[key] = value;
|
|
81
|
+
}
|
|
82
|
+
try { Native.writeLogEntry(JSON.stringify({ event, level, fields: values })); }
|
|
83
|
+
catch { /* Logging never fails a call. */ }
|
|
53
84
|
}
|
|
54
85
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
-
case
|
|
66
|
-
return {
|
|
67
|
-
canBeRetried: state.canBeRetried,
|
|
68
|
-
type: "error",
|
|
69
|
-
};
|
|
70
|
-
case "reconnecting":
|
|
86
|
+
/** Native sent something the wrapper cannot read: a bug, since the versions match exactly. */
|
|
87
|
+
export function logDecodeError(what: 'reply' | 'state' | 'callback', name: string): void {
|
|
88
|
+
writeLogEntry('LV_BRIDGE_DECODE_ERROR', 'error', { what, name });
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function describeViewState(model: ViewModel): LogFields {
|
|
92
|
+
const part = model.part;
|
|
93
|
+
switch (part.kind) {
|
|
94
|
+
case 'loading':
|
|
95
|
+
return { type: 'loading' };
|
|
96
|
+
case 'ready':
|
|
71
97
|
return {
|
|
72
|
-
|
|
73
|
-
|
|
98
|
+
channelCount: part.channels.length,
|
|
99
|
+
inReconnectGrace: part.inReconnectGrace,
|
|
100
|
+
type: 'ready',
|
|
74
101
|
};
|
|
102
|
+
case 'error':
|
|
103
|
+
return { code: part.error.code, type: 'error' };
|
|
104
|
+
case 'reconnecting':
|
|
105
|
+
return { retryState: part.retry.kind, type: 'reconnecting' };
|
|
75
106
|
}
|
|
76
107
|
}
|
|
77
108
|
|
|
78
|
-
function describeRetryState(state: RetryState): string {
|
|
79
|
-
return state.type;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
109
|
function formatMessage(level: string, event: string, fields?: LogFields): string {
|
|
83
|
-
const fieldText = fields == null ?
|
|
110
|
+
const fieldText = fields == null ? '' : Object.entries(fields)
|
|
84
111
|
.filter(([, value]) => value != null)
|
|
85
112
|
.sort(([left], [right]) => left.localeCompare(right))
|
|
86
113
|
.map(([key, value]) => `${key}=${value}`)
|
|
87
|
-
.join(
|
|
114
|
+
.join(' ');
|
|
88
115
|
|
|
89
|
-
return [
|
|
116
|
+
return ['[LiveVoiceSDK]', level, event, fieldText]
|
|
90
117
|
.filter((part) => part.length > 0)
|
|
91
|
-
.join(
|
|
118
|
+
.join(' ');
|
|
92
119
|
}
|
|
@@ -1,138 +0,0 @@
|
|
|
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 { getCurrentAudioState, onAudioOutputChanged, setLiveVoiceUseSpeaker } from "../sdk/LiveVoiceSdk.js";
|
|
17
|
-
import React, { useState, useRef, useEffect } from 'react';
|
|
18
|
-
import { View, TouchableOpacity, StyleSheet, Animated, Easing, Image, useColorScheme } from 'react-native';
|
|
19
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
export const AudioOutputSwitchView = props => {
|
|
21
|
-
const [isSpeaker, setIsSpeaker] = useState(() => getCurrentAudioState());
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
let subscription = onAudioOutputChanged(value => {
|
|
24
|
-
setIsSpeaker(value);
|
|
25
|
-
});
|
|
26
|
-
return () => {
|
|
27
|
-
subscription?.remove();
|
|
28
|
-
subscription = undefined;
|
|
29
|
-
};
|
|
30
|
-
}, []);
|
|
31
|
-
const isDarkMode = props.isDarkMode != undefined ? props.isDarkMode : useColorScheme() === 'dark';
|
|
32
|
-
const animation = useRef(new Animated.Value(isSpeaker ? 1 : 0)).current;
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
Animated.timing(animation, {
|
|
35
|
-
toValue: isSpeaker ? 1 : 0,
|
|
36
|
-
//start with correct position depending on isSpeaker state
|
|
37
|
-
duration: 100,
|
|
38
|
-
easing: Easing.out(Easing.circle),
|
|
39
|
-
useNativeDriver: false
|
|
40
|
-
}).start();
|
|
41
|
-
}, [isSpeaker]);
|
|
42
|
-
const togglePosition = animation.interpolate({
|
|
43
|
-
inputRange: [0, 1],
|
|
44
|
-
outputRange: [2, 60] // Adjust these values based on your design
|
|
45
|
-
});
|
|
46
|
-
const iconColor = isDarkMode ? '#fff' : '#191919';
|
|
47
|
-
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
48
|
-
activeOpacity: 1,
|
|
49
|
-
onPress: () => {
|
|
50
|
-
setLiveVoiceUseSpeaker(!isSpeaker);
|
|
51
|
-
},
|
|
52
|
-
style: [styles.container, isDarkMode ? styles.darkMode : styles.lightMode],
|
|
53
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
54
|
-
style: styles.iconContainer,
|
|
55
|
-
children: [/*#__PURE__*/_jsx(Image, {
|
|
56
|
-
source: require('../icons/headphones.png'),
|
|
57
|
-
style: {
|
|
58
|
-
tintColor: iconColor,
|
|
59
|
-
width: 20,
|
|
60
|
-
height: 20,
|
|
61
|
-
resizeMode: 'contain'
|
|
62
|
-
}
|
|
63
|
-
}), /*#__PURE__*/_jsx(Image, {
|
|
64
|
-
source: require('../icons/speaker.png'),
|
|
65
|
-
style: {
|
|
66
|
-
tintColor: iconColor,
|
|
67
|
-
width: 20,
|
|
68
|
-
height: 20,
|
|
69
|
-
resizeMode: 'contain'
|
|
70
|
-
}
|
|
71
|
-
})]
|
|
72
|
-
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
73
|
-
style: [styles.toggle, isDarkMode ? styles.toggleBackgroundDark : styles.toggleBackgroundLight, {
|
|
74
|
-
transform: [{
|
|
75
|
-
translateX: togglePosition
|
|
76
|
-
}]
|
|
77
|
-
}],
|
|
78
|
-
children: isSpeaker ? /*#__PURE__*/_jsx(Image, {
|
|
79
|
-
source: require('../icons/speaker.png'),
|
|
80
|
-
style: {
|
|
81
|
-
tintColor: iconColor,
|
|
82
|
-
width: 20,
|
|
83
|
-
height: 20,
|
|
84
|
-
resizeMode: 'contain'
|
|
85
|
-
}
|
|
86
|
-
}) : /*#__PURE__*/_jsx(Image, {
|
|
87
|
-
source: require('../icons/headphones.png'),
|
|
88
|
-
style: {
|
|
89
|
-
tintColor: iconColor,
|
|
90
|
-
width: 20,
|
|
91
|
-
height: 20,
|
|
92
|
-
resizeMode: 'contain'
|
|
93
|
-
}
|
|
94
|
-
})
|
|
95
|
-
})]
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
const styles = StyleSheet.create({
|
|
99
|
-
container: {
|
|
100
|
-
width: 120,
|
|
101
|
-
height: 40,
|
|
102
|
-
borderRadius: 20,
|
|
103
|
-
flexDirection: 'row',
|
|
104
|
-
alignItems: 'center',
|
|
105
|
-
justifyContent: 'space-between',
|
|
106
|
-
paddingHorizontal: 16,
|
|
107
|
-
position: 'relative'
|
|
108
|
-
},
|
|
109
|
-
darkMode: {
|
|
110
|
-
backgroundColor: '#393F45'
|
|
111
|
-
},
|
|
112
|
-
lightMode: {
|
|
113
|
-
backgroundColor: '#E7E7E7'
|
|
114
|
-
},
|
|
115
|
-
iconContainer: {
|
|
116
|
-
flexDirection: 'row',
|
|
117
|
-
alignItems: 'center',
|
|
118
|
-
justifyContent: 'space-between',
|
|
119
|
-
width: '100%',
|
|
120
|
-
paddingHorizontal: 7
|
|
121
|
-
},
|
|
122
|
-
toggle: {
|
|
123
|
-
width: 58,
|
|
124
|
-
height: 36,
|
|
125
|
-
borderRadius: 18,
|
|
126
|
-
position: 'absolute',
|
|
127
|
-
flex: 1,
|
|
128
|
-
alignItems: 'center',
|
|
129
|
-
justifyContent: 'center'
|
|
130
|
-
},
|
|
131
|
-
toggleBackgroundDark: {
|
|
132
|
-
backgroundColor: '#212529'
|
|
133
|
-
},
|
|
134
|
-
toggleBackgroundLight: {
|
|
135
|
-
backgroundColor: '#fff'
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
//# sourceMappingURL=AudioOutputSwitchView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getCurrentAudioState","onAudioOutputChanged","setLiveVoiceUseSpeaker","React","useState","useRef","useEffect","View","TouchableOpacity","StyleSheet","Animated","Easing","Image","useColorScheme","jsx","_jsx","jsxs","_jsxs","AudioOutputSwitchView","props","isSpeaker","setIsSpeaker","subscription","value","remove","undefined","isDarkMode","animation","Value","current","timing","toValue","duration","easing","out","circle","useNativeDriver","start","togglePosition","interpolate","inputRange","outputRange","iconColor","activeOpacity","onPress","style","styles","container","darkMode","lightMode","children","iconContainer","source","require","tintColor","width","height","resizeMode","toggle","toggleBackgroundDark","toggleBackgroundLight","transform","translateX","create","borderRadius","flexDirection","alignItems","justifyContent","paddingHorizontal","position","backgroundColor","flex"],"sourceRoot":"../../../src","sources":["components/AudioOutputSwitchView.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
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 * from "./AudioOutputSwitchView.js";
|
|
17
|
-
export * from "./BrandingView.js";
|
|
18
|
-
export * from "./ChannelView.js";
|
|
19
|
-
export * from "./ErrorView.js";
|
|
20
|
-
export * from "./LiveVoiceView.js";
|
|
21
|
-
export * from "./PlayButtonView.js";
|
|
22
|
-
export * from "./ReconnectingView.js";
|
|
23
|
-
export * from "./WarningView.js";
|
|
24
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["components/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,cAAc,4BAAyB;AACvC,cAAc,mBAAgB;AAC9B,cAAc,kBAAe;AAC7B,cAAc,gBAAa;AAC3B,cAAc,oBAAiB;AAC/B,cAAc,qBAAkB;AAChC,cAAc,uBAAoB;AAClC,cAAc,kBAAe","ignoreList":[]}
|
package/lib/module/icons/mic.png
DELETED
|
Binary file
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
// Define the union type and interfaces
|
|
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
|
-
|
|
26
|
-
// Named exports for the constants and function
|
|
27
|
-
export const serviceDisabled = {
|
|
28
|
-
type: 'Disabled'
|
|
29
|
-
};
|
|
30
|
-
export const serviceEnabledWithDefaultMessage = {
|
|
31
|
-
type: 'Enabled',
|
|
32
|
-
message: DEFAULT_MESSAGE_SENTINEL
|
|
33
|
-
};
|
|
34
|
-
export const serviceEnabledWithMessage = message => ({
|
|
35
|
-
type: 'Enabled',
|
|
36
|
-
message
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=ForegroundServiceConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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"}
|