@amityco/react-native-social-uikit 4.0.0-eaa97a5.0 → 4.0.0-fe73f9e.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 (250) hide show
  1. package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
  2. package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
  3. package/lib/commonjs/components/MediaSection/index.js +3 -3
  4. package/lib/commonjs/components/MediaSection/index.js.map +1 -1
  5. package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js +5 -14
  6. package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
  7. package/lib/commonjs/components/PostTypeChoiceModal/style.js +2 -1
  8. package/lib/commonjs/components/PostTypeChoiceModal/style.js.map +1 -1
  9. package/lib/commonjs/components/Social/PostList/index.js +3 -1
  10. package/lib/commonjs/components/Social/PostList/index.js.map +1 -1
  11. package/lib/commonjs/index.js +0 -6
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/commonjs/providers/file-provider.js +38 -19
  14. package/lib/commonjs/providers/file-provider.js.map +1 -1
  15. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js +16 -16
  16. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  17. package/lib/commonjs/screens/LivestreamPlayer/index.js +6 -3
  18. package/lib/commonjs/screens/LivestreamPlayer/index.js.map +1 -1
  19. package/lib/commonjs/svg/svg-xml-list.js +1 -1
  20. package/lib/commonjs/util/postTypeChecker.js.map +1 -1
  21. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +9 -11
  22. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  23. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
  24. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
  25. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +1 -2
  26. package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
  27. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +2 -3
  28. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  29. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +25 -28
  30. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  31. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  32. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  33. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +68 -206
  34. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  35. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +3 -71
  36. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  37. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +124 -150
  38. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  39. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +1 -2
  40. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  41. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +37 -1
  42. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  43. package/lib/commonjs/v4/component/LivestreamContent/index.js +12 -12
  44. package/lib/commonjs/v4/component/LivestreamContent/index.js.map +1 -1
  45. package/lib/commonjs/v4/component/LoadingImage/index.js +21 -22
  46. package/lib/commonjs/v4/component/LoadingImage/index.js.map +1 -1
  47. package/lib/commonjs/v4/component/LoadingImage/styles.js +19 -2
  48. package/lib/commonjs/v4/component/LoadingImage/styles.js.map +1 -1
  49. package/lib/commonjs/v4/component/LoadingVideo/index.js +11 -3
  50. package/lib/commonjs/v4/component/LoadingVideo/index.js.map +1 -1
  51. package/lib/commonjs/v4/component/PostContent/index.js +4 -4
  52. package/lib/commonjs/v4/component/PostContent/index.js.map +1 -1
  53. package/lib/commonjs/v4/component/PostMenu/index.js +2 -2
  54. package/lib/commonjs/v4/component/PostMenu/index.js.map +1 -1
  55. package/lib/commonjs/v4/component/Toast/index.js +4 -4
  56. package/lib/commonjs/v4/component/Toast/index.js.map +1 -1
  57. package/lib/commonjs/v4/component/Toast/styles.js +2 -2
  58. package/lib/commonjs/v4/component/Toast/styles.js.map +1 -1
  59. package/lib/commonjs/v4/enum/livestreamStatus.js +13 -0
  60. package/lib/commonjs/v4/enum/livestreamStatus.js.map +1 -0
  61. package/lib/commonjs/v4/hook/index.js +0 -22
  62. package/lib/commonjs/v4/hook/index.js.map +1 -1
  63. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +3 -1
  64. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  65. package/lib/commonjs/v4/index.js +0 -7
  66. package/lib/commonjs/v4/index.js.map +1 -1
  67. package/lib/commonjs/v4/stores/slices/toast.js +1 -4
  68. package/lib/commonjs/v4/stores/slices/toast.js.map +1 -1
  69. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
  70. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
  71. package/lib/module/components/MediaSection/index.js +3 -3
  72. package/lib/module/components/MediaSection/index.js.map +1 -1
  73. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js +8 -15
  74. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
  75. package/lib/module/components/PostTypeChoiceModal/style.js +2 -1
  76. package/lib/module/components/PostTypeChoiceModal/style.js.map +1 -1
  77. package/lib/module/components/Social/PostList/index.js +3 -1
  78. package/lib/module/components/Social/PostList/index.js.map +1 -1
  79. package/lib/module/index.js +6 -2
  80. package/lib/module/index.js.map +1 -1
  81. package/lib/module/providers/file-provider.js +38 -19
  82. package/lib/module/providers/file-provider.js.map +1 -1
  83. package/lib/module/screens/CreateLivestream/CreateLivestream.js +17 -17
  84. package/lib/module/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  85. package/lib/module/screens/LivestreamPlayer/index.js +8 -4
  86. package/lib/module/screens/LivestreamPlayer/index.js.map +1 -1
  87. package/lib/module/svg/svg-xml-list.js +1 -1
  88. package/lib/module/util/postTypeChecker.js.map +1 -1
  89. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +9 -11
  90. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  91. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
  92. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
  93. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +1 -2
  94. package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
  95. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +2 -3
  96. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  97. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +26 -29
  98. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  99. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  100. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  101. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +72 -211
  102. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  103. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +3 -71
  104. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  105. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +126 -152
  106. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  107. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +1 -2
  108. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  109. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +37 -1
  110. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  111. package/lib/module/v4/component/LivestreamContent/index.js +13 -13
  112. package/lib/module/v4/component/LivestreamContent/index.js.map +1 -1
  113. package/lib/module/v4/component/LoadingImage/index.js +21 -21
  114. package/lib/module/v4/component/LoadingImage/index.js.map +1 -1
  115. package/lib/module/v4/component/LoadingImage/styles.js +19 -2
  116. package/lib/module/v4/component/LoadingImage/styles.js.map +1 -1
  117. package/lib/module/v4/component/LoadingVideo/index.js +11 -3
  118. package/lib/module/v4/component/LoadingVideo/index.js.map +1 -1
  119. package/lib/module/v4/component/PostContent/index.js +4 -4
  120. package/lib/module/v4/component/PostContent/index.js.map +1 -1
  121. package/lib/module/v4/component/PostMenu/index.js +2 -2
  122. package/lib/module/v4/component/PostMenu/index.js.map +1 -1
  123. package/lib/module/v4/component/Toast/index.js +4 -4
  124. package/lib/module/v4/component/Toast/index.js.map +1 -1
  125. package/lib/module/v4/component/Toast/styles.js +2 -2
  126. package/lib/module/v4/component/Toast/styles.js.map +1 -1
  127. package/lib/module/v4/enum/livestreamStatus.js +7 -0
  128. package/lib/module/v4/enum/livestreamStatus.js.map +1 -0
  129. package/lib/module/v4/hook/index.js +0 -2
  130. package/lib/module/v4/hook/index.js.map +1 -1
  131. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +3 -1
  132. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  133. package/lib/module/v4/index.js +1 -1
  134. package/lib/module/v4/index.js.map +1 -1
  135. package/lib/module/v4/stores/slices/toast.js +1 -4
  136. package/lib/module/v4/stores/slices/toast.js.map +1 -1
  137. package/lib/typescript/src/components/MediaSection/index.d.ts.map +1 -1
  138. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts +2 -1
  139. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts.map +1 -1
  140. package/lib/typescript/src/components/Social/PostList/index.d.ts +3 -1
  141. package/lib/typescript/src/components/Social/PostList/index.d.ts.map +1 -1
  142. package/lib/typescript/src/index.d.ts +2 -2
  143. package/lib/typescript/src/index.d.ts.map +1 -1
  144. package/lib/typescript/src/providers/file-provider.d.ts.map +1 -1
  145. package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
  146. package/lib/typescript/src/util/postTypeChecker.d.ts +1 -1
  147. package/lib/typescript/src/util/postTypeChecker.d.ts.map +1 -1
  148. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts +3 -1
  149. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
  150. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts +0 -1
  151. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts.map +1 -1
  152. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.d.ts.map +1 -1
  153. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.d.ts +1 -1
  154. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.d.ts.map +1 -1
  155. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts +2 -70
  156. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts.map +1 -1
  157. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.d.ts.map +1 -1
  158. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts +0 -1
  159. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts.map +1 -1
  160. package/lib/typescript/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.d.ts.map +1 -1
  161. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts +1 -1
  162. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts.map +1 -1
  163. package/lib/typescript/src/v4/component/LoadingImage/index.d.ts +2 -1
  164. package/lib/typescript/src/v4/component/LoadingImage/index.d.ts.map +1 -1
  165. package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts +21 -0
  166. package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts.map +1 -1
  167. package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts +2 -1
  168. package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts.map +1 -1
  169. package/lib/typescript/src/v4/component/PostContent/index.d.ts.map +1 -1
  170. package/lib/typescript/src/v4/component/Toast/styles.d.ts +1 -1
  171. package/lib/typescript/src/v4/component/Toast/styles.d.ts.map +1 -1
  172. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts +7 -0
  173. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts.map +1 -0
  174. package/lib/typescript/src/v4/hook/index.d.ts +0 -2
  175. package/lib/typescript/src/v4/hook/index.d.ts.map +1 -1
  176. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +0 -3
  177. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
  178. package/lib/typescript/src/v4/index.d.ts +0 -1
  179. package/lib/typescript/src/v4/index.d.ts.map +1 -1
  180. package/lib/typescript/src/v4/routes/RouteParamList.d.ts +1 -1
  181. package/lib/typescript/src/v4/routes/RouteParamList.d.ts.map +1 -1
  182. package/lib/typescript/src/v4/stores/slices/toast.d.ts +0 -1
  183. package/lib/typescript/src/v4/stores/slices/toast.d.ts.map +1 -1
  184. package/package.json +3 -6
  185. package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
  186. package/src/components/MediaSection/index.tsx +6 -4
  187. package/src/components/PostTypeChoiceModal/PostTypeChoiceModal.tsx +15 -15
  188. package/src/components/PostTypeChoiceModal/style.ts +2 -1
  189. package/src/components/Social/PostList/index.tsx +4 -1
  190. package/src/index.tsx +2 -2
  191. package/src/providers/file-provider.tsx +42 -20
  192. package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
  193. package/src/screens/LivestreamPlayer/index.tsx +15 -9
  194. package/src/svg/svg-xml-list.ts +1 -1
  195. package/src/util/postTypeChecker.ts +1 -1
  196. package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +10 -10
  197. package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +1 -1
  198. package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.tsx +1 -1
  199. package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.tsx +1 -1
  200. package/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.ts +2 -3
  201. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +25 -24
  202. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
  203. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +89 -241
  204. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.ts +3 -72
  205. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.tsx +154 -201
  206. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +0 -2
  207. package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +46 -0
  208. package/src/v4/component/LivestreamContent/index.tsx +22 -21
  209. package/src/v4/component/LoadingImage/index.tsx +28 -22
  210. package/src/v4/component/LoadingImage/styles.ts +17 -0
  211. package/src/v4/component/LoadingVideo/index.tsx +12 -3
  212. package/src/v4/component/PostContent/index.tsx +8 -6
  213. package/src/v4/component/PostMenu/index.tsx +2 -2
  214. package/src/v4/component/Toast/index.tsx +1 -1
  215. package/src/v4/component/Toast/styles.ts +2 -2
  216. package/src/v4/enum/livestreamStatus.ts +6 -0
  217. package/src/v4/hook/index.ts +0 -2
  218. package/src/v4/hook/useCustomRankingGlobalFeed.ts +1 -1
  219. package/src/v4/index.tsx +1 -1
  220. package/src/v4/routes/RouteParamList.tsx +1 -1
  221. package/src/v4/stores/slices/toast.ts +0 -5
  222. package/uikit.config.json +1 -1
  223. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +0 -50
  224. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +0 -1
  225. package/lib/commonjs/v4/enum/roomStatus.js +0 -14
  226. package/lib/commonjs/v4/enum/roomStatus.js.map +0 -1
  227. package/lib/commonjs/v4/hook/usePostSubscription.js +0 -38
  228. package/lib/commonjs/v4/hook/usePostSubscription.js.map +0 -1
  229. package/lib/commonjs/v4/hook/useRoomSubscription.js +0 -22
  230. package/lib/commonjs/v4/hook/useRoomSubscription.js.map +0 -1
  231. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +0 -42
  232. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +0 -1
  233. package/lib/module/v4/enum/roomStatus.js +0 -8
  234. package/lib/module/v4/enum/roomStatus.js.map +0 -1
  235. package/lib/module/v4/hook/usePostSubscription.js +0 -31
  236. package/lib/module/v4/hook/usePostSubscription.js.map +0 -1
  237. package/lib/module/v4/hook/useRoomSubscription.js +0 -15
  238. package/lib/module/v4/hook/useRoomSubscription.js.map +0 -1
  239. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts +0 -8
  240. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts.map +0 -1
  241. package/lib/typescript/src/v4/enum/roomStatus.d.ts +0 -8
  242. package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +0 -1
  243. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts +0 -4
  244. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts.map +0 -1
  245. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts +0 -4
  246. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts.map +0 -1
  247. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx +0 -48
  248. package/src/v4/enum/roomStatus.ts +0 -7
  249. package/src/v4/hook/usePostSubscription.ts +0 -34
  250. package/src/v4/hook/useRoomSubscription.ts +0 -19
