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
@@ -1 +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,EAAE,mBAAmB;EAClCC,WAAW,EAAE;AACf,CAAU;AAEV,OAAO,SAASC,OAAOA,CAACC,KAAa,EAAEC,MAAkB,EAAQ;EAC/DC,OAAO,CAACC,IAAI,CAACC,aAAa,CAAC,MAAM,EAAEJ,KAAK,EAAEC,MAAM,CAAC,CAAC;AACpD;AAEA,OAAO,SAASI,UAAUA,CAACC,KAAc,EAAQ;EAC/CP,OAAO,CAACb,iBAAiB,CAACK,OAAO,EAAEgB,eAAe,CAACD,KAAK,CAAC,CAAC;AAC5D;AAEA,OAAO,SAASE,qBAAqBA,CAACC,UAAmB,EAAQ;EAC/DV,OAAO,CAACb,iBAAiB,CAACO,kBAAkB,EAAE;IAC5CiB,IAAI,EAAED,UAAU,GAAG,SAAS,GAAG;EACjC,CAAC,CAAC;AACJ;AAEA,OAAO,SAASE,+BAA+BA,CAC7CC,aAAs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Z,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
+ {"version":3,"names":["Native","LiveVoiceLogEvent","init","joinRequest","leave","reconnectRequest","uiState","audioOutputSet","nowPlayingArtworkSet","channelStop","subtitlesStart","subtitlesStop","openWebsite","isDevelopment","__DEV__","logInfo","event","fields","console","info","formatMessage","logListenerError","error","warn","logViewState","model","describeViewState","writeLogEntry","level","values","key","value","Object","entries","undefined","JSON","stringify","logDecodeError","what","name","part","kind","type","channelCount","channels","length","inReconnectGrace","code","retryState","retry","fieldText","filter","sort","left","right","localeCompare","map","join"],"sourceRoot":"../../../src","sources":["util/logger.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,OAAOA,MAAM,MAAM,gCAA6B;AAKhD;AACA,OAAO,MAAMC,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,oBAAoB,EAAE,4BAA4B;EAClDC,WAAW,EAAE,iBAAiB;EAC9BC,cAAc,EAAE,oBAAoB;EACpCC,aAAa,EAAE,mBAAmB;EAClCC,WAAW,EAAE;AACf,CAAU;;AAEV;;AAQA;AACA,SAASC,aAAaA,CAAA,EAAY;EAChC,OAAO,OAAOC,OAAO,KAAK,WAAW,IAAIA,OAAO,KAAK,IAAI;AAC3D;;AAEA;AACA,OAAO,SAASC,OAAOA,CAACC,KAAa,EAAEC,MAAkB,EAAQ;EAC/D,IAAI,CAACJ,aAAa,CAAC,CAAC,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,IAAI,EAAE;MAAU,CAAC;IAC5B,KAAK,OAAO;MACV,OAAO;QACLC,YAAY,EAAEH,IAAI,CAACI,QAAQ,CAACC,MAAM;QAClCC,gBAAgB,EAAEN,IAAI,CAACM,gBAAgB;QACvCJ,IAAI,EAAE;MACR,CAAC;IACH,KAAK,OAAO;MACV,OAAO;QAAEK,IAAI,EAAEP,IAAI,CAAClB,KAAK,CAACyB,IAAI;QAAEL,IAAI,EAAE;MAAQ,CAAC;IACjD,KAAK,cAAc;MACjB,OAAO;QAAEM,UAAU,EAAER,IAAI,CAACS,KAAK,CAACR,IAAI;QAAEC,IAAI,EAAE;MAAe,CAAC;EAChE;AACF;AAEA,SAAStB,aAAaA,CAACQ,KAAa,EAAEZ,KAAa,EAAEC,MAAkB,EAAU;EAC/E,MAAMiC,SAAS,GAAGjC,MAAM,IAAI,IAAI,GAAG,EAAE,GAAGe,MAAM,CAACC,OAAO,CAAChB,MAAM,CAAC,CAC3DkC,MAAM,CAAC,CAAC,GAAGpB,KAAK,CAAC,KAAKA,KAAK,IAAI,IAAI,CAAC,CACpCqB,IAAI,CAAC,CAAC,CAACC,IAAI,CAAC,EAAE,CAACC,KAAK,CAAC,KAAKD,IAAI,CAACE,aAAa,CAACD,KAAK,CAAC,CAAC,CACpDE,GAAG,CAAC,CAAC,CAAC1B,GAAG,EAAEC,KAAK,CAAC,KAAK,GAAGD,GAAG,IAAIC,KAAK,EAAE,CAAC,CACxC0B,IAAI,CAAC,GAAG,CAAC;EAEZ,OAAO,CAAC,gBAAgB,EAAE7B,KAAK,EAAEZ,KAAK,EAAEkC,SAAS,CAAC,CAC/CC,MAAM,CAAEX,IAAI,IAAKA,IAAI,CAACK,MAAM,GAAG,CAAC,CAAC,CACjCY,IAAI,CAAC,GAAG,CAAC;AACd","ignoreList":[]}
@@ -2,5 +2,9 @@ import React from 'react';
2
2
  export interface BrandingProps {
3
3
  isDarkMode?: boolean;
4
4
  }
5
+ /**
6
+ * The "Live Audio Streaming by LiveVoice" footer, drawn exactly as the native SDK of the platform
7
+ * draws it: iOS `LogoView`, Android `LiveVoiceSdkBranding`. Change them together.
8
+ */
5
9
  export declare const BrandingView: React.FC<BrandingProps>;
6
10
  //# sourceMappingURL=BrandingView.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"BrandingView.d.ts","sourceRoot":"","sources":["../../../../src/components/BrandingView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkBhD,CAAC"}
@@ -1,15 +1,41 @@
1
1
  import React from 'react';
2
- import { type PlayingState } from '../util/PlayingState';
2
+ import { type CellAccessibility, type CellMuteMark, type CellStatus } from '../sdk/LiveVoiceState';
3
+ import { type LiveVoicePlayingState } from '../sdk/Models';
3
4
  export interface ChannelProps {
4
5
  channelName: string;
5
- playingState: PlayingState;
6
- muted: boolean;
6
+ playingState: LiveVoicePlayingState;
7
7
  isOnline: boolean;
8
8
  hasAudio: boolean;
9
9
  hasSubtitles: boolean;
10
+ /** The status line under the name, as native computed it (bridge.md 2.4); `null` for none. */
11
+ status?: CellStatus | null;
12
+ /** The mute mark at the end of the row, as native computed it (bridge.md 2.4); `null` for none. */
13
+ muteMark?: CellMuteMark | null;
14
+ /** A password-protected channel: the lock at the end of the row. */
15
+ isPasswordProtected?: boolean;
10
16
  isDarkMode?: boolean;
17
+ /**
18
+ * Drawn at half strength while the connection briefly recovers. The audio tap still reaches
19
+ * the SDK, which decides; the subtitle tap does nothing meanwhile.
20
+ */
21
+ isDimmed?: boolean;
22
+ /** The event's brand colour for this appearance; LiveVoice orange when `null`. */
23
+ brandColor?: string | null;
24
+ /** Whether this channel's subtitles are the open ones: the play button marks its subtitle half. */
25
+ subtitlesOpen?: boolean;
26
+ /**
27
+ * The row's accessibility as native computed it (bridge.md 2.4). With it the row is one
28
+ * accessibility element that renders exactly this; without it the row has none, as before.
29
+ */
30
+ accessibility?: CellAccessibility | null;
11
31
  onAudioPress?: () => void;
12
32
  onSubtitlesPress?: () => void;
13
33
  }
34
+ /**
35
+ * The default channel cell, drawn as the native SDK of the platform draws its row (iOS
36
+ * `ChannelCellView` in the `.sdk` mode, Android `DefaultChannel`; change them together). Where
37
+ * the two natives differed in behaviour, both follow iOS: the status rule, the expanded name, the
38
+ * dimming during the reconnect grace.
39
+ */
14
40
  export declare const ChannelView: React.FC<ChannelProps>;
15
41
  //# sourceMappingURL=ChannelView.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"ChannelView.d.ts","sourceRoot":"","sources":["../../../../src/components/ChannelView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAexC,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAI3D,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,qBAAqB,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC3B,mGAAmG;IACnG,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/B,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mGAAmG;IACnG,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA+F9C,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
- import { type ErrorState } from '../util/UIState';
3
2
  export interface ErrorProps {
4
3
  isDarkMode?: boolean;
5
- state: ErrorState;
6
- onPress: () => void;
4
+ /** The localised text of the error. */
5
+ message: string;
6
+ /** Present exactly when the error is retryable; shows the retry button. */
7
+ onRetry: (() => void) | null;
7
8
  }
9
+ /** The default error part. */
8
10
  export declare const ErrorView: React.FC<ErrorProps>;
9
11
  //# sourceMappingURL=ErrorView.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"ErrorView.d.ts","sourceRoot":"","sources":["../../../../src/components/ErrorView.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;CAC9B;AAED,8BAA8B;AAC9B,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAwB1C,CAAC"}
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ export interface LiveVoiceSpinnerProps {
3
+ /** The diameter, in points. */
4
+ size: number;
5
+ color: string;
6
+ }
7
+ /**
8
+ * A spinner in LiveVoice's own hand: the rounded bars of the mark, set around
9
+ * a circle like the iOS spinner's spokes. The lit bar steps round once a
10
+ * second, and the two bars behind it fade out over a faint track of the
11
+ * others. It keeps turning with reduced motion, like the system spinners.
12
+ *
13
+ * Mirrors the native SDKs' and the Flutter spinner; change them together.
14
+ */
15
+ export declare const LiveVoiceSpinner: React.FC<LiveVoiceSpinnerProps>;
16
+ //# sourceMappingURL=LiveVoiceSpinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LiveVoiceSpinner.d.ts","sourceRoot":"","sources":["../../../../src/components/LiveVoiceSpinner.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA0C5D,CAAC"}
@@ -1,28 +1,88 @@
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;
11
- export interface LiveVoiceViewProps {
12
- isDarkMode?: boolean;
1
+ import { LiveVoiceError, type LiveVoiceRetry } from '../sdk/Lifecycle';
2
+ import { type LiveVoiceChannel } from '../sdk/Models';
3
+ /**
4
+ * One channel of the list, handed to {@link LiveVoiceViewProps.renderChannelCell}. Only the view
5
+ * creates cells.
6
+ */
7
+ export type LiveVoiceChannelCell = {
8
+ /** The channel this cell shows. */
9
+ readonly channel: LiveVoiceChannel;
10
+ /** Whether this is the last channel in the (filtered) list, for example to omit a divider. */
11
+ readonly isLast: boolean;
12
+ /**
13
+ * Whether the default cell would let a tap start the channel: `false` while the channel is
14
+ * unavailable (offline, without audio) and during the first seconds of a reconnect.
15
+ */
16
+ readonly isEnabled: boolean;
17
+ /**
18
+ * The cell's action, as a tap on the default cell: starts the channel if it is stopped, stops
19
+ * it if it is playing, decided by the SDK from the current playback state.
20
+ *
21
+ * A start resolves when local playback is confirmed, a stop when local playback has stopped;
22
+ * the `channel.playingState` handed to the cell follows shortly. A start needs a `ready`
23
+ * connection and an online channel with audio. A stop is allowed whenever an event is joined,
24
+ * joining, reconnecting or failed. Errors reach only the caller, never `onCommandError`.
25
+ *
26
+ * @throws {LiveVoiceError} `not_joined` when the connection does not allow the action;
27
+ * `api_key_invalid` without the custom-UI permission. For a start: `channel_offline` while the
28
+ * channel is offline; `channel_unavailable` for a channel without audio, while reconnecting, or
29
+ * one that is not part of the joined event; `channel_password_required`,
30
+ * `channel_wrong_password` and `channel_limit_reached`; `timed_out` after 10 seconds (entering
31
+ * a password does not count); `leave_incomplete` when an unfinished stop holds it up for more
32
+ * than 5 seconds; `cancelled` when another start, a stop, a second toggle, a leave or a new
33
+ * join ended it. A connection loss during a start can fail it with `cancelled` or
34
+ * `network_failed`; observe the connection to follow recovery, the rejection and the
35
+ * connection update need not arrive in a particular order. For a stop, the errors of
36
+ * {@link stopChannel}. See {@link LiveVoiceErrorCode}.
37
+ */
38
+ togglePlayback(): Promise<void>;
39
+ };
40
+ /** Why the list is empty: the event has no channels, or `filter` removed them all. */
41
+ export type LiveVoiceEmptyReason = 'noChannels' | 'noMatches';
42
+ /**
43
+ * The props of {@link LiveVoiceView}. All are optional; without any, the view shows the default
44
+ * UI.
45
+ */
46
+ export type LiveVoiceViewProps = {
13
47
  /**
14
- * Return true for channels that should be displayed by the drop-in view.
48
+ * Receives the failures of the default parts' actions: a default cell's audio and subtitle
49
+ * taps and the default error part's retry. Never `cancelled` or `superseded`. Custom parts'
50
+ * actions report to their callers instead. Without it, the failures go to the SDK log as
51
+ * `LV_COMMAND_ERROR`, which `addLogListener` delivers.
15
52
  */
16
- filter?: (channel: Channel) => boolean;
53
+ onCommandError?: (error: LiveVoiceError) => void;
54
+ /** Forces the light or dark appearance; the system's by default. */
55
+ isDarkMode?: boolean;
56
+ /** Return `true` for the channels to list. It only hides channels; it starts nothing. */
57
+ filter?: (channel: LiveVoiceChannel) => boolean;
17
58
  /**
18
- * Render a custom channel cell instead of the default one.
59
+ * Draws a channel instead of the default cell.
19
60
  *
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.
61
+ * Every render prop except `renderLoading` needs an API key that permits custom UI. Without
62
+ * that permission the view shows the invalid-API-key error instead of your parts.
63
+ */
64
+ renderChannelCell?: (cell: LiveVoiceChannelCell) => React.ReactNode;
65
+ /**
66
+ * Draws the loading part, shown while the connection is `idle`, `joining` or `leaving`. Works
67
+ * for every API key.
68
+ */
69
+ renderLoading?: () => React.ReactNode;
70
+ /** Draws the part shown while the connection recovers. The reconnect runs by itself. */
71
+ renderReconnecting?: (retry: LiveVoiceRetry) => React.ReactNode;
72
+ /**
73
+ * Draws the error part, also for a join that failed before it authenticated. `retry` is present
74
+ * exactly when the error is retryable; it reconnects, and fails with `not_joined` once the join
75
+ * has ended.
23
76
  */
24
- renderChannel?: RenderChannel;
25
- }
77
+ renderError?: (error: LiveVoiceError, retry: (() => Promise<void>) | null) => React.ReactNode;
78
+ /** Draws the empty list. */
79
+ renderEmpty?: (reason: LiveVoiceEmptyReason) => React.ReactNode;
80
+ };
81
+ /**
82
+ * The LiveVoice channel list: the joined event's channels with their play and subtitle buttons,
83
+ * and loading, reconnecting, error and empty parts. Every part can be replaced; see
84
+ * {@link LiveVoiceViewProps}. It also presents the built-in password prompt when no
85
+ * password provider is set.
86
+ */
26
87
  export declare const LiveVoiceView: React.FC<LiveVoiceViewProps>;
27
- export default LiveVoiceView;
28
88
  //# sourceMappingURL=LiveVoiceView.d.ts.map
@@ -1 +1 @@
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
+ {"version":3,"file":"LiveVoiceView.d.ts","sourceRoot":"","sources":["../../../../src/components/LiveVoiceView.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAA+B,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGpG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBtD;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,mCAAmC;IACnC,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;IACnC,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACjC,CAAC;AAEF,sFAAsF;AACtF,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,WAAW,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yFAAyF;IACzF,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAChD;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,KAAK,CAAC,SAAS,CAAC;IACpE;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IACtC,wFAAwF;IACxF,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,KAAK,CAAC,SAAS,CAAC;IAChE;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9F,4BAA4B;IAC5B,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,KAAK,CAAC,SAAS,CAAC;CACjE,CAAC;AAoCF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAetD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type PromptRequest } from '../sdk/Passwords';
2
+ export interface PasswordPromptProps {
3
+ request: PromptRequest;
4
+ isDarkMode: boolean;
5
+ /** The password, or `null` for Cancel. */
6
+ onAnswer: (password: string | null) => void;
7
+ }
8
+ /**
9
+ * The built-in password prompt, for channels and events alike. Its texts come from the native SDK;
10
+ * the title is the channel's or event's name, or "Password required" for a join.
11
+ */
12
+ export declare const PasswordPrompt: React.FC<PasswordPromptProps>;
13
+ //# sourceMappingURL=PasswordPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PasswordPrompt.d.ts","sourceRoot":"","sources":["../../../../src/components/PasswordPrompt.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAItD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,0CAA0C;IAC1C,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CAC7C;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0DxD,CAAC"}
@@ -1,6 +1,6 @@
1
- import { PlayingState } from "../util/PlayingState";
1
+ import { type LiveVoicePlayingState } from "../sdk/Models";
2
2
  export interface PlayButtonProps {
3
- playingState: PlayingState;
3
+ playingState: LiveVoicePlayingState;
4
4
  isChannelOnline: boolean;
5
5
  hasAudio?: boolean;
6
6
  hasSubtitles?: boolean;
@@ -8,334 +8,17 @@ export interface PlayButtonProps {
8
8
  onAudioPress?: () => void;
9
9
  onSubtitlesPress?: () => void;
10
10
  onPress?: () => void;
11
+ /** The event's brand colour for this appearance; LiveVoice orange when `null`. */
12
+ brandColor?: string | null;
13
+ /** Whether this channel's subtitles are the open ones: the subtitle half is marked. */
14
+ subtitlesOpen?: boolean;
11
15
  }
16
+ /**
17
+ * The default cell's play button, drawn as the native SDK of the platform draws it: iOS
18
+ * `ChannelPlayButton` in its `.sdk` style, Android `PlayButton` in the SDK cell's Listener style.
19
+ * Change them together. Geometry is the same on both; the colours are each platform's own
20
+ * (`buttonColors`).
21
+ */
12
22
  declare const PlayButtonView: React.FC<PlayButtonProps>;
13
- type ButtonStyleType = "paused" | "playing" | "offline";
14
- export declare const getButtonStyle: (type: ButtonStyleType, isDarkMode: boolean, isSplit?: boolean) => {
15
- backgroundColor: string;
16
- borderColor: string;
17
- width: number;
18
- height: number;
19
- borderRadius: number;
20
- borderWidth: number;
21
- alignItems: "center";
22
- justifyContent: "center";
23
- };
24
- export declare const getSplitButtonContainerStyle: (type: ButtonStyleType, isDarkMode: boolean) => {
25
- backgroundColor: string;
26
- borderColor: string;
27
- width: number;
28
- height: number;
29
- borderRadius: number;
30
- borderWidth: number;
31
- flexDirection: "row";
32
- alignItems: "center";
33
- justifyContent: "center";
34
- overflow: "hidden";
35
- } | {
36
- backgroundColor: string;
37
- borderColor: string;
38
- width: number;
39
- height: number;
40
- borderRadius: number;
41
- borderWidth: number;
42
- flexDirection: "row";
43
- alignItems: "center";
44
- justifyContent: "center";
45
- overflow: "hidden";
46
- } | {
47
- backgroundColor: string;
48
- borderColor: string;
49
- width: number;
50
- height: number;
51
- borderRadius: number;
52
- borderWidth: number;
53
- flexDirection: "row";
54
- alignItems: "center";
55
- justifyContent: "center";
56
- overflow: "hidden";
57
- } | {
58
- backgroundColor: string;
59
- borderColor: string;
60
- width: number;
61
- height: number;
62
- borderRadius: number;
63
- borderWidth: number;
64
- flexDirection: "row";
65
- alignItems: "center";
66
- justifyContent: "center";
67
- overflow: "hidden";
68
- } | {
69
- backgroundColor: string;
70
- borderColor: string;
71
- width: number;
72
- height: number;
73
- borderRadius: number;
74
- borderWidth: number;
75
- flexDirection: "row";
76
- alignItems: "center";
77
- justifyContent: "center";
78
- overflow: "hidden";
79
- } | {
80
- backgroundColor: string;
81
- borderColor: string;
82
- width: number;
83
- height: number;
84
- borderRadius: number;
85
- borderWidth: number;
86
- flexDirection: "row";
87
- alignItems: "center";
88
- justifyContent: "center";
89
- overflow: "hidden";
90
- };
91
- export declare const getSplitButtonAudioStyle: (type: ButtonStyleType, isDarkMode: boolean) => {
92
- flex: number;
93
- height: number;
94
- alignItems: "center";
95
- justifyContent: "center";
96
- };
97
- export declare const getSplitButtonSubtitlesStyle: (type: ButtonStyleType, isDarkMode: boolean) => {
98
- flex: number;
99
- height: number;
100
- alignItems: "center";
101
- justifyContent: "center";
102
- };
103
- export declare const getDividerStyle: (type: ButtonStyleType, isDarkMode: boolean) => {
104
- width: number;
105
- height: number;
106
- backgroundColor: string;
107
- };
108
- export declare const ButtonStyles: {
109
- paused: {
110
- light: {
111
- backgroundColor: string;
112
- borderColor: string;
113
- width: number;
114
- height: number;
115
- borderRadius: number;
116
- borderWidth: number;
117
- alignItems: "center";
118
- justifyContent: "center";
119
- };
120
- dark: {
121
- backgroundColor: string;
122
- borderColor: string;
123
- width: number;
124
- height: number;
125
- borderRadius: number;
126
- borderWidth: number;
127
- alignItems: "center";
128
- justifyContent: "center";
129
- };
130
- };
131
- playing: {
132
- light: {
133
- backgroundColor: string;
134
- borderColor: string;
135
- width: number;
136
- height: number;
137
- borderRadius: number;
138
- borderWidth: number;
139
- alignItems: "center";
140
- justifyContent: "center";
141
- };
142
- dark: {
143
- backgroundColor: string;
144
- borderColor: string;
145
- width: number;
146
- height: number;
147
- borderRadius: number;
148
- borderWidth: number;
149
- alignItems: "center";
150
- justifyContent: "center";
151
- };
152
- };
153
- offline: {
154
- light: {
155
- backgroundColor: string;
156
- borderColor: string;
157
- width: number;
158
- height: number;
159
- borderRadius: number;
160
- borderWidth: number;
161
- alignItems: "center";
162
- justifyContent: "center";
163
- };
164
- dark: {
165
- backgroundColor: string;
166
- borderColor: string;
167
- width: number;
168
- height: number;
169
- borderRadius: number;
170
- borderWidth: number;
171
- alignItems: "center";
172
- justifyContent: "center";
173
- };
174
- };
175
- };
176
- export declare const SplitButtonStyles: {
177
- paused: {
178
- light: {
179
- container: {
180
- backgroundColor: string;
181
- borderColor: string;
182
- width: number;
183
- height: number;
184
- borderRadius: number;
185
- borderWidth: number;
186
- flexDirection: "row";
187
- alignItems: "center";
188
- justifyContent: "center";
189
- overflow: "hidden";
190
- };
191
- audio: {
192
- flex: number;
193
- height: number;
194
- alignItems: "center";
195
- justifyContent: "center";
196
- };
197
- subtitles: {
198
- flex: number;
199
- height: number;
200
- alignItems: "center";
201
- justifyContent: "center";
202
- };
203
- };
204
- dark: {
205
- container: {
206
- backgroundColor: string;
207
- borderColor: string;
208
- width: number;
209
- height: number;
210
- borderRadius: number;
211
- borderWidth: number;
212
- flexDirection: "row";
213
- alignItems: "center";
214
- justifyContent: "center";
215
- overflow: "hidden";
216
- };
217
- audio: {
218
- flex: number;
219
- height: number;
220
- alignItems: "center";
221
- justifyContent: "center";
222
- };
223
- subtitles: {
224
- flex: number;
225
- height: number;
226
- alignItems: "center";
227
- justifyContent: "center";
228
- };
229
- };
230
- };
231
- playing: {
232
- light: {
233
- container: {
234
- backgroundColor: string;
235
- borderColor: string;
236
- width: number;
237
- height: number;
238
- borderRadius: number;
239
- borderWidth: number;
240
- flexDirection: "row";
241
- alignItems: "center";
242
- justifyContent: "center";
243
- overflow: "hidden";
244
- };
245
- audio: {
246
- flex: number;
247
- height: number;
248
- alignItems: "center";
249
- justifyContent: "center";
250
- };
251
- subtitles: {
252
- flex: number;
253
- height: number;
254
- alignItems: "center";
255
- justifyContent: "center";
256
- };
257
- };
258
- dark: {
259
- container: {
260
- backgroundColor: string;
261
- borderColor: string;
262
- width: number;
263
- height: number;
264
- borderRadius: number;
265
- borderWidth: number;
266
- flexDirection: "row";
267
- alignItems: "center";
268
- justifyContent: "center";
269
- overflow: "hidden";
270
- };
271
- audio: {
272
- flex: number;
273
- height: number;
274
- alignItems: "center";
275
- justifyContent: "center";
276
- };
277
- subtitles: {
278
- flex: number;
279
- height: number;
280
- alignItems: "center";
281
- justifyContent: "center";
282
- };
283
- };
284
- };
285
- offline: {
286
- light: {
287
- container: {
288
- backgroundColor: string;
289
- borderColor: string;
290
- width: number;
291
- height: number;
292
- borderRadius: number;
293
- borderWidth: number;
294
- flexDirection: "row";
295
- alignItems: "center";
296
- justifyContent: "center";
297
- overflow: "hidden";
298
- };
299
- audio: {
300
- flex: number;
301
- height: number;
302
- alignItems: "center";
303
- justifyContent: "center";
304
- };
305
- subtitles: {
306
- flex: number;
307
- height: number;
308
- alignItems: "center";
309
- justifyContent: "center";
310
- };
311
- };
312
- dark: {
313
- container: {
314
- backgroundColor: string;
315
- borderColor: string;
316
- width: number;
317
- height: number;
318
- borderRadius: number;
319
- borderWidth: number;
320
- flexDirection: "row";
321
- alignItems: "center";
322
- justifyContent: "center";
323
- overflow: "hidden";
324
- };
325
- audio: {
326
- flex: number;
327
- height: number;
328
- alignItems: "center";
329
- justifyContent: "center";
330
- };
331
- subtitles: {
332
- flex: number;
333
- height: number;
334
- alignItems: "center";
335
- justifyContent: "center";
336
- };
337
- };
338
- };
339
- };
340
23
  export default PlayButtonView;
341
24
  //# sourceMappingURL=PlayButtonView.d.ts.map
@@ -1 +1 @@
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,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAiI7C,CAAC;AAEF,KAAK,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAExD,eAAO,MAAM,cAAc,GACzB,MAAM,eAAe,EACrB,YAAY,OAAO,EACnB,UAAS,OAAe;;;;;;;;;CAMzB,CAAC;AAEF,eAA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,CAAC;IACrB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,uFAAuF;IACvF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;;GAKG;AACH,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2G7C,CAAC;AAwHF,eAAe,cAAc,CAAC"}
@@ -1,9 +1,12 @@
1
1
  import React from 'react';
2
- import { type Reconnecting } from '../util/UIState';
2
+ import { type RetryValue } from '../sdk/Lifecycle';
3
3
  export interface ReconnectingProps {
4
4
  isDarkMode?: boolean;
5
- state: Reconnecting;
6
- onPress: () => void;
5
+ retry: RetryValue;
7
6
  }
7
+ /**
8
+ * The default reconnecting part. The reconnect runs by itself, so it has no retry-now button; the
9
+ * error part has the retry.
10
+ */
8
11
  export declare const ReconnectingView: React.FC<ReconnectingProps>;
9
12
  //# sourceMappingURL=ReconnectingView.d.ts.map