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.
Files changed (207) hide show
  1. package/README.md +105 -66
  2. package/android/build.gradle +5 -4
  3. package/android/src/main/java/io/livevoice/react/LiveVoiceModule.kt +122 -188
  4. package/android/src/main/java/io/livevoice/react/__SDK.kt +2 -2
  5. package/ios/LiveVoiceRNBridge.swift +362 -0
  6. package/ios/LiveVoiceSdkReactNative.mm +187 -158
  7. package/ios/__SDK.h +1 -1
  8. package/ios/livevoice_spm_backport.rb +202 -0
  9. package/lib/module/components/BrandingView.js +58 -39
  10. package/lib/module/components/BrandingView.js.map +1 -1
  11. package/lib/module/components/ChannelView.js +355 -44
  12. package/lib/module/components/ChannelView.js.map +1 -1
  13. package/lib/module/components/ErrorView.js +5 -6
  14. package/lib/module/components/ErrorView.js.map +1 -1
  15. package/lib/module/components/LiveVoiceSpinner.js +81 -0
  16. package/lib/module/components/LiveVoiceSpinner.js.map +1 -0
  17. package/lib/module/components/LiveVoiceView.js +311 -133
  18. package/lib/module/components/LiveVoiceView.js.map +1 -1
  19. package/lib/module/components/PasswordPrompt.js +165 -0
  20. package/lib/module/components/PasswordPrompt.js.map +1 -0
  21. package/lib/module/components/PlayButtonView.js +180 -244
  22. package/lib/module/components/PlayButtonView.js.map +1 -1
  23. package/lib/module/components/ReconnectingView.js +31 -53
  24. package/lib/module/components/ReconnectingView.js.map +1 -1
  25. package/lib/module/icons/branding-ios.png +0 -0
  26. package/lib/module/icons/camera-off-android.png +0 -0
  27. package/lib/module/icons/camera-off-android@2x.png +0 -0
  28. package/lib/module/icons/camera-off-android@3x.png +0 -0
  29. package/lib/module/icons/cpu-android.png +0 -0
  30. package/lib/module/icons/cpu-android@2x.png +0 -0
  31. package/lib/module/icons/cpu-android@3x.png +0 -0
  32. package/lib/module/icons/cpu-ios.png +0 -0
  33. package/lib/module/icons/cpu-ios@2x.png +0 -0
  34. package/lib/module/icons/cpu-ios@3x.png +0 -0
  35. package/lib/module/icons/lock-android.png +0 -0
  36. package/lib/module/icons/lock-android@2x.png +0 -0
  37. package/lib/module/icons/lock-android@3x.png +0 -0
  38. package/lib/module/icons/lock-ios.png +0 -0
  39. package/lib/module/icons/lock-ios@2x.png +0 -0
  40. package/lib/module/icons/lock-ios@3x.png +0 -0
  41. package/lib/module/icons/mic-off-android.png +0 -0
  42. package/lib/module/icons/mic-off-android@2x.png +0 -0
  43. package/lib/module/icons/mic-off-android@3x.png +0 -0
  44. package/lib/module/icons/mic-slash-ios.png +0 -0
  45. package/lib/module/icons/mic-slash-ios@2x.png +0 -0
  46. package/lib/module/icons/mic-slash-ios@3x.png +0 -0
  47. package/lib/module/icons/video-slash-ios.png +0 -0
  48. package/lib/module/icons/video-slash-ios@2x.png +0 -0
  49. package/lib/module/icons/video-slash-ios@3x.png +0 -0
  50. package/lib/module/index.js +11 -6
  51. package/lib/module/index.js.map +1 -1
  52. package/lib/module/sdk/Bridge.js +236 -0
  53. package/lib/module/sdk/Bridge.js.map +1 -0
  54. package/lib/module/sdk/Event.js +160 -0
  55. package/lib/module/sdk/Event.js.map +1 -0
  56. package/lib/module/sdk/Lifecycle.js +331 -0
  57. package/lib/module/sdk/Lifecycle.js.map +1 -0
  58. package/lib/module/sdk/LiveVoiceSdk.js +262 -268
  59. package/lib/module/sdk/LiveVoiceSdk.js.map +1 -1
  60. package/lib/module/sdk/LiveVoiceState.js +208 -40
  61. package/lib/module/sdk/LiveVoiceState.js.map +1 -1
  62. package/lib/module/sdk/LogEntries.js +99 -0
  63. package/lib/module/sdk/LogEntries.js.map +1 -0
  64. package/lib/module/sdk/Models.js +2 -0
  65. package/lib/module/{util/UIState.js.map → sdk/Models.js.map} +1 -1
  66. package/lib/module/{util/PlayingState.js → sdk/NativeSdkVersions.js} +9 -8
  67. package/lib/module/sdk/NativeSdkVersions.js.map +1 -0
  68. package/lib/module/sdk/Observables.js +391 -0
  69. package/lib/module/sdk/Observables.js.map +1 -0
  70. package/lib/module/sdk/Passwords.js +298 -0
  71. package/lib/module/sdk/Passwords.js.map +1 -0
  72. package/lib/module/sdk/Playback.js +35 -0
  73. package/lib/module/sdk/Playback.js.map +1 -0
  74. package/lib/module/specs/NativeLiveVoiceSdk.js.map +1 -1
  75. package/lib/module/util/Colors.js +2 -1
  76. package/lib/module/util/Colors.js.map +1 -1
  77. package/lib/module/util/Translations.js +34 -11
  78. package/lib/module/util/Translations.js.map +1 -1
  79. package/lib/module/util/freeze.js +26 -0
  80. package/lib/module/util/freeze.js.map +1 -0
  81. package/lib/module/util/logger.js +79 -41
  82. package/lib/module/util/logger.js.map +1 -1
  83. package/lib/typescript/src/components/BrandingView.d.ts +4 -0
  84. package/lib/typescript/src/components/BrandingView.d.ts.map +1 -1
  85. package/lib/typescript/src/components/ChannelView.d.ts +29 -3
  86. package/lib/typescript/src/components/ChannelView.d.ts.map +1 -1
  87. package/lib/typescript/src/components/ErrorView.d.ts +5 -3
  88. package/lib/typescript/src/components/ErrorView.d.ts.map +1 -1
  89. package/lib/typescript/src/components/LiveVoiceSpinner.d.ts +16 -0
  90. package/lib/typescript/src/components/LiveVoiceSpinner.d.ts.map +1 -0
  91. package/lib/typescript/src/components/LiveVoiceView.d.ts +81 -21
  92. package/lib/typescript/src/components/LiveVoiceView.d.ts.map +1 -1
  93. package/lib/typescript/src/components/PasswordPrompt.d.ts +13 -0
  94. package/lib/typescript/src/components/PasswordPrompt.d.ts.map +1 -0
  95. package/lib/typescript/src/components/PlayButtonView.d.ts +12 -329
  96. package/lib/typescript/src/components/PlayButtonView.d.ts.map +1 -1
  97. package/lib/typescript/src/components/ReconnectingView.d.ts +6 -3
  98. package/lib/typescript/src/components/ReconnectingView.d.ts.map +1 -1
  99. package/lib/typescript/src/index.d.ts +15 -6
  100. package/lib/typescript/src/index.d.ts.map +1 -1
  101. package/lib/typescript/src/sdk/Bridge.d.ts +36 -0
  102. package/lib/typescript/src/sdk/Bridge.d.ts.map +1 -0
  103. package/lib/typescript/src/sdk/Event.d.ts +97 -0
  104. package/lib/typescript/src/sdk/Event.d.ts.map +1 -0
  105. package/lib/typescript/src/sdk/Lifecycle.d.ts +191 -0
  106. package/lib/typescript/src/sdk/Lifecycle.d.ts.map +1 -0
  107. package/lib/typescript/src/sdk/LiveVoiceSdk.d.ts +195 -190
  108. package/lib/typescript/src/sdk/LiveVoiceSdk.d.ts.map +1 -1
  109. package/lib/typescript/src/sdk/LiveVoiceState.d.ts +77 -9
  110. package/lib/typescript/src/sdk/LiveVoiceState.d.ts.map +1 -1
  111. package/lib/typescript/src/sdk/LogEntries.d.ts +28 -0
  112. package/lib/typescript/src/sdk/LogEntries.d.ts.map +1 -0
  113. package/lib/typescript/src/sdk/Models.d.ts +114 -0
  114. package/lib/typescript/src/sdk/Models.d.ts.map +1 -0
  115. package/lib/typescript/src/sdk/NativeSdkVersions.d.ts +6 -0
  116. package/lib/typescript/src/sdk/NativeSdkVersions.d.ts.map +1 -0
  117. package/lib/typescript/src/sdk/Observables.d.ts +123 -0
  118. package/lib/typescript/src/sdk/Observables.d.ts.map +1 -0
  119. package/lib/typescript/src/sdk/Passwords.d.ts +72 -0
  120. package/lib/typescript/src/sdk/Passwords.d.ts.map +1 -0
  121. package/lib/typescript/src/sdk/Playback.d.ts +9 -0
  122. package/lib/typescript/src/sdk/Playback.d.ts.map +1 -0
  123. package/lib/typescript/src/specs/NativeLiveVoiceSdk.d.ts +34 -31
  124. package/lib/typescript/src/specs/NativeLiveVoiceSdk.d.ts.map +1 -1
  125. package/lib/typescript/src/util/Colors.d.ts.map +1 -1
  126. package/lib/typescript/src/util/Translations.d.ts +30 -8
  127. package/lib/typescript/src/util/Translations.d.ts.map +1 -1
  128. package/lib/typescript/src/util/freeze.d.ts +6 -0
  129. package/lib/typescript/src/util/freeze.d.ts.map +1 -0
  130. package/lib/typescript/src/util/logger.d.ts +17 -7
  131. package/lib/typescript/src/util/logger.d.ts.map +1 -1
  132. package/livevoice-sdk-react-native.podspec +29 -4
  133. package/package.json +12 -9
  134. package/src/components/BrandingView.tsx +42 -55
  135. package/src/components/ChannelView.tsx +329 -38
  136. package/src/components/ErrorView.tsx +9 -12
  137. package/src/components/LiveVoiceSpinner.tsx +87 -0
  138. package/src/components/LiveVoiceView.tsx +319 -201
  139. package/src/components/PasswordPrompt.tsx +144 -0
  140. package/src/components/PlayButtonView.tsx +165 -269
  141. package/src/components/ReconnectingView.tsx +28 -81
  142. package/src/icons/branding-ios.png +0 -0
  143. package/src/icons/camera-off-android.png +0 -0
  144. package/src/icons/camera-off-android@2x.png +0 -0
  145. package/src/icons/camera-off-android@3x.png +0 -0
  146. package/src/icons/cpu-android.png +0 -0
  147. package/src/icons/cpu-android@2x.png +0 -0
  148. package/src/icons/cpu-android@3x.png +0 -0
  149. package/src/icons/cpu-ios.png +0 -0
  150. package/src/icons/cpu-ios@2x.png +0 -0
  151. package/src/icons/cpu-ios@3x.png +0 -0
  152. package/src/icons/lock-android.png +0 -0
  153. package/src/icons/lock-android@2x.png +0 -0
  154. package/src/icons/lock-android@3x.png +0 -0
  155. package/src/icons/lock-ios.png +0 -0
  156. package/src/icons/lock-ios@2x.png +0 -0
  157. package/src/icons/lock-ios@3x.png +0 -0
  158. package/src/icons/mic-off-android.png +0 -0
  159. package/src/icons/mic-off-android@2x.png +0 -0
  160. package/src/icons/mic-off-android@3x.png +0 -0
  161. package/src/icons/mic-slash-ios.png +0 -0
  162. package/src/icons/mic-slash-ios@2x.png +0 -0
  163. package/src/icons/mic-slash-ios@3x.png +0 -0
  164. package/src/icons/video-slash-ios.png +0 -0
  165. package/src/icons/video-slash-ios@2x.png +0 -0
  166. package/src/icons/video-slash-ios@3x.png +0 -0
  167. package/src/index.tsx +92 -6
  168. package/src/sdk/Bridge.ts +259 -0
  169. package/src/sdk/Event.ts +187 -0
  170. package/src/sdk/Lifecycle.ts +366 -0
  171. package/src/sdk/LiveVoiceSdk.ts +285 -309
  172. package/src/sdk/LiveVoiceState.ts +230 -60
  173. package/src/sdk/LogEntries.ts +88 -0
  174. package/src/sdk/Models.ts +129 -0
  175. package/src/{util/PlayingState.ts → sdk/NativeSdkVersions.ts} +7 -6
  176. package/src/sdk/Observables.ts +414 -0
  177. package/src/sdk/Passwords.ts +286 -0
  178. package/src/sdk/Playback.ts +30 -0
  179. package/src/specs/NativeLiveVoiceSdk.ts +42 -38
  180. package/src/util/Colors.ts +2 -1
  181. package/src/util/Translations.ts +34 -12
  182. package/src/util/freeze.ts +23 -0
  183. package/src/util/logger.ts +79 -52
  184. package/lib/module/components/AudioOutputSwitchView.js +0 -138
  185. package/lib/module/components/AudioOutputSwitchView.js.map +0 -1
  186. package/lib/module/components/index.js +0 -24
  187. package/lib/module/components/index.js.map +0 -1
  188. package/lib/module/icons/mic.png +0 -0
  189. package/lib/module/util/ForegroundServiceConfig.js +0 -38
  190. package/lib/module/util/ForegroundServiceConfig.js.map +0 -1
  191. package/lib/module/util/PlayingState.js.map +0 -1
  192. package/lib/module/util/UIState.js +0 -4
  193. package/lib/typescript/src/components/AudioOutputSwitchView.d.ts +0 -6
  194. package/lib/typescript/src/components/AudioOutputSwitchView.d.ts.map +0 -1
  195. package/lib/typescript/src/components/index.d.ts +0 -9
  196. package/lib/typescript/src/components/index.d.ts.map +0 -1
  197. package/lib/typescript/src/util/ForegroundServiceConfig.d.ts +0 -19
  198. package/lib/typescript/src/util/ForegroundServiceConfig.d.ts.map +0 -1
  199. package/lib/typescript/src/util/PlayingState.d.ts +0 -7
  200. package/lib/typescript/src/util/PlayingState.d.ts.map +0 -1
  201. package/lib/typescript/src/util/UIState.d.ts +0 -86
  202. package/lib/typescript/src/util/UIState.d.ts.map +0 -1
  203. package/src/components/AudioOutputSwitchView.tsx +0 -146
  204. package/src/components/index.tsx +0 -21
  205. package/src/icons/mic.png +0 -0
  206. package/src/util/ForegroundServiceConfig.tsx +0 -42
  207. package/src/util/UIState.ts +0 -106