@@ -1,72 +1,131 @@
1
- import React, { useEffect, useState, useRef } from 'react';
2
- import { View, TouchableOpacity, Platform } from 'react-native';
1
+ import React, { useEffect, useRef, useState } from 'react';
2
+ import {
3
+ View,
4
+ TouchableOpacity,
5
+ TouchableWithoutFeedback,
6
+ useAnimatedValue,
7
+ } from 'react-native';
3
8
  import { useStyles } from './styles';
9
+ // @ts-ignore
10
+ // import { AmityStreamPlayer } from '@amityco/video-player-react-native';
4
11
  import LiveStreamEndThumbnail from '../../../component/LivestreamContent/LivestreamEndedThumbnail';
12
+ import { Animated } from 'react-native';
5
13
  import { SvgXml } from 'react-native-svg';
6
- import { close } from '../../../assets/icons';
14
+ import {
15
+ getPostTopic,
16
+ PostRepository,
17
+ StreamRepository,
18
+ subscribeTopic,
19
+ } from '@amityco/ts-sdk-react-native';
20
+ import { close, pause, resume } from '../../../assets/icons';
7
21
  import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
8
22
  import { NativeStackNavigationProp } from '@react-navigation/native-stack';
9
23
  import { RootStackParamList } from '../../../routes/RouteParamList';
