@amityco/react-native-social-uikit 4.0.0-c2327e7.0 → 4.0.0-d2b8337.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 (293) 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/components/Toast/Toast.js +2 -1
  12. package/lib/commonjs/components/Toast/Toast.js.map +1 -1
  13. package/lib/commonjs/index.js +0 -6
  14. package/lib/commonjs/index.js.map +1 -1
  15. package/lib/commonjs/providers/file-provider.js +38 -19
  16. package/lib/commonjs/providers/file-provider.js.map +1 -1
  17. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js +16 -16
  18. package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  19. package/lib/commonjs/screens/LivestreamPlayer/index.js +6 -3
  20. package/lib/commonjs/screens/LivestreamPlayer/index.js.map +1 -1
  21. package/lib/commonjs/svg/svg-xml-list.js +7 -2
  22. package/lib/commonjs/svg/svg-xml-list.js.map +1 -1
  23. package/lib/commonjs/util/postTypeChecker.js.map +1 -1
  24. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +9 -11
  25. package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  26. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +2 -3
  27. package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  28. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +25 -28
  29. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  30. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  31. package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  32. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +68 -206
  33. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  34. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +3 -71
  35. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  36. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +117 -120
  37. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  38. package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  39. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +37 -1
  40. package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  41. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +54 -21
  42. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
  43. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +24 -2
  44. package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
  45. package/lib/commonjs/v4/assets/icons/toast.js +6 -6
  46. package/lib/commonjs/v4/assets/icons/toast.js.map +1 -1
  47. package/lib/commonjs/v4/component/CommunityStories/index.js +9 -4
  48. package/lib/commonjs/v4/component/CommunityStories/index.js.map +1 -1
  49. package/lib/commonjs/v4/component/CommunityStories/styles.js +7 -2
  50. package/lib/commonjs/v4/component/CommunityStories/styles.js.map +1 -1
  51. package/lib/commonjs/v4/component/LivestreamContent/index.js +12 -12
  52. package/lib/commonjs/v4/component/LivestreamContent/index.js.map +1 -1
  53. package/lib/commonjs/v4/component/LoadingImage/index.js +22 -25
  54. package/lib/commonjs/v4/component/LoadingImage/index.js.map +1 -1
  55. package/lib/commonjs/v4/component/LoadingImage/styles.js +19 -2
  56. package/lib/commonjs/v4/component/LoadingImage/styles.js.map +1 -1
  57. package/lib/commonjs/v4/component/LoadingVideo/index.js +12 -6
  58. package/lib/commonjs/v4/component/LoadingVideo/index.js.map +1 -1
  59. package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js +11 -4
  60. package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js.map +1 -1
  61. package/lib/commonjs/v4/component/MyStories/styles.js +5 -0
  62. package/lib/commonjs/v4/component/MyStories/styles.js.map +1 -1
  63. package/lib/commonjs/v4/component/PostContent/index.js +4 -4
  64. package/lib/commonjs/v4/component/PostContent/index.js.map +1 -1
  65. package/lib/commonjs/v4/component/PostMenu/index.js +2 -2
  66. package/lib/commonjs/v4/component/PostMenu/index.js.map +1 -1
  67. package/lib/commonjs/v4/component/Toast/index.js +4 -4
  68. package/lib/commonjs/v4/component/Toast/index.js.map +1 -1
  69. package/lib/commonjs/v4/component/Toast/styles.js +2 -2
  70. package/lib/commonjs/v4/component/Toast/styles.js.map +1 -1
  71. package/lib/commonjs/v4/enum/livestreamStatus.js +13 -0
  72. package/lib/commonjs/v4/enum/livestreamStatus.js.map +1 -0
  73. package/lib/commonjs/v4/hook/index.js +0 -22
  74. package/lib/commonjs/v4/hook/index.js.map +1 -1
  75. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +3 -1
  76. package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  77. package/lib/commonjs/v4/index.js +0 -7
  78. package/lib/commonjs/v4/index.js.map +1 -1
  79. package/lib/commonjs/v4/stores/slices/toast.js +1 -4
  80. package/lib/commonjs/v4/stores/slices/toast.js.map +1 -1
  81. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
  82. package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
  83. package/lib/module/components/MediaSection/index.js +3 -3
  84. package/lib/module/components/MediaSection/index.js.map +1 -1
  85. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js +8 -15
  86. package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
  87. package/lib/module/components/PostTypeChoiceModal/style.js +2 -1
  88. package/lib/module/components/PostTypeChoiceModal/style.js.map +1 -1
  89. package/lib/module/components/Social/PostList/index.js +3 -1
  90. package/lib/module/components/Social/PostList/index.js.map +1 -1
  91. package/lib/module/components/Toast/Toast.js +2 -1
  92. package/lib/module/components/Toast/Toast.js.map +1 -1
  93. package/lib/module/index.js +6 -2
  94. package/lib/module/index.js.map +1 -1
  95. package/lib/module/providers/file-provider.js +38 -19
  96. package/lib/module/providers/file-provider.js.map +1 -1
  97. package/lib/module/screens/CreateLivestream/CreateLivestream.js +17 -17
  98. package/lib/module/screens/CreateLivestream/CreateLivestream.js.map +1 -1
  99. package/lib/module/screens/LivestreamPlayer/index.js +8 -4
  100. package/lib/module/screens/LivestreamPlayer/index.js.map +1 -1
  101. package/lib/module/svg/svg-xml-list.js +5 -1
  102. package/lib/module/svg/svg-xml-list.js.map +1 -1
  103. package/lib/module/util/postTypeChecker.js.map +1 -1
  104. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +9 -11
  105. package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
  106. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +2 -3
  107. package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
  108. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +26 -29
  109. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
  110. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
  111. package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
  112. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +72 -211
  113. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
  114. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +3 -71
  115. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
  116. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +120 -123
  117. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
  118. package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
  119. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +37 -1
  120. package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
  121. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +54 -21
  122. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
  123. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +24 -2
  124. package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
  125. package/lib/module/v4/assets/icons/toast.js +6 -6
  126. package/lib/module/v4/assets/icons/toast.js.map +1 -1
  127. package/lib/module/v4/component/CommunityStories/index.js +10 -5
  128. package/lib/module/v4/component/CommunityStories/index.js.map +1 -1
  129. package/lib/module/v4/component/CommunityStories/styles.js +7 -2
  130. package/lib/module/v4/component/CommunityStories/styles.js.map +1 -1
  131. package/lib/module/v4/component/LivestreamContent/index.js +13 -13
  132. package/lib/module/v4/component/LivestreamContent/index.js.map +1 -1
  133. package/lib/module/v4/component/LoadingImage/index.js +22 -24
  134. package/lib/module/v4/component/LoadingImage/index.js.map +1 -1
  135. package/lib/module/v4/component/LoadingImage/styles.js +19 -2
  136. package/lib/module/v4/component/LoadingImage/styles.js.map +1 -1
  137. package/lib/module/v4/component/LoadingVideo/index.js +12 -6
  138. package/lib/module/v4/component/LoadingVideo/index.js.map +1 -1
  139. package/lib/module/v4/component/MyStories/StoryCircleItem.js +13 -6
  140. package/lib/module/v4/component/MyStories/StoryCircleItem.js.map +1 -1
  141. package/lib/module/v4/component/MyStories/styles.js +5 -0
  142. package/lib/module/v4/component/MyStories/styles.js.map +1 -1
  143. package/lib/module/v4/component/PostContent/index.js +4 -4
  144. package/lib/module/v4/component/PostContent/index.js.map +1 -1
  145. package/lib/module/v4/component/PostMenu/index.js +2 -2
  146. package/lib/module/v4/component/PostMenu/index.js.map +1 -1
  147. package/lib/module/v4/component/Toast/index.js +4 -4
  148. package/lib/module/v4/component/Toast/index.js.map +1 -1
  149. package/lib/module/v4/component/Toast/styles.js +2 -2
  150. package/lib/module/v4/component/Toast/styles.js.map +1 -1
  151. package/lib/module/v4/enum/livestreamStatus.js +7 -0
  152. package/lib/module/v4/enum/livestreamStatus.js.map +1 -0
  153. package/lib/module/v4/hook/index.js +0 -2
  154. package/lib/module/v4/hook/index.js.map +1 -1
  155. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +3 -1
  156. package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
  157. package/lib/module/v4/index.js +1 -1
  158. package/lib/module/v4/index.js.map +1 -1
  159. package/lib/module/v4/stores/slices/toast.js +1 -4
  160. package/lib/module/v4/stores/slices/toast.js.map +1 -1
  161. package/lib/typescript/src/components/MediaSection/index.d.ts.map +1 -1
  162. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts +2 -1
  163. package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts.map +1 -1
  164. package/lib/typescript/src/components/Social/PostList/index.d.ts +3 -1
  165. package/lib/typescript/src/components/Social/PostList/index.d.ts.map +1 -1
  166. package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -1
  167. package/lib/typescript/src/index.d.ts +2 -2
  168. package/lib/typescript/src/index.d.ts.map +1 -1
  169. package/lib/typescript/src/providers/file-provider.d.ts.map +1 -1
  170. package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
  171. package/lib/typescript/src/svg/svg-xml-list.d.ts +1 -0
  172. package/lib/typescript/src/svg/svg-xml-list.d.ts.map +1 -1
  173. package/lib/typescript/src/util/postTypeChecker.d.ts +1 -1
  174. package/lib/typescript/src/util/postTypeChecker.d.ts.map +1 -1
  175. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts +3 -1
  176. package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
  177. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts +0 -1
  178. package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts.map +1 -1
  179. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.d.ts.map +1 -1
  180. package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.d.ts +1 -1
  181. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.d.ts.map +1 -1
  182. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts +2 -70
  183. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts.map +1 -1
  184. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.d.ts.map +1 -1
  185. package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts.map +1 -1
  186. package/lib/typescript/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.d.ts.map +1 -1
  187. package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.d.ts.map +1 -1
  188. package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts +22 -0
  189. package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts.map +1 -1
  190. package/lib/typescript/src/v4/assets/icons/toast.d.ts +3 -3
  191. package/lib/typescript/src/v4/assets/icons/toast.d.ts.map +1 -1
  192. package/lib/typescript/src/v4/component/CommunityStories/index.d.ts.map +1 -1
  193. package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts +5 -0
  194. package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts.map +1 -1
  195. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts +1 -1
  196. package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts.map +1 -1
  197. package/lib/typescript/src/v4/component/LoadingImage/index.d.ts +2 -1
  198. package/lib/typescript/src/v4/component/LoadingImage/index.d.ts.map +1 -1
  199. package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts +21 -0
  200. package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts.map +1 -1
  201. package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts +2 -1
  202. package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts.map +1 -1
  203. package/lib/typescript/src/v4/component/MyStories/StoryCircleItem.d.ts.map +1 -1
  204. package/lib/typescript/src/v4/component/MyStories/styles.d.ts +5 -0
  205. package/lib/typescript/src/v4/component/MyStories/styles.d.ts.map +1 -1
  206. package/lib/typescript/src/v4/component/PostContent/index.d.ts.map +1 -1
  207. package/lib/typescript/src/v4/component/Toast/styles.d.ts +1 -1
  208. package/lib/typescript/src/v4/component/Toast/styles.d.ts.map +1 -1
  209. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts +7 -0
  210. package/lib/typescript/src/v4/enum/livestreamStatus.d.ts.map +1 -0
  211. package/lib/typescript/src/v4/hook/index.d.ts +0 -2
  212. package/lib/typescript/src/v4/hook/index.d.ts.map +1 -1
  213. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +0 -3
  214. package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
  215. package/lib/typescript/src/v4/index.d.ts +0 -1
  216. package/lib/typescript/src/v4/index.d.ts.map +1 -1
  217. package/lib/typescript/src/v4/routes/RouteParamList.d.ts +1 -1
  218. package/lib/typescript/src/v4/routes/RouteParamList.d.ts.map +1 -1
  219. package/lib/typescript/src/v4/stores/slices/toast.d.ts +0 -1
  220. package/lib/typescript/src/v4/stores/slices/toast.d.ts.map +1 -1
  221. package/package.json +3 -6
  222. package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
  223. package/src/components/MediaSection/index.tsx +6 -4
  224. package/src/components/PostTypeChoiceModal/PostTypeChoiceModal.tsx +15 -15
  225. package/src/components/PostTypeChoiceModal/style.ts +2 -1
  226. package/src/components/Social/PostList/index.tsx +4 -1
  227. package/src/components/Toast/Toast.tsx +1 -0
  228. package/src/index.tsx +2 -2
  229. package/src/providers/file-provider.tsx +42 -20
  230. package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
  231. package/src/screens/LivestreamPlayer/index.tsx +15 -9
  232. package/src/svg/svg-xml-list.ts +7 -1
  233. package/src/util/postTypeChecker.ts +1 -1
  234. package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +10 -10
  235. package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +1 -1
  236. package/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.ts +2 -3
  237. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +25 -24
  238. package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
  239. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +89 -241
  240. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.ts +3 -72
  241. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.tsx +148 -135
  242. package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +0 -1
  243. package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +46 -0
  244. package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +122 -57
  245. package/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.ts +23 -1
  246. package/src/v4/assets/icons/toast.tsx +12 -9
  247. package/src/v4/component/CommunityStories/index.tsx +26 -17
  248. package/src/v4/component/CommunityStories/styles.ts +7 -2
  249. package/src/v4/component/LivestreamContent/index.tsx +22 -21
  250. package/src/v4/component/LoadingImage/index.tsx +28 -25
  251. package/src/v4/component/LoadingImage/styles.ts +17 -0
  252. package/src/v4/component/LoadingVideo/index.tsx +13 -7
  253. package/src/v4/component/MyStories/StoryCircleItem.tsx +19 -12
  254. package/src/v4/component/MyStories/styles.ts +5 -0
  255. package/src/v4/component/PostContent/index.tsx +8 -6
  256. package/src/v4/component/PostMenu/index.tsx +2 -2
  257. package/src/v4/component/Toast/index.tsx +1 -1
  258. package/src/v4/component/Toast/styles.ts +2 -2
  259. package/src/v4/enum/livestreamStatus.ts +6 -0
  260. package/src/v4/hook/index.ts +0 -2
  261. package/src/v4/hook/useCustomRankingGlobalFeed.ts +1 -1
  262. package/src/v4/index.tsx +1 -1
  263. package/src/v4/routes/RouteParamList.tsx +1 -1
  264. package/src/v4/stores/slices/toast.ts +0 -5
  265. package/uikit.config.json +1 -1
  266. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +0 -50
  267. package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +0 -1
  268. package/lib/commonjs/v4/enum/roomStatus.js +0 -14
  269. package/lib/commonjs/v4/enum/roomStatus.js.map +0 -1
  270. package/lib/commonjs/v4/hook/usePostSubscription.js +0 -38
  271. package/lib/commonjs/v4/hook/usePostSubscription.js.map +0 -1
  272. package/lib/commonjs/v4/hook/useRoomSubscription.js +0 -22
  273. package/lib/commonjs/v4/hook/useRoomSubscription.js.map +0 -1
  274. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +0 -42
  275. package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +0 -1
  276. package/lib/module/v4/enum/roomStatus.js +0 -8
  277. package/lib/module/v4/enum/roomStatus.js.map +0 -1
  278. package/lib/module/v4/hook/usePostSubscription.js +0 -31
  279. package/lib/module/v4/hook/usePostSubscription.js.map +0 -1
  280. package/lib/module/v4/hook/useRoomSubscription.js +0 -15
  281. package/lib/module/v4/hook/useRoomSubscription.js.map +0 -1
  282. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts +0 -8
  283. package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts.map +0 -1
  284. package/lib/typescript/src/v4/enum/roomStatus.d.ts +0 -8
  285. package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +0 -1
  286. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts +0 -4
  287. package/lib/typescript/src/v4/hook/usePostSubscription.d.ts.map +0 -1
  288. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts +0 -4
  289. package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts.map +0 -1
  290. package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx +0 -48
  291. package/src/v4/enum/roomStatus.ts +0 -7
  292. package/src/v4/hook/usePostSubscription.ts +0 -34
  293. package/src/v4/hook/useRoomSubscription.ts +0 -19