@@ -0,0 +1,165 @@
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 { useEffect, useState } from 'react';
17
+ import { Modal, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
18
+ import { COLORS } from "../util/Colors.js";
19
+ import { PasswordPromptTexts } from "../util/Translations.js";
20
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
+ /**
22
+ * The built-in password prompt, for channels and events alike. Its texts come from the native SDK;
23
+ * the title is the channel's or event's name, or "Password required" for a join.
24
+ */
25
+ export const PasswordPrompt = ({
26
+ request,
27
+ isDarkMode,
28
+ onAnswer
29
+ }) => {
30
+ const [password, setPassword] = useState('');
31
+ // A new request starts empty.
32
+ useEffect(() => setPassword(''), [request.requestId]);
33
+ const isChannel = request.subject.kind === 'channel';
34
+ const text = isDarkMode ? COLORS.white : COLORS.black;
35
+ const confirm = () => {
36
+ if (password.length > 0) onAnswer(password);
37
+ };
38
+ return /*#__PURE__*/_jsx(Modal, {
39
+ transparent: true,
40
+ animationType: "fade",
41
+ visible: true,
42
+ onRequestClose: () => onAnswer(null),
43
+ children: /*#__PURE__*/_jsx(View, {
44
+ style: styles.backdrop,
45
+ children: /*#__PURE__*/_jsxs(View, {
46
+ style: [styles.card, {
47
+ backgroundColor: isDarkMode ? COLORS.cardBgDark : COLORS.cardBg
48
+ }],
49
+ children: [/*#__PURE__*/_jsx(Text, {
50
+ accessibilityRole: "header",
51
+ style: [styles.title, {
52
+ color: text
53
+ }],
54
+ children: request.name ?? PasswordPromptTexts.title()
55
+ }), /*#__PURE__*/_jsx(Text, {
56
+ style: [styles.message, {
57
+ color: text
58
+ }],
59
+ children: isChannel ? PasswordPromptTexts.channelMessage() : PasswordPromptTexts.eventMessage()
60
+ }), request.isRetry && /*#__PURE__*/_jsx(Text, {
61
+ accessibilityLiveRegion: "polite",
62
+ style: [styles.message, styles.wrong],
63
+ children: PasswordPromptTexts.wrongPassword()
64
+ }), /*#__PURE__*/_jsx(TextInput, {
65
+ value: password,
66
+ onChangeText: setPassword,
67
+ onSubmitEditing: confirm,
68
+ placeholder: PasswordPromptTexts.field(),
69
+ accessibilityLabel: PasswordPromptTexts.field(),
70
+ placeholderTextColor: isDarkMode ? '#8e8e93' : '#a0a0a5',
71
+ secureTextEntry: true,
72
+ autoFocus: true,
73
+ autoCapitalize: "none",
74
+ autoCorrect: false,
75
+ returnKeyType: "go",
76
+ style: [styles.field, {
77
+ color: text,
78
+ borderColor: isDarkMode ? COLORS.dividerDark : COLORS.divider
79
+ }]
80
+ }), /*#__PURE__*/_jsxs(View, {
81
+ style: styles.buttons,
82
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
83
+ accessibilityRole: "button",
84
+ onPress: () => onAnswer(null),
85
+ style: styles.button,
86
+ children: /*#__PURE__*/_jsx(Text, {
87
+ style: [styles.buttonText, {
88
+ color: text
89
+ }],
90
+ children: PasswordPromptTexts.cancelButton()
91
+ })
92
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
93
+ accessibilityRole: "button",
94
+ accessibilityState: {
95
+ disabled: password.length === 0
96
+ },
97
+ disabled: password.length === 0,
98
+ onPress: confirm,
99
+ style: styles.button,
100
+ children: /*#__PURE__*/_jsx(Text, {
101
+ style: [styles.buttonText, styles.confirm, {
102
+ opacity: password.length === 0 ? 0.4 : 1
103
+ }],
104
+ children: isChannel ? PasswordPromptTexts.channelConfirmButton() : PasswordPromptTexts.eventConfirmButton()
105
+ })
106
+ })]
107
+ })]
108
+ })
109
+ })
110
+ });
111
+ };
112
+ const styles = StyleSheet.create({
113
+ backdrop: {
114
+ flex: 1,
115
+ justifyContent: 'center',
116
+ alignItems: 'center',
117
+ padding: 24,
118
+ backgroundColor: 'rgba(0, 0, 0, 0.4)'
119
+ },
120
+ card: {
121
+ width: '100%',
122
+ maxWidth: 360,
123
+ borderRadius: 14,
124
+ padding: 20
125
+ },
126
+ title: {
127
+ fontSize: 17,
128
+ fontWeight: '600',
129
+ textAlign: 'center'
130
+ },
131
+ message: {
132
+ fontSize: 14,
133
+ textAlign: 'center',
134
+ marginTop: 8
135
+ },
136
+ wrong: {
137
+ color: '#F1521B'
138
+ },
139
+ field: {
140
+ borderWidth: 1,
141
+ borderRadius: 8,
142
+ paddingHorizontal: 12,
143
+ paddingVertical: 10,
144
+ marginTop: 16,
145
+ fontSize: 16
146
+ },
147
+ buttons: {
148
+ flexDirection: 'row',
149
+ justifyContent: 'flex-end',
150
+ marginTop: 16
151
+ },
152
+ button: {
153
+ paddingHorizontal: 12,
154
+ paddingVertical: 8,
155
+ marginLeft: 8
156
+ },
157
+ buttonText: {
158
+ fontSize: 16,
159
+ fontWeight: '500'
160
+ },
161
+ confirm: {
162
+ color: COLORS.primary
163
+ }
164
+ });
165
+ //# sourceMappingURL=PasswordPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useState","Modal","StyleSheet","Text","TextInput","TouchableOpacity","View","COLORS","PasswordPromptTexts","jsx","_jsx","jsxs","_jsxs","PasswordPrompt","request","isDarkMode","onAnswer","password","setPassword","requestId","isChannel","subject","kind","text","white","black","confirm","length","transparent","animationType","visible","onRequestClose","children","style","styles","backdrop","card","backgroundColor","cardBgDark","cardBg","accessibilityRole","title","color","name","message","channelMessage","eventMessage","isRetry","accessibilityLiveRegion","wrong","wrongPassword","value","onChangeText","onSubmitEditing","placeholder","field","accessibilityLabel","placeholderTextColor","secureTextEntry","autoFocus","autoCapitalize","autoCorrect","returnKeyType","borderColor","dividerDark","divider","buttons","onPress","button","buttonText","cancelButton","accessibilityState","disabled","opacity","channelConfirmButton","eventConfirmButton","create","flex","justifyContent","alignItems","padding","width","maxWidth","borderRadius","fontSize","fontWeight","textAlign","marginTop","borderWidth","paddingHorizontal","paddingVertical","flexDirection","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C","ignoreList":[]}
@@ -13,10 +13,15 @@
13
13
  //