10
- import { RoomStatus } from '../../../enum/roomStatus';
24
+ import { LivestreamStatus } from '../../../enum/livestreamStatus';
11
25
  import LiveStreamIdleThumbnail from '../../../component/LivestreamContent/LivestreamIdleThumbnail';
12
26
  import { Typography } from '../../../component/Typography/Typography';
13
27
  import { SafeAreaView } from 'react-native-safe-area-context';
14
28
  import NetInfo from '@react-native-community/netinfo';
15
29
  import { CircularProgressIndicator } from '../../../component/CircularProgressIndicator';
16
- import Video from 'react-native-video';
17
- import useAuth from '../../../../hooks/useAuth';
18
- import {
19
- usePostSubscription,
20
- useRoomSubscription,
21
- } from '../../../../v4/hook/index';
22
- import { RoomRepository } from '@amityco/ts-sdk-react-native';
30
+ const usePostSubscription = (postId: string) => {
31
+ const [subscribedPost, setSubscribedPost] = useState<Amity.Post>(null);
32
+
33
+ useEffect(() => {
34
+ let unsubscribe: () => void;
35
+ if (postId) {
36
+ unsubscribe = PostRepository.getPost(postId, ({ data }) => {
37
+ setSubscribedPost(data);
38
+ });
39
+ }
40
+ return () => {
41
+ unsubscribe && unsubscribe();
42
+ };
43
+ }, [postId]);
44
+
45
+ useEffect(() => {
46
+ let unsubscribe: () => void;
47
+ if (subscribedPost) {
48
+ unsubscribe = subscribeTopic(getPostTopic(subscribedPost));
49
+ }
50
+ return () => {
51
+ unsubscribe && unsubscribe();
52
+ };
53
+ }, [subscribedPost]);
54
+
55
+ return { subscribedPost };
56
+ };
23
57
 