@@ -1,75 +1,131 @@
1
- import React, { useEffect, useState, useRef } from 'react';
2
- import { View, TouchableOpacity } 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 { RoomRepository } from '@amityco/ts-sdk-react-native';
7
- 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';
8
21
  import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
9
22
  import { NativeStackNavigationProp } from '@react-navigation/native-stack';
10
23
  import { RootStackParamList } from '../../../routes/RouteParamList';
11
- import { RoomStatus } from '../../../enum/roomStatus';
24
+ import { LivestreamStatus } from '../../../enum/livestreamStatus';
12
25
  import LiveStreamIdleThumbnail from '../../../component/LivestreamContent/LivestreamIdleThumbnail';
13
26
  import { Typography } from '../../../component/Typography/Typography';
14
27
  import { SafeAreaView } from 'react-native-safe-area-context';
15
28
  import NetInfo from '@react-native-community/netinfo';
16
29
  import { CircularProgressIndicator } from '../../../component/CircularProgressIndicator';
17
- import Video from 'react-native-video';
18
- import useAuth from '../../../../hooks/useAuth';
19
- import {
20
- usePostSubscription,
21
- useRoomSubscription,
22
- } from '../../../../v4/hook/index';
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 [error, setError] = useState<Error | null>(null);
33
- const [wasLive, setWasLive] = useState(false);
34
- const [showEndThumbnail, setShowEndThumbnail] = useState(false);
35
- const { roomId, post } = route.params;
36
- const { client } = useAuth();
37
- const videoRef = useRef<any>(null);
38
- const isProgrammaticDismiss = useRef(false);
69
+ const [livestream, setLivestream] = useState<Amity.Stream>();
70
+
71
+ const { streamId, post } = route.params;
39
72
 