14
14
  //===----------------------------------------------------------------------===//
15
15
 
16
- import { COLORS } from "../util/Colors.js";
17
- import { ActivityIndicator, Image, TouchableOpacity, useColorScheme, View } from "react-native";
18
- import { PlayingState } from "../util/PlayingState.js";
16
+ import { Image, Platform, TouchableOpacity, useColorScheme, View } from "react-native";
17
+ import { LiveVoiceSpinner } from "./LiveVoiceSpinner.js";
19
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ /**
20
+ * The default cell's play button, drawn as the native SDK of the platform draws it: iOS
21
+ * `ChannelPlayButton` in its `.sdk` style, Android `PlayButton` in the SDK cell's Listener style.
22
+ * Change them together. Geometry is the same on both; the colours are each platform's own
23
+ * (`buttonColors`).
24
+ */
20
25
  const PlayButtonView = ({
21
26
  playingState,
22
27
  isChannelOnline,
@@ -25,293 +30,224 @@ const PlayButtonView = ({
25
30
  isDarkMode = useColorScheme() === "dark",
26
31
  onAudioPress,
27
32
  onSubtitlesPress,
28
- onPress
33
+ onPress,
34
+ brandColor = null,
35
+ subtitlesOpen = false
29
36
  }) => {
30
- const isPlaying = playingState === PlayingState.PLAYING;
31
- const isTransitioning = playingState === PlayingState.TRANSITIONING;
32
- const getAudioIconColor = () => {
33
- if (!isChannelOnline) {
34
- return isDarkMode ? "#5a5a60" : "#d1d1d6";
35
- }
36
- return COLORS.white;
37
- };
38
- const getSubtitlesIconColor = () => {
39
- if (!isChannelOnline) {
40
- return isDarkMode ? "#ffffff" : "#000000";
41
- }
42
- return COLORS.white;
43
- };
44
- const audioIconColor = getAudioIconColor();
45
- const subtitlesIconColor = getSubtitlesIconColor();
46
- const getAudioIcon = () => {
47
- if (isTransitioning) {
48
- return /*#__PURE__*/_jsx(ActivityIndicator, {
49
- size: 20,
50
- color: audioIconColor,
51
- style: {}
52
- });
53
- }
54
- return isPlaying ? /*#__PURE__*/_jsx(Image, {
55
- source: require("../icons/pause.png"),
56
- style: [{
57
- tintColor: audioIconColor,
58
- width: 30,
59
- height: 26
60
- }]
61
- }) : /*#__PURE__*/_jsx(Image, {
62
- source: require("../icons/play.png"),
63
- style: [{
64
- tintColor: audioIconColor,
65
- width: 30,
66
- height: 26
67
- }]
68
- });
69
- };
70
- const getSubtitlesIcon = () => {
71
- return /*#__PURE__*/_jsx(Image, {
72
- source: require("../icons/captions.png"),
73
- style: [{
74
- tintColor: subtitlesIconColor,
75
- width: 30,
76
- height: 26
77
- }]
78
- });
79
- };
80
- const getStyleType = () => {
81
- if (!isChannelOnline) return "offline";
82
- if (isPlaying) return "playing";
83
- return "paused";
84
- };
37
+ const isPlaying = playingState === "playing";
38
+ const isTransitioning = playingState === "transitioning";
39
+ const colors = buttonColors(isDarkMode);
40
+
41
+ // Play, pause and the spinner share one colour by state, as both native glyphs do.
42
+ const glyphColor = isChannelOnline ? colors.onlineGlyph : colors.offlineGlyph;
43
+ const captionsColor = isChannelOnline ? colors.onlineGlyph : colors.offlineCaptions;
44
+ // The event's brand colour replaces the orange of an online button.
45
+ const fill = isChannelOnline ? brandColor ?? colors.onlineFill : colors.offlineFill;
46
+ const audioIcon = isTransitioning ? /*#__PURE__*/_jsx(LiveVoiceSpinner, {
47
+ size: 22,
48
+ color: glyphColor
49
+ }) : /*#__PURE__*/_jsx(Image, {
50
+ source: isPlaying ? require("../icons/pause.png") : require("../icons/play.png"),
51
+ style: [{
52
+ tintColor: glyphColor,
53
+ width: 30,
54
+ height: 26
55
+ }]
56
+ });
57
+ const subtitlesIcon = /*#__PURE__*/_jsx(Image, {
58
+ source: require("../icons/captions.png"),
59
+ style: [{
60
+ tintColor: captionsColor,
61
+ width: 30,
62
+ height: 26
63
+ }]
64
+ });
65
+
66
+ // Open subtitles mark the subtitle half with a capsule, as both native SDKs do.
67
+ const marker = inset => subtitlesOpen && /*#__PURE__*/_jsx(SubtitlesMarker, {
68
+ inset: inset,
69
+ color: isChannelOnline ? colors.onlineMarker : colors.offlineMarker
70
+ });
71
+ // The offline outline, over the button without taking any of its room.
72
+ const border = !isChannelOnline && /*#__PURE__*/_jsx(ButtonBorder, {
73
+ color: colors.outline
74
+ });
85
75
 
86
- // If no audio and no subtitles, render disabled button with dashed border
76
+ // Neither audio nor subtitles: a dashed outline and nothing to press.
87
77
  if (!hasAudio && !hasSubtitles) {
88
- const noContentStyle = {
89
- ...baseButtonStyleNoContent,
90
- backgroundColor: isDarkMode ? "#1c1c1e00" : "#ffffff",
91
- borderColor: isDarkMode ? COLORS_SCHEME.borderGrayDark : COLORS_SCHEME.borderGrayLight,
92
- borderStyle: "dashed"
93
- };
94
78
  return /*#__PURE__*/_jsx(TouchableOpacity, {
95
- style: noContentStyle,
79
+ style: {
80
+ ...buttonFrame,
81
+ borderWidth: colors.noInputBorderWidth,
82
+ borderColor: colors.outline,
83
+ borderStyle: "dashed",
84
+ backgroundColor: isChannelOnline && colors.noInputFillsWhenOnline ? fill : colors.noInputFill
85
+ },
96
86
  disabled: true,
97
87
  activeOpacity: 0.8,
98
88
  children: /*#__PURE__*/_jsx(View, {})
99
89
  });
100
90
  }
101
-
102
- // If only audio, render simple button
103
- if (hasAudio && !hasSubtitles) {
104
- return /*#__PURE__*/_jsx(TouchableOpacity, {
105
- style: getButtonStyle(getStyleType(), isDarkMode, false),
91
+ if (!hasSubtitles) {
92
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
93
+ style: [buttonFrame, {
94
+ backgroundColor: fill
95
+ }],
106
96
  onPress: onAudioPress || onPress,
107
97
  activeOpacity: 0.8,
108
- children: getAudioIcon()
98
+ children: [audioIcon, border]
109
99
  });
110
100
  }
111
-
112
- // If only subtitles, render subtitles button
113
- if (!hasAudio && hasSubtitles) {
114
- return /*#__PURE__*/_jsx(TouchableOpacity, {
115
- style: getButtonStyle(getStyleType(), isDarkMode, false),
101
+ if (!hasAudio) {
102
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
103
+ style: [buttonFrame, {
104
+ backgroundColor: fill
105
+ }],
116
106
  onPress: onSubtitlesPress || onPress,
117
107
  activeOpacity: 0.8,
118
- children: getSubtitlesIcon()
108
+ children: [marker(3), subtitlesIcon, border]
119
109
  });
120
110
  }
121
111
 
122
- // If both audio and subtitles, render split button
112
+ // The divider keeps its slot but is clear while the channel plays or its subtitles are open.
113
+ const dividerColor = isPlaying || subtitlesOpen ? "transparent" : isChannelOnline ? colors.onlineDivider : colors.offlineDivider;
123
114
  return /*#__PURE__*/_jsxs(View, {
124
- style: getSplitButtonContainerStyle(getStyleType(), isDarkMode),
115
+ style: [splitFrame, {
116
+ backgroundColor: fill
117
+ }],
125
118
  children: [/*#__PURE__*/_jsx(TouchableOpacity, {
126
- style: getSplitButtonAudioStyle(getStyleType(), isDarkMode),
119
+ style: halfFrame,
127
120
  onPress: onAudioPress || onPress,
128
121
  activeOpacity: 0.8,
129
- children: getAudioIcon()
122
+ children: audioIcon
130
123
  }), /*#__PURE__*/_jsx(View, {
131
- style: getDividerStyle(getStyleType(), isDarkMode)
132
- }), /*#__PURE__*/_jsx(TouchableOpacity, {
133
- style: getSplitButtonSubtitlesStyle(getStyleType(), isDarkMode),
124
+ style: [dividerFrame, {
125
+ backgroundColor: dividerColor
126
+ }]
127
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
128
+ style: halfFrame,
134
129
  onPress: onSubtitlesPress || onPress,
135
130
  activeOpacity: 0.8,
136
- children: getSubtitlesIcon()
137
- })]
131
+ children: [marker(4), subtitlesIcon]
132
+ }), border]
138
133
  });
139
134
  };
140
- export const getButtonStyle = (type, isDarkMode, isSplit = false) => {
141
- if (isSplit) {
142
- return SplitButtonStyles[type][isDarkMode ? "dark" : "light"].container;
143
- }
144
- return ButtonStyles[type][isDarkMode ? "dark" : "light"];
145
- };
146
- export const getSplitButtonContainerStyle = (type, isDarkMode) => {
147
- return SplitButtonStyles[type][isDarkMode ? "dark" : "light"].container;
148
- };
149
- export const getSplitButtonAudioStyle = (type, isDarkMode) => {
150
- return SplitButtonStyles[type][isDarkMode ? "dark" : "light"].audio;
151
- };
152
- export const getSplitButtonSubtitlesStyle = (type, isDarkMode) => {
153
- return SplitButtonStyles[type][isDarkMode ? "dark" : "light"].subtitles;
154
- };
155
- export const getDividerStyle = (type, isDarkMode) => {
156
- // When button is online (orange background), divider is light orange
157
- if (type === "paused" || type === "playing") {
135
+
136
+ /**
137
+ * Every colour of the button, light or dark, as the native SDK of this platform has it.
138
+ *
139
+ * Both: LiveVoice orange online (iOS `.lvOrange`, Android `orange`); white glyphs online; the
140
+ * outline and the offline divider `#A0A0A0` / `#E0E0E0` at 50 % (iOS `.lightGrey.opacity(0.5)`,
141
+ * Android `playButtonOutline`); the online divider white at 30 %; the marker white at 25 % online,
142
+ * `#EAEAEF` / `#4E4E4E` offline (iOS `.outlineButtonBorder`, Android
143
+ * `selectedCaptionsBackgroundOffline`).
144
+ *
145
+ * - iOS (`ChannelPlayButton`, `.sdk`): offline fill `.clear`; offline play glyph, pause and spinner
146
+ * `.lightGrey.opacity(0.5)`; offline captions `.primary`.
147
+ * - Android (`PlayButton`, Listener, in `LvAppTheme`): offline fill `background` (`white`,
148
+ * `veryDarkGray`); offline play glyph, pause and spinner `buttonIconInactive` (`veryLightGray`,
149
+ * `darkGray`); offline captions `onBackground` (`lightBlack`, `white`).
150
+ * - The button without input follows iOS on both: filled as an online button when its channel is
151
+ * online, clear otherwise, with a 1 pt dashed outline (Android is changing to match).
152
+ */
153
+ function buttonColors(isDarkMode) {
154
+ const outline = isDarkMode ? "rgba(224, 224, 224, 0.5)" : "rgba(160, 160, 160, 0.5)";
155
+ const shared = {
156
+ onlineFill: "#F56230",
157
+ onlineGlyph: "#FFFFFF",
158
+ outline,
159
+ onlineDivider: "rgba(255, 255, 255, 0.3)",
160
+ offlineDivider: outline,
161
+ onlineMarker: "rgba(255, 255, 255, 0.25)",
162
+ offlineMarker: isDarkMode ? "#4E4E4E" : "#EAEAEF",
163
+ // Without audio or subtitles, both as iOS: filled as an online button when the channel is
164
+ // online, clear otherwise, and always the 1 pt dashed outline.
165
+ noInputFill: "transparent",
166
+ noInputFillsWhenOnline: true,
167
+ noInputBorderWidth: 1
168
+ };
169
+ if (Platform.OS === "ios") {
158
170
  return {
159
- width: 1,
160
- height: 24,
161
- backgroundColor: COLORS_SCHEME.dividerOnOrange
171
+ ...shared,
172
+ offlineFill: "transparent",
173
+ offlineGlyph: outline,
174
+ offlineCaptions: isDarkMode ? "#FFFFFF" : "#000000"
162
175
  };
163
176
  }
164
-
165
- // When button is offline, divider is gray (same as border)
177
+ const background = isDarkMode ? "#212529" : "#FFFFFF";
166
178
  return {
167
- width: 1,
168
- height: 24,
169
- backgroundColor: isDarkMode ? COLORS_SCHEME.borderGrayDark : COLORS_SCHEME.borderGrayLight
179
+ ...shared,
180
+ offlineFill: background,
181
+ offlineGlyph: isDarkMode ? "#343A40" : "#E7E7E7",
182
+ offlineCaptions: isDarkMode ? "#FFFFFF" : "#191919"
170
183
  };
171
- };
172
- const baseButtonStyle = {
173
- width: 96,
174
- height: 44,
175
- borderRadius: 22,
176
- borderWidth: 1,
177
- alignItems: "center",
178
- justifyContent: "center"
179
- };
180
- const baseButtonStyleNoContent = {
184
+ }
185
+
186
+ /**
187
+ * The open-subtitles marker, drawn as the native SDKs draw it: a capsule inset `inset` from the
188
+ * subtitle half's own bounds, 4 beside the play half and 3 on a subtitles-only button.
189
+ */
190
+ const SubtitlesMarker = ({
191
+ inset,
192
+ color
193
+ }) => /*#__PURE__*/_jsx(View, {
194
+ style: {
195
+ position: "absolute",
196
+ top: inset,
197
+ bottom: inset,
198
+ left: inset,
199
+ right: inset,
200
+ borderRadius: (buttonFrame.height - 2 * inset) / 2,
201
+ backgroundColor: color
202
+ }
203
+ });
204
+
205
+ /**
206
+ * The offline button's 1 pt outline, drawn over the button as both native SDKs stroke it (iOS
207
+ * `strokeBorder` in the button's background, Android `Modifier.border`), so it insets nothing: the
208
+ * halves fill the whole 96 × 44 button and the glyphs sit where native puts them. Online, iOS draws
209
+ * none and Android strokes it in the fill's own colour, so none is drawn here.
210
+ */
211
+ const ButtonBorder = ({
212
+ color
213
+ }) => /*#__PURE__*/_jsx(View, {
214
+ pointerEvents: "none",
215
+ style: {
216
+ position: "absolute",
217
+ top: 0,
218
+ bottom: 0,
219
+ left: 0,
220
+ right: 0,
221
+ borderRadius: buttonFrame.borderRadius,
222
+ borderWidth: 1,
223
+ borderColor: color
224
+ }
225
+ });
226
+
227
+ // No border of their own: an offline outline is `ButtonBorder`, which takes no room.
228
+ const buttonFrame = {
181
229
  width: 96,
182
230
  height: 44,
183
231
  borderRadius: 22,
184
- borderWidth: 1,
185
232
  alignItems: "center",
186
233
  justifyContent: "center"
187
234
  };
188
- const baseSplitButtonStyle = {
189
- width: 96,
190
- height: 44,
191
- borderRadius: 22,
192
- borderWidth: 1,
235
+ const splitFrame = {
236
+ ...buttonFrame,
193
237
  flexDirection: "row",
194
- alignItems: "center",
195
- justifyContent: "center",
196
238
  overflow: "hidden"
197
239
  };
198
- const baseSplitAudioStyle = {
240
+ const halfFrame = {
199
241
  flex: 1,
200
242
  height: 44,
201
243
  alignItems: "center",
202
244
  justifyContent: "center"
203
245
  };
204
- const baseSplitSubtitlesStyle = {
205
- flex: 1,
206
- height: 44,
207
- alignItems: "center",
208
- justifyContent: "center"
209
- };
210
- const COLORS_SCHEME = {
211
- orange: "#f56230",
212
- dividerOnOrange: "#ffffff80",
213
- borderGrayLight: "#d1d1d6",
214
- borderGrayDark: "#5a5a60"
215
- };
216
- export const ButtonStyles = {
217
- paused: {
218
- light: {
219
- ...baseButtonStyle,
220
- backgroundColor: COLORS_SCHEME.orange,
221
- borderColor: "transparent"
222
- },
223
- dark: {
224
- ...baseButtonStyle,
225
- backgroundColor: COLORS_SCHEME.orange,
226
- borderColor: "transparent"
227
- }
228
- },
229
- playing: {
230
- light: {
231
- ...baseButtonStyle,
232
- backgroundColor: COLORS_SCHEME.orange,
233
- borderColor: "transparent"
234
- },
235
- dark: {
236
- ...baseButtonStyle,
237
- backgroundColor: COLORS_SCHEME.orange,
238
- borderColor: "transparent"
239
- }
240
- },
241
- offline: {
242
- light: {
243
- ...baseButtonStyle,
244
- backgroundColor: "#ffffff",
245
- borderColor: COLORS_SCHEME.borderGrayLight
246
- },
247
- dark: {
248
- ...baseButtonStyle,
249
- backgroundColor: "#212429",
250
- borderColor: COLORS_SCHEME.borderGrayDark
251
- }
252
- }
253
- };
254
- export const SplitButtonStyles = {
255
- paused: {
256
- light: {
257
- container: {
258
- ...baseSplitButtonStyle,
259
- backgroundColor: COLORS_SCHEME.orange,
260
- borderColor: "transparent"
261
- },
262
- audio: baseSplitAudioStyle,
263
- subtitles: baseSplitSubtitlesStyle
264
- },
265
- dark: {
266
- container: {
267
- ...baseSplitButtonStyle,
268
- backgroundColor: COLORS_SCHEME.orange,
269
- borderColor: "transparent"
270
- },
271
- audio: baseSplitAudioStyle,
272
- subtitles: baseSplitSubtitlesStyle
273
- }
274
- },
275
- playing: {
276
- light: {
277
- container: {
278
- ...baseSplitButtonStyle,
279
- backgroundColor: COLORS_SCHEME.orange,
280
- borderColor: "transparent"
281
- },
282
- audio: baseSplitAudioStyle,
283
- subtitles: baseSplitSubtitlesStyle
284
- },
285
- dark: {
286
- container: {
287
- ...baseSplitButtonStyle,
288
- backgroundColor: COLORS_SCHEME.orange,
289
- borderColor: "transparent"
290
- },
291
- audio: baseSplitAudioStyle,
292
- subtitles: baseSplitSubtitlesStyle
293
- }
294
- },
295
- offline: {
296
- light: {
297
- container: {
298
- ...baseSplitButtonStyle,
299
- backgroundColor: "#ffffff",
300
- borderColor: COLORS_SCHEME.borderGrayLight
301
- },
302
- audio: baseSplitAudioStyle,
303
- subtitles: baseSplitSubtitlesStyle
304
- },
305
- dark: {
306
- container: {
307
- ...baseSplitButtonStyle,
308
- backgroundColor: "#212429",
309
- borderColor: COLORS_SCHEME.borderGrayDark
310
- },
311
- audio: baseSplitAudioStyle,
312
- subtitles: baseSplitSubtitlesStyle
313
- }
314
- }
246
+
247
+ // 26 tall, 9 from the top and bottom of the 44 button, as in both native SDKs.
248
+ const dividerFrame = {
249
+ width: 1,
250
+ height: 26
315
251
  };
316
252
  export default PlayButtonView;
317
253
  //# sourceMappingURL=PlayButtonView.js.map