24
58
  function AmityLiveStreamPlayerPage() {
59
+ const ref = useRef<any>(null);
25
60
  const { styles, theme } = useStyles();
61
+ const controlOpacity = useAnimatedValue(0);
26
62
  const navigation =
27
63
  useNavigation<NativeStackNavigationProp<RootStackParamList>>();
28
64
  const route = useRoute<RouteProp<RootStackParamList, 'LivestreamPlayer'>>();
29
65
 
66
+ const [error, setError] = useState<any>(null);
67
+ const [isPlaying, setIsPlaying] = useState(true);
30
68
  const [reconnecting, setReconnecting] = useState(false);
31
- const [room, setRoom] = useState<Amity.Room | null>(null);
32
- const [videoError, setVideoError] = useState(false);
33
- const [error, setError] = useState<Error | null>(null);
34
- const [, setPlayerInitialized] = useState(false);
35
- const [videoKey, setVideoKey] = useState(0);
36
- const [isPaused, setIsPaused] = useState(false);
37
- const [wasLive, setWasLive] = useState(false);
69
+ const [livestream, setLivestream] = useState<Amity.Stream>();
70
+
71
+ const { streamId, post } = route.params;
38
72
 
39
- const { roomId, post } = route.params;
40
73
  const { subscribedPost } = usePostSubscription(post?.postId);
41
- useRoomSubscription({ room });
42
74
 
43
- const { client } = useAuth();
44
- const videoRef = useRef<any>(null);
45
- const isStreamEnding = useRef(false);
75
+ const onStopPlayer = () => {
76
+ ref.current && ref.current.pause();
77
+ setIsPlaying(false);
78
+ };
79
+
80
+ const onStartPlayer = () => {
81
+ ref.current && ref.current.play();
82
+ setIsPlaying(true);
83
+ };
84
+
85
+ const onPressControlButton = () => {
86
+ isPlaying ? onStopPlayer() : onStartPlayer();
87
+ };
88
+
89
+ const onToggleControl = () => {
90
+ controlOpacity.stopAnimation((currentValue) => {
91
+ Animated.timing(controlOpacity, {
92
+ toValue: currentValue === 0 ? 1 : 0,
93
+ duration: 300,
94
+ useNativeDriver: false,
95
+ }).start();
96
+ });
97
+ };
46
98
 
47
99
  useEffect(() => {
48
- const unsubscribe = RoomRepository.getRoom(
49
- roomId,
100
+ const unsubscribe = StreamRepository.getStreamById(
101
+ streamId,
50
102
  ({ data, loading, error: streamError }) => {
51
103
  if (streamError) setError(streamError);
52
- if (!loading && data) setRoom({ ...data });
104
+ if (!loading && data) setLivestream({ ...data });
53
105
  }
54
106
  );
55
107
 
56
108
  return () => unsubscribe();
57
- }, [roomId]);
109
+ }, [streamId]);
58
110
 
59
111
  useEffect(() => {
60
- if (room?.status === RoomStatus.live) {
61
- setWasLive(true);
112
+ if (livestream?.isDeleted || subscribedPost?.isDeleted) {
113
+ navigation.replace('PostDetail', { postId: subscribedPost?.postId });
62
114
  }
63
- }, [room?.status]);
115
+ }, [livestream?.isDeleted, subscribedPost, navigation]);
64
116
 
65
117
  useEffect(() => {
66
- if (room?.isDeleted || subscribedPost?.isDeleted) {
67
- navigation.replace('PostDetail', { postId: subscribedPost?.postId });
118
+ const isTerminated =
119
+ livestream?.moderation?.terminateLabels &&
120
+ livestream?.moderation?.terminateLabels?.length > 0;
121
+ const isLiveOrEnded =
122
+ livestream?.status === LivestreamStatus.live ||
123
+ livestream?.status === LivestreamStatus.ended;
124
+
125
+ if (isLiveOrEnded && isTerminated) {
126
+ navigation.replace('LivestreamTerminated', { type: 'viewer' });
68
127
  }
69
- }, [room?.isDeleted, subscribedPost, navigation]);
128
+ }, [livestream?.moderation?.terminateLabels, livestream?.status, navigation]);
70
129
 