40
73
  const { subscribedPost } = usePostSubscription(post?.postId);
41
74
 
42
- useRoomSubscription({ room });
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
+ };
43
98
 
44
99
  useEffect(() => {
45
- const unsubscribe = RoomRepository.getRoom(
46
- roomId,
100
+ const unsubscribe = StreamRepository.getStreamById(
101
+ streamId,
47
102
  ({ data, loading, error: streamError }) => {
48
103
  if (streamError) setError(streamError);
49
- if (!loading && data) setRoom({ ...data });
104
+ if (!loading && data) setLivestream({ ...data });
50
105
  }
51
106
  );
52
107
 
53
108
  return () => unsubscribe();
54
- }, [roomId]);
109
+ }, [streamId]);
55
110
 
56
111
  useEffect(() => {
57
- if (room?.isDeleted || subscribedPost?.isDeleted) {
112
+ if (livestream?.isDeleted || subscribedPost?.isDeleted) {
58
113
  navigation.replace('PostDetail', { postId: subscribedPost?.postId });
59
114
  }
60
- }, [room?.isDeleted, subscribedPost, navigation]);
115
+ }, [livestream?.isDeleted, subscribedPost, navigation]);
61
116
 
62
117
  useEffect(() => {
63
118
  const isTerminated =
64
- room?.moderation?.terminateLabels &&
65
- room?.moderation?.terminateLabels?.length > 0;
119
+ livestream?.moderation?.terminateLabels &&
120
+ livestream?.moderation?.terminateLabels?.length > 0;
66
121
  const isLiveOrEnded =
67
- room?.status === RoomStatus.live || room?.status === RoomStatus.ended;
122
+ livestream?.status === LivestreamStatus.live ||
123
+ livestream?.status === LivestreamStatus.ended;
68
124
 
69
125
  if (isLiveOrEnded && isTerminated) {
70
126
  navigation.replace('LivestreamTerminated', { type: 'viewer' });
71
127
  }
72
- }, [room?.moderation?.terminateLabels, room?.status, navigation]);
128
+ }, [livestream?.moderation?.terminateLabels, livestream?.status, navigation]);
73
129
 