71
130
  useEffect(() => {
72
131
  const unsubscribe = NetInfo.addEventListener((state) => {
@@ -75,121 +134,24 @@ function AmityLiveStreamPlayerPage() {
75
134
  return () => unsubscribe();
76
135
  }, []);
77
136
 
78
- useEffect(() => {
79
- if (!room?.status) return;
80
-
81
- const shouldEnd =
82
- room.status === RoomStatus.ended ||
83
- (room.status === RoomStatus.recorded && wasLive);
84
-
85
- if (!shouldEnd || isStreamEnding.current) return;
86
-
87
- isStreamEnding.current = true;
88
- setIsPaused(true);
89
-
90
- if (Platform.OS === 'ios') {
91
- // iOS: ONLY dismiss fullscreen. DO NOT touch key. DO NOT unmount.
92
- requestAnimationFrame(() => {
93
- videoRef.current?.dismissFullscreenPlayer?.();
94
- });
95
- } else {
96
- // Android: HARD destroy
97
- setTimeout(() => {
98
- setVideoKey((prev) => prev + 1);
99
- }, 50);
100
- }
101
- }, [room?.status, wasLive]);
102
-
103
- useEffect(() => {
104
- let timer: ReturnType<typeof setTimeout> | null = null;
105
-
106
- if (
107
- videoRef.current &&
108
- room &&
109
- room.status === RoomStatus.live &&
110
- !videoError &&
111
- Platform.OS === 'ios'
112
- ) {
113
- const isTerminated =
114
- room?.moderation?.terminateLabels &&
115
- room?.moderation?.terminateLabels?.length > 0;
116
-
117
- if (!isTerminated) {
118
- timer = setTimeout(() => {
119
- videoRef.current?.presentFullscreenPlayer();
120
- }, 100);
121
- }
122
- }
123
-
124
- return () => {
125
- if (timer !== null) {
126
- clearTimeout(timer);
127
- }
128
- };
129
- }, [room, videoError]);
130
-
131
- const isTerminated =
132
- room?.moderation?.terminateLabels &&
133
- room?.moderation?.terminateLabels?.length > 0;
134
-
135
- const shouldShowEndThumbnail =
136
- room?.status === RoomStatus.ended ||
137
- (room?.status === RoomStatus.recorded && wasLive) ||
138
- isTerminated;
139
-
140
- useEffect(() => {
141
- if (!room?.status) return;
142
-
143
- const shouldEnd =
144
- room.status === RoomStatus.ended ||
145
- (room.status === RoomStatus.recorded && wasLive);
146
-
147
- if (!shouldEnd || isStreamEnding.current) return;
148
-
149
- isStreamEnding.current = true;
150
- setIsPaused(true);
151
-
152
- if (Platform.OS === 'ios') {
153
- // iOS: just dismiss fullscreen, DO NOT destroy immediately
154
- if (videoRef.current) {
155
- try {
156
- videoRef.current.dismissFullscreenPlayer?.();
157
- } catch {}
158
- }
159
- } else {
160
- // Android: HARD destroy
161
- setTimeout(() => {
162
- setVideoKey((prev) => prev + 1);
163
- }, 50);
164
- }
165
- }, [room?.status, wasLive]);
166
-
167
- if (!room || error) {
137
+ if (!livestream || error)
168
138
  return (
169
139
  <SafeAreaView style={styles.container}>
170
140
  <LiveStreamIdleThumbnail />
171
141
  </SafeAreaView>
172
142
  );
173
- }
174
-
175
- const closePlayer = () => {
176
- navigation.goBack();
177
- };
178
-
179
- const videoUrl =
180
- room.status === RoomStatus.recorded
181
- ? room.recordedPlaybackInfos[0]?.url
182
- : room.livePlaybackUrl;
183
143
 
184
144
  return (
185
145
  <SafeAreaView style={styles.container}>
186
- {shouldShowEndThumbnail ? (
146
+ {livestream.status === LivestreamStatus.ended ? (
187
147
  <>
188
148
  <View style={styles.steamEndContainer}>
189
149
  <LiveStreamEndThumbnail />
190
150
  </View>
191
-
192
- <TouchableOpacity style={styles.closeButton} onPress={closePlayer}>
151
+ <TouchableOpacity
152
+ style={styles.closeButton}
153
+ onPress={navigation.goBack}
154
+ >
193
155
  <SvgXml
194
156
  xml={close()}
195
157
  width="28"
@@ -198,71 +160,14 @@ function AmityLiveStreamPlayerPage() {
198
160
  />
199
161
  </TouchableOpacity>
200
162
  </>
201
- ) : (
202
- <View style={styles.container}>
203
- {Platform.OS !== 'android' &&
204
- (room.status === RoomStatus.live ||
205
- room.status === RoomStatus.waiting_reconnect) && (
206
- <View style={styles.indicator}>
207
- <View style={styles.status}>
208
- <Typography.CaptionBold style={styles.live}>
209
- LIVE
210
- </Typography.CaptionBold>
211
- </View>
212
- </View>
213
- )}
214
-
215
- {!shouldShowEndThumbnail && (
216
- <Video
217
- key={
218
- Platform.OS === 'android' ? `${videoUrl}-${videoKey}` : videoUrl
219
- }
220
- ref={videoRef}
221
- source={{
222
- uri:
223
- room.status === RoomStatus.recorded
224
- ? room.recordedPlaybackInfos[0]?.url
225
- : room.livePlaybackUrl,
226
- headers: {
227
- Authorization: `Bearer ${client.token.accessToken}`,
228
- },
229
- }}
230
- style={styles.container}
231
- resizeMode="contain"
232
- controls={room?.status === RoomStatus.recorded && !wasLive}
233
- fullscreen={
234
- Platform.OS === 'ios' && room.status !== RoomStatus.recorded
235
- }
236
- fullscreenOrientation="landscape"
237
- paused={isPaused}
238
- muted={false}
239
- volume={1.0}
240
- audioOutput="speaker"
241
- playInBackground={false}
242
- playWhenInactive={false}
243
- repeat={false}
244
- onLoad={() => {
245
- setPlayerInitialized(true);
246
- if (room.status === RoomStatus.recorded) {
247
- setIsPaused(false);
248
- }
249
- }}
250
- onError={(e) => {
251
- console.log('Video Error: ', e);
252
- setVideoError(true);
253
- }}
254
- onFullscreenPlayerDidDismiss={() => {
255
- if (Platform.OS === 'ios') {
256
- closePlayer();
257
- }
258
- }}
259
- />
260
- )}
261
- </View>
262
- )}
263
-
264
- {((room.status === RoomStatus.live && reconnecting) ||
265
- room.status === RoomStatus.waiting_reconnect) && (
163
+ ) : // <AmityStreamPlayer
164
+ // ref={ref}
165
+ // stream={livestream}
166
+ // onBack={navigation.goBack}
167
+ // status={livestream.status === 'live' ? 'live' : 'recorded'}
168
+ // />
169
+ null}
170
+ {livestream.status === LivestreamStatus.live && reconnecting && (
266
171
  <View style={styles.connecting}>
267
172
  <CircularProgressIndicator size={40} strokeWidth={2} />
268
173
  <Typography.TitleBold style={styles.text}>
@@ -274,6 +179,54 @@ function AmityLiveStreamPlayerPage() {
274
179
  </Typography.Caption>
275
180
  </View>
276
181
  )}
182
+ {livestream.status === LivestreamStatus.live && (
183
+ <>
184
+ <View style={styles.indicator}>
185
+ <View style={styles.status}>
186
+ <Typography.CaptionBold style={styles.live}>
187
+ LIVE
188
+ </Typography.CaptionBold>
189
+ </View>
190
+ </View>
191
+ <TouchableWithoutFeedback onPress={onToggleControl}>
192
+ <Animated.View
193
+ style={[styles.control, { opacity: controlOpacity }]}
194
+ >
195
+ <TouchableOpacity
196
+ style={styles.closeButton}
197
+ onPress={navigation.goBack}
198
+ >
199
+ <SvgXml
200
+ xml={close()}
201
+ width="28"
202
+ height="28"
203
+ color={theme.colors.background}
204
+ />
205
+ </TouchableOpacity>
206
+
207
+ <View style={styles.controller}>
208
+ <TouchableOpacity onPress={onPressControlButton}>
209
+ {isPlaying ? (
210
+ <SvgXml
211
+ width={32}
212
+ height={32}
213
+ xml={pause()}
214
+ color={theme.colors.background}
215
+ />
216
+ ) : (
217
+ <SvgXml
218
+ width={32}
219
+ height={32}
220
+ xml={resume()}
221
+ color={theme.colors.background}
222
+ />
223
+ )}
224
+ </TouchableOpacity>
225
+ </View>
226
+ </Animated.View>
227
+ </TouchableWithoutFeedback>
228
+ </>
229
+ )}
277
230
  </SafeAreaView>
278
231
  );
279
232
  }
@@ -13,11 +13,9 @@ export const useStyles = () => {
13
13
  position: 'relative',
14
14
  backgroundColor: '#000000',
15
15
  },
16
-
17
16
  steamEndContainer: {
18
17
  flex: 1,
19
18
  justifyContent: 'center',
20
- backgroundColor: '#000000',
21
19
  },
22
20
  indicator: {
23
21
  left: 16,
@@ -107,12 +107,16 @@ const AmityPostComposerPage: FC<AmityPostComposerPageType> = ({
107
107
  const [deletedPostIds, setDeletedPostIds] = useState<string[]>([]);
108
108
  const [isUploading, setIsUploading] = useState(false);
109
109
  const [hasChangedAttachment, setHasChangedAttachment] = useState(false);
110
+ const [imageErrors, setImageErrors] = useState<Set<string>>(new Set());
111
+ const [videoErrors, setVideoErrors] = useState<Set<string>>(new Set());
110
112
  const privateCommunityId = !community?.isPublic && community?.communityId;
111
113
  const title = isEditMode
112
114
  ? 'Edit Post'
113
115
  : community?.displayName ?? 'My Timeline';
114
116
  const isInputValid =
115
117
  !isUploading &&
118
+ imageErrors.size === 0 &&
119
+ videoErrors.size === 0 &&
116
120
  inputMessage.trim().length <= MAXIMUM_POST_CHARACTERS &&
117
121
  (inputMessage.trim().length > 0 ||
118
122
  displayImages.length > 0 ||
@@ -598,10 +602,45 @@ const AmityPostComposerPage: FC<AmityPostComposerPageType> = ({
598
602
  }
599
603
  }, [displayVideos.length, processMedia]);
600
604
 
605
+ const handleImageUploadError = useCallback(
606
+ (hasError: boolean, source: string) => {
607
+ setImageErrors((prev) => {
608
+ const newSet = new Set(prev);
609
+ if (hasError) {
610
+ newSet.add(source);
611
+ } else {
612
+ newSet.delete(source);
613
+ }
614
+ return newSet;
615
+ });
616
+ },
617
+ []
618
+ );
619
+
620
+ const handleVideoUploadError = useCallback(
621
+ (hasError: boolean, source: string) => {
622
+ setVideoErrors((prev) => {
623
+ const newSet = new Set(prev);
624
+ if (hasError) {
625
+ newSet.add(source);
626
+ } else {
627
+ newSet.delete(source);
628
+ }
629
+ return newSet;
630
+ });
631
+ },
632
+ []
633
+ );
634
+
601
635
  const handleOnCloseImage = useCallback(
602
636
  (originalPath: string, _, postId: string) => {
603
637
  setHasChangedAttachment(true);
604
638
  setDeletedPostIds((prev) => [...prev, postId]);
639
+ setImageErrors((prev) => {
640
+ const newSet = new Set(prev);
641
+ newSet.delete(originalPath);
642
+ return newSet;
643
+ });
605
644
  setDisplayImages((prevData) => {
606
645
  const newData = prevData.filter(
607
646
  (item: IDisplayImage) => item.url !== originalPath
@@ -615,6 +654,11 @@ const AmityPostComposerPage: FC<AmityPostComposerPageType> = ({
615
654
  (originalPath: string, _, postId: string) => {
616
655
  setHasChangedAttachment(true);
617
656
  setDeletedPostIds((prev) => [...prev, postId]);
657
+ setVideoErrors((prev) => {
658
+ const newSet = new Set(prev);
659
+ newSet.delete(originalPath);
660
+ return newSet;
661
+ });
618
662
  setDisplayVideos((prevData) => {
619
663
  const newData = prevData.filter(
620
664
  (item: IDisplayImage) => item.url !== originalPath
@@ -760,6 +804,7 @@ const AmityPostComposerPage: FC<AmityPostComposerPageType> = ({
760
804
  onClose={handleOnCloseImage}
761
805
  index={index} //TODO: Fix this without index
762
806
  onLoadFinish={handleOnFinishImage}
807
+ onUploadError={handleImageUploadError}
763
808
  isUploaded={item.isUploaded}
764
809
  fileId={item.fileId}
765
810
  fileCount={displayImages.length}
@@ -783,6 +828,7 @@ const AmityPostComposerPage: FC<AmityPostComposerPageType> = ({
783
828
  onClose={handleOnCloseVideo}
784
829
  index={index} //TODO: Fix this without index
785
830
  onLoadFinish={handleOnFinishVideo}
831
+ onUploadError={handleVideoUploadError}
786
832
  isUploaded={item.isUploaded}
787
833
  fileId={item.fileId}
788
834
  thumbNail={item.thumbNail as string}
@@ -7,14 +7,14 @@ import {
7
7
  ImageStyle,
8
8
  } from 'react-native';
9
9
  import React, { useEffect, useState, useCallback, Fragment } from 'react';
10
- import { FileRepository, RoomRepository } from '@amityco/ts-sdk-react-native';
10
+ import { FileRepository, StreamRepository } from '@amityco/ts-sdk-react-native';
11
11
  import { useStyles } from './styles';
12
12
  import { useNavigation } from '@react-navigation/native';
13
13
  import { SvgXml } from 'react-native-svg';
14
14
  import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
15
15
  import { play } from '../../assets/icons';
16
16
  import { Typography } from '../Typography/Typography';
17
- import { RoomStatus } from '../../enum/roomStatus';
17
+ import { LivestreamStatus } from '../../enum/livestreamStatus';
18
18
  import LiveStreamEndThumbnail from './LivestreamEndedThumbnail';
19
19
  import LiveStreamIdleThumbnail from './LivestreamIdleThumbnail';
20
20
  import RenderTextWithMention from '../RenderTextWithMention/RenderTextWithMention';
@@ -22,14 +22,14 @@ import { RootStackParamList } from '../../routes/RouteParamList';
22
22
  import LiveStreamTerminatedThumbnail from './LivestreamTerminatedThumbnail';
23
23
 
24
24
  interface ILivestreamContent {
25
- roomId: Amity.Room['roomId'];
25
+ streamId: Amity.Stream['streamId'];
26
26
  onPressPost: () => void;
27
27
  post: Amity.Post;
28
28
  }
29
29
 
30
30
  const LivestreamContent: React.FC<ILivestreamContent> = ({
31
31
  post,
32
- roomId,
32
+ streamId,
33
33
  onPressPost,
34
34
  }) => {
35
35
  const { styles, theme } = useStyles();
@@ -39,18 +39,18 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
39
39
  >();
40
40
 
41
41
  const [error, setError] = useState<boolean>(false);
42
- const [livestream, setLivestream] = useState<Amity.Room>();
42
+ const [livestream, setLivestream] = useState<Amity.Stream>();
43
43
  const [thumbnailUrl, setThumbnailUrl] = useState<ImageSourcePropType>();
44
44
  const [isUpcoming, setIsUpcoming] = useState<boolean>(false);
45
45
 
46
46
  const onPlayLivestream = useCallback(() => {
47
47
  navigation.navigate('LivestreamPlayer', {
48
48
  post,
49
- roomId: livestream.roomId,
49
+ streamId: livestream.streamId,
50
50
  });
51
51
  }, [livestream, navigation, post]);
52
52
 
53
- const getLivestreamThumbnail = async (currentStream: Amity.Room) => {
53
+ const getLivestreamThumbnail = async (currentStream: Amity.Stream) => {
54
54
  const defaultThumbnail = require('../../assets/images/livestream.png');
55
55
 
56
56
  if (currentStream.thumbnailFileId) {
@@ -71,8 +71,8 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
71
71
 
72
72
  useEffect(() => {
73
73
  setIsUpcoming(true);
74
- const unsubscribe = RoomRepository.getRoom(
75
- roomId,
74
+ const unsubscribe = StreamRepository.getStreamById(
75
+ streamId,
76
76
  ({ data, loading, error: streamError }) => {
77
77
  if (streamError) setError(!!streamError);
78
78
  if (!loading && data) {
@@ -86,13 +86,13 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
86
86
  return () => {
87
87
  unsubscribe();
88
88
  };
89
- }, [roomId]);
89
+ }, [streamId]);
90
90
 
91
91
  if (!livestream) return null;
92
92
 
93
93
  if (error || livestream?.isDeleted) {
94
94
  return (
95
- <View key={livestream.roomId} style={styles.container}>
95
+ <View key={livestream.streamId} style={styles.container}>
96
96
  <LiveStreamIdleThumbnail />
97
97
  </View>
98
98
  );
@@ -102,12 +102,12 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
102
102
  livestream?.moderation?.terminateLabels &&
103
103
  livestream?.moderation?.terminateLabels?.length > 0;
104
104
  const isLiveOrEnded =
105
- livestream?.status === RoomStatus.live ||
106
- livestream?.status === RoomStatus.ended;
105
+ livestream?.status === LivestreamStatus.live ||
106
+ livestream?.status === LivestreamStatus.ended;
107
107
 
108
108
  if (isTerminated && isLiveOrEnded) {
109
109
  return (
110
- <View key={livestream.roomId} style={styles.container}>
110
+ <View key={livestream.streamId} style={styles.container}>
111
111
  <LiveStreamTerminatedThumbnail />
112
112
  </View>
113
113
  );
@@ -129,7 +129,7 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
129
129
  )}
130
130
  </Pressable>
131
131
  <View style={styles.container}>
132
- {(livestream.status === RoomStatus.idle || isUpcoming) &&
132
+ {(livestream.status === LivestreamStatus.idle || isUpcoming) &&
133
133
  thumbnailUrl && (
134
134
  <View style={styles.content}>
135
135
  <Image
@@ -144,10 +144,12 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
144
144
  </View>
145
145
  )}
146
146
 
147
- {livestream.status === RoomStatus.ended && <LiveStreamEndThumbnail />}
147
+ {livestream.status === LivestreamStatus.ended && (
148
+ <LiveStreamEndThumbnail />
149
+ )}
148
150
 
149
- {(livestream.status === RoomStatus.live ||
150
- livestream.status === RoomStatus.recorded) &&
151
+ {(livestream.status === LivestreamStatus.live ||
152
+ livestream.status === LivestreamStatus.recorded) &&
151
153
  thumbnailUrl &&
152
154
  !isUpcoming && (
153
155
  <View style={styles.content}>
@@ -155,15 +157,14 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
155
157
  source={thumbnailUrl}
156
158
  style={styles.streamImageCover as ImageStyle}
157
159
  />
158
- {(livestream.status === RoomStatus.live ||
159
- livestream.status === RoomStatus.waiting_reconnect) && (
160
+ {livestream.status === LivestreamStatus.live && (
160
161
  <View style={styles.streamStatusLive}>
161
162
  <Typography.CaptionBold style={styles.streamStatusText}>
162
163
  LIVE
163
164
  </Typography.CaptionBold>
164
165
  </View>
165
166
  )}
166
- {livestream.status === RoomStatus.recorded && (
167
+ {livestream.status === LivestreamStatus.recorded && (
167
168
  <View style={styles.streamStatusRecorded}>
168
169
  <Typography.CaptionBold style={styles.streamStatusText}>
169
170
  RECORDED