74
130
  useEffect(() => {
75
131
  const unsubscribe = NetInfo.addEventListener((state) => {
@@ -78,77 +134,24 @@ function AmityLiveStreamPlayerPage() {
78
134
  return () => unsubscribe();
79
135
  }, []);
80
136
 
81
- // Track if user was watching live
82
- useEffect(() => {
83
- if (room?.status === RoomStatus.live) {
84
- setWasLive(true);
85
- }
86
- }, [room?.status]);
87
-
88
- // Dismiss fullscreen player when stream ends
89
- useEffect(() => {
90
- const shouldShowEndThumbnail =
91
- room?.status === RoomStatus.ended ||
92
- (room?.status === RoomStatus.recorded && wasLive);
93
-
94
- console.log('shouldShowEndThumbnail =>', shouldShowEndThumbnail);
95
- console.log('videoRef.current', videoRef.current);
96
-
97
- if (shouldShowEndThumbnail && videoRef.current) {
98
- console.log('Dismissing fullscreen player');
99
- isProgrammaticDismiss.current = true;
100
- videoRef.current?.dismissFullscreenPlayer();
101
- // Delay showing end thumbnail to allow fullscreen dismiss to complete
102
- setTimeout(() => {
103
- setShowEndThumbnail(true);
104
- }, 300);
105
- } else if (shouldShowEndThumbnail && !videoRef.current) {
106
- // If video ref is already null, show end thumbnail immediately
107
- setShowEndThumbnail(true);
108
- } else if (!shouldShowEndThumbnail) {
109
- setShowEndThumbnail(false);
110
- }
111
- }, [room?.status, wasLive]);
112
-
113
- // Start in fullscreen mode on iOS
114
- useEffect(() => {
115
- if (videoRef.current && room && room.status !== RoomStatus.ended) {
116
- const timer = setTimeout(() => {
117
- videoRef.current?.presentFullscreenPlayer();
118
- }, 100);
119
- return () => clearTimeout(timer);
120
- }
121
- return undefined;
122
- }, [room]);
123
-
124
- if (!room || error) {
137
+ if (!livestream || error)
125
138
  return (
126
139
  <SafeAreaView style={styles.container}>
127
140
  <LiveStreamIdleThumbnail />
128
141
  </SafeAreaView>
129
142
  );
130
- }
131
-
132
- const closePlayer = () => {
133
- navigation.goBack();
134
- };
135
-
136
- const handleFullscreenDismiss = () => {
137
- // Only navigate back if user manually dismissed, not programmatically
138
- if (!isProgrammaticDismiss.current) {
139
- closePlayer();
140
- }
141
- isProgrammaticDismiss.current = false;
142
- };
143
143
 
144
144
  return (
145
145
  <SafeAreaView style={styles.container}>
146
- {showEndThumbnail ? (
146
+ {livestream.status === LivestreamStatus.ended ? (
147
147
  <>
148
148
  <View style={styles.steamEndContainer}>
149
149
  <LiveStreamEndThumbnail />
150
150
  </View>
151
- <TouchableOpacity style={styles.closeButton} onPress={closePlayer}>
151
+ <TouchableOpacity
152
+ style={styles.closeButton}
153
+ onPress={navigation.goBack}
154
+ >
152
155
  <SvgXml
153
156
  xml={close()}
154
157
  width="28"
@@ -157,52 +160,14 @@ function AmityLiveStreamPlayerPage() {
157
160
  />
158
161
  </TouchableOpacity>
159
162
  </>
160
- ) : (
161
- <View style={styles.container}>
162
- {(room.status === RoomStatus.live ||
163
- room.status === RoomStatus.waiting_reconnect) && (
164
- <View style={styles.indicator}>
165
- <View style={styles.status}>
166
- <Typography.CaptionBold style={styles.live}>
167
- LIVE
168
- </Typography.CaptionBold>
169
- </View>
170
- </View>
171
- )}
172
- <Video
173
- ref={videoRef}
174
- source={{
175
- uri:
176
- room.status === RoomStatus.recorded
177
- ? room.recordedPlaybackInfos[0]?.url
178
- : room.livePlaybackUrl,
179
- headers: {
180
- Authorization: `Bearer ${client.token.accessToken}`,
181
- },
182
-
183
- type: 'm3u8',
184
- }}
185
- style={styles.container}
186
- resizeMode="contain"
187
- controls={room.status === RoomStatus.recorded}
188
- fullscreen={true}
189
- fullscreenOrientation="landscape"
190
- paused={false}
191
- muted={false}
192
- volume={1.0}
193
- audioOutput="speaker"
194
- playInBackground={false}
195
- playWhenInactive={false}
196
- onError={(e) => {
197
- console.log('Video Player Error: ', e);
198
- }}
199
- onFullscreenPlayerDidDismiss={handleFullscreenDismiss}
200
- />
201
- </View>
202
- )}
203
-
204
- {((room.status === RoomStatus.live && reconnecting) ||
205
- 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 && (
206
171
  <View style={styles.connecting}>
207
172
  <CircularProgressIndicator size={40} strokeWidth={2} />
208
173
  <Typography.TitleBold style={styles.text}>
@@ -214,6 +179,54 @@ function AmityLiveStreamPlayerPage() {
214
179
  </Typography.Caption>
215
180
  </View>
216
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
+ )}
217
230
  </SafeAreaView>
218
231
  );
219
232
  }
@@ -13,7 +13,6 @@ 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',
@@ -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}