@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.
- package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
- package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
- package/lib/commonjs/components/MediaSection/index.js +3 -3
- package/lib/commonjs/components/MediaSection/index.js.map +1 -1
- package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js +5 -14
- package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
- package/lib/commonjs/components/PostTypeChoiceModal/style.js +2 -1
- package/lib/commonjs/components/PostTypeChoiceModal/style.js.map +1 -1
- package/lib/commonjs/components/Social/PostList/index.js +3 -1
- package/lib/commonjs/components/Social/PostList/index.js.map +1 -1
- package/lib/commonjs/components/Toast/Toast.js +2 -1
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/index.js +0 -6
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/file-provider.js +38 -19
- package/lib/commonjs/providers/file-provider.js.map +1 -1
- package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js +16 -16
- package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js.map +1 -1
- package/lib/commonjs/screens/LivestreamPlayer/index.js +6 -3
- package/lib/commonjs/screens/LivestreamPlayer/index.js.map +1 -1
- package/lib/commonjs/svg/svg-xml-list.js +7 -2
- package/lib/commonjs/svg/svg-xml-list.js.map +1 -1
- package/lib/commonjs/util/postTypeChecker.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +9 -11
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +2 -3
- package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +25 -28
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +68 -206
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +3 -71
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +117 -120
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +37 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +54 -21
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +24 -2
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
- package/lib/commonjs/v4/assets/icons/toast.js +6 -6
- package/lib/commonjs/v4/assets/icons/toast.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityStories/index.js +9 -4
- package/lib/commonjs/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityStories/styles.js +7 -2
- package/lib/commonjs/v4/component/CommunityStories/styles.js.map +1 -1
- package/lib/commonjs/v4/component/LivestreamContent/index.js +12 -12
- package/lib/commonjs/v4/component/LivestreamContent/index.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingImage/index.js +22 -25
- package/lib/commonjs/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingImage/styles.js +19 -2
- package/lib/commonjs/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingVideo/index.js +12 -6
- package/lib/commonjs/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js +11 -4
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/styles.js +5 -0
- package/lib/commonjs/v4/component/MyStories/styles.js.map +1 -1
- package/lib/commonjs/v4/component/PostContent/index.js +4 -4
- package/lib/commonjs/v4/component/PostContent/index.js.map +1 -1
- package/lib/commonjs/v4/component/PostMenu/index.js +2 -2
- package/lib/commonjs/v4/component/PostMenu/index.js.map +1 -1
- package/lib/commonjs/v4/component/Toast/index.js +4 -4
- package/lib/commonjs/v4/component/Toast/index.js.map +1 -1
- package/lib/commonjs/v4/component/Toast/styles.js +2 -2
- package/lib/commonjs/v4/component/Toast/styles.js.map +1 -1
- package/lib/commonjs/v4/enum/livestreamStatus.js +13 -0
- package/lib/commonjs/v4/enum/livestreamStatus.js.map +1 -0
- package/lib/commonjs/v4/hook/index.js +0 -22
- package/lib/commonjs/v4/hook/index.js.map +1 -1
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +3 -1
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/commonjs/v4/index.js +0 -7
- package/lib/commonjs/v4/index.js.map +1 -1
- package/lib/commonjs/v4/stores/slices/toast.js +1 -4
- package/lib/commonjs/v4/stores/slices/toast.js.map +1 -1
- package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
- package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
- package/lib/module/components/MediaSection/index.js +3 -3
- package/lib/module/components/MediaSection/index.js.map +1 -1
- package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js +8 -15
- package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
- package/lib/module/components/PostTypeChoiceModal/style.js +2 -1
- package/lib/module/components/PostTypeChoiceModal/style.js.map +1 -1
- package/lib/module/components/Social/PostList/index.js +3 -1
- package/lib/module/components/Social/PostList/index.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +2 -1
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/index.js +6 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/file-provider.js +38 -19
- package/lib/module/providers/file-provider.js.map +1 -1
- package/lib/module/screens/CreateLivestream/CreateLivestream.js +17 -17
- package/lib/module/screens/CreateLivestream/CreateLivestream.js.map +1 -1
- package/lib/module/screens/LivestreamPlayer/index.js +8 -4
- package/lib/module/screens/LivestreamPlayer/index.js.map +1 -1
- package/lib/module/svg/svg-xml-list.js +5 -1
- package/lib/module/svg/svg-xml-list.js.map +1 -1
- package/lib/module/util/postTypeChecker.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +9 -11
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +2 -3
- package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +26 -29
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +72 -211
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +3 -71
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +120 -123
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +37 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +54 -21
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +24 -2
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
- package/lib/module/v4/assets/icons/toast.js +6 -6
- package/lib/module/v4/assets/icons/toast.js.map +1 -1
- package/lib/module/v4/component/CommunityStories/index.js +10 -5
- package/lib/module/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/module/v4/component/CommunityStories/styles.js +7 -2
- package/lib/module/v4/component/CommunityStories/styles.js.map +1 -1
- package/lib/module/v4/component/LivestreamContent/index.js +13 -13
- package/lib/module/v4/component/LivestreamContent/index.js.map +1 -1
- package/lib/module/v4/component/LoadingImage/index.js +22 -24
- package/lib/module/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/module/v4/component/LoadingImage/styles.js +19 -2
- package/lib/module/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/module/v4/component/LoadingVideo/index.js +12 -6
- package/lib/module/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/module/v4/component/MyStories/StoryCircleItem.js +13 -6
- package/lib/module/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/module/v4/component/MyStories/styles.js +5 -0
- package/lib/module/v4/component/MyStories/styles.js.map +1 -1
- package/lib/module/v4/component/PostContent/index.js +4 -4
- package/lib/module/v4/component/PostContent/index.js.map +1 -1
- package/lib/module/v4/component/PostMenu/index.js +2 -2
- package/lib/module/v4/component/PostMenu/index.js.map +1 -1
- package/lib/module/v4/component/Toast/index.js +4 -4
- package/lib/module/v4/component/Toast/index.js.map +1 -1
- package/lib/module/v4/component/Toast/styles.js +2 -2
- package/lib/module/v4/component/Toast/styles.js.map +1 -1
- package/lib/module/v4/enum/livestreamStatus.js +7 -0
- package/lib/module/v4/enum/livestreamStatus.js.map +1 -0
- package/lib/module/v4/hook/index.js +0 -2
- package/lib/module/v4/hook/index.js.map +1 -1
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +3 -1
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/module/v4/index.js +1 -1
- package/lib/module/v4/index.js.map +1 -1
- package/lib/module/v4/stores/slices/toast.js +1 -4
- package/lib/module/v4/stores/slices/toast.js.map +1 -1
- package/lib/typescript/src/components/MediaSection/index.d.ts.map +1 -1
- package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts +2 -1
- package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts.map +1 -1
- package/lib/typescript/src/components/Social/PostList/index.d.ts +3 -1
- package/lib/typescript/src/components/Social/PostList/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/file-provider.d.ts.map +1 -1
- package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
- package/lib/typescript/src/svg/svg-xml-list.d.ts +1 -0
- package/lib/typescript/src/svg/svg-xml-list.d.ts.map +1 -1
- package/lib/typescript/src/util/postTypeChecker.d.ts +1 -1
- package/lib/typescript/src/util/postTypeChecker.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts +3 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts +0 -1
- package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts +2 -70
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts +22 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/assets/icons/toast.d.ts +3 -3
- package/lib/typescript/src/v4/assets/icons/toast.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/CommunityStories/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts +5 -0
- package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts +1 -1
- package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingImage/index.d.ts +2 -1
- package/lib/typescript/src/v4/component/LoadingImage/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts +21 -0
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts +2 -1
- package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyStories/StoryCircleItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts +5 -0
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/PostContent/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Toast/styles.d.ts +1 -1
- package/lib/typescript/src/v4/component/Toast/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/enum/livestreamStatus.d.ts +7 -0
- package/lib/typescript/src/v4/enum/livestreamStatus.d.ts.map +1 -0
- package/lib/typescript/src/v4/hook/index.d.ts +0 -2
- package/lib/typescript/src/v4/hook/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +0 -3
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
- package/lib/typescript/src/v4/index.d.ts +0 -1
- package/lib/typescript/src/v4/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/routes/RouteParamList.d.ts +1 -1
- package/lib/typescript/src/v4/routes/RouteParamList.d.ts.map +1 -1
- package/lib/typescript/src/v4/stores/slices/toast.d.ts +0 -1
- package/lib/typescript/src/v4/stores/slices/toast.d.ts.map +1 -1
- package/package.json +3 -6
- package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
- package/src/components/MediaSection/index.tsx +6 -4
- package/src/components/PostTypeChoiceModal/PostTypeChoiceModal.tsx +15 -15
- package/src/components/PostTypeChoiceModal/style.ts +2 -1
- package/src/components/Social/PostList/index.tsx +4 -1
- package/src/components/Toast/Toast.tsx +1 -0
- package/src/index.tsx +2 -2
- package/src/providers/file-provider.tsx +42 -20
- package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
- package/src/screens/LivestreamPlayer/index.tsx +15 -9
- package/src/svg/svg-xml-list.ts +7 -1
- package/src/util/postTypeChecker.ts +1 -1
- package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +10 -10
- package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +1 -1
- package/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.ts +2 -3
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +25 -24
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +89 -241
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.ts +3 -72
- package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.tsx +148 -135
- package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +0 -1
- package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +46 -0
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +122 -57
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.ts +23 -1
- package/src/v4/assets/icons/toast.tsx +12 -9
- package/src/v4/component/CommunityStories/index.tsx +26 -17
- package/src/v4/component/CommunityStories/styles.ts +7 -2
- package/src/v4/component/LivestreamContent/index.tsx +22 -21
- package/src/v4/component/LoadingImage/index.tsx +28 -25
- package/src/v4/component/LoadingImage/styles.ts +17 -0
- package/src/v4/component/LoadingVideo/index.tsx +13 -7
- package/src/v4/component/MyStories/StoryCircleItem.tsx +19 -12
- package/src/v4/component/MyStories/styles.ts +5 -0
- package/src/v4/component/PostContent/index.tsx +8 -6
- package/src/v4/component/PostMenu/index.tsx +2 -2
- package/src/v4/component/Toast/index.tsx +1 -1
- package/src/v4/component/Toast/styles.ts +2 -2
- package/src/v4/enum/livestreamStatus.ts +6 -0
- package/src/v4/hook/index.ts +0 -2
- package/src/v4/hook/useCustomRankingGlobalFeed.ts +1 -1
- package/src/v4/index.tsx +1 -1
- package/src/v4/routes/RouteParamList.tsx +1 -1
- package/src/v4/stores/slices/toast.ts +0 -5
- package/uikit.config.json +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +0 -50
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +0 -1
- package/lib/commonjs/v4/enum/roomStatus.js +0 -14
- package/lib/commonjs/v4/enum/roomStatus.js.map +0 -1
- package/lib/commonjs/v4/hook/usePostSubscription.js +0 -38
- package/lib/commonjs/v4/hook/usePostSubscription.js.map +0 -1
- package/lib/commonjs/v4/hook/useRoomSubscription.js +0 -22
- package/lib/commonjs/v4/hook/useRoomSubscription.js.map +0 -1
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +0 -42
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +0 -1
- package/lib/module/v4/enum/roomStatus.js +0 -8
- package/lib/module/v4/enum/roomStatus.js.map +0 -1
- package/lib/module/v4/hook/usePostSubscription.js +0 -31
- package/lib/module/v4/hook/usePostSubscription.js.map +0 -1
- package/lib/module/v4/hook/useRoomSubscription.js +0 -15
- package/lib/module/v4/hook/useRoomSubscription.js.map +0 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts +0 -8
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts.map +0 -1
- package/lib/typescript/src/v4/enum/roomStatus.d.ts +0 -8
- package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +0 -1
- package/lib/typescript/src/v4/hook/usePostSubscription.d.ts +0 -4
- package/lib/typescript/src/v4/hook/usePostSubscription.d.ts.map +0 -1
- package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts +0 -4
- package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts.map +0 -1
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx +0 -48
- package/src/v4/enum/roomStatus.ts +0 -7
- package/src/v4/hook/usePostSubscription.ts +0 -34
- package/src/v4/hook/useRoomSubscription.ts +0 -19
|
@@ -18,12 +18,28 @@ export const useStyles = () => {
|
|
|
18
18
|
height: '100%',
|
|
19
19
|
resizeMode: 'cover',
|
|
20
20
|
borderRadius: 5,
|
|
21
|
+
position: 'relative',
|
|
21
22
|
},
|
|
22
23
|
overlay: {
|
|
23
24
|
...StyleSheet.absoluteFillObject,
|
|
24
25
|
justifyContent: 'center',
|
|
25
26
|
alignItems: 'center',
|
|
26
27
|
},
|
|
28
|
+
failedOverlay: {
|
|
29
|
+
...StyleSheet.absoluteFillObject,
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
33
|
+
borderRadius: 5,
|
|
34
|
+
},
|
|
35
|
+
errorOverlay: {
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
top: '50%',
|
|
38
|
+
left: 0,
|
|
39
|
+
right: 0,
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
},
|
|
27
43
|
progressBar: {
|
|
28
44
|
marginVertical: 10,
|
|
29
45
|
},
|
|
@@ -40,6 +56,7 @@ export const useStyles = () => {
|
|
|
40
56
|
padding: 7,
|
|
41
57
|
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
42
58
|
borderRadius: 72,
|
|
59
|
+
zIndex: 10,
|
|
43
60
|
},
|
|
44
61
|
});
|
|
45
62
|
};
|
|
@@ -18,8 +18,6 @@ import { useStyles } from './styles';
|
|
|
18
18
|
import Video from 'react-native-video';
|
|
19
19
|
import { useNavigation } from '@react-navigation/native';
|
|
20
20
|
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
|
21
|
-
import { useTheme } from 'react-native-paper';
|
|
22
|
-
import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
|
|
23
21
|
import uiSlice from '../../../redux/slices/uiSlice';
|
|
24
22
|
import { createVideoThumbnail } from 'react-native-compressor';
|
|
25
23
|
import { useUIKitDispatch } from '../../../redux/store';
|
|
@@ -35,6 +33,7 @@ interface OverlayImageProps {
|
|
|
35
33
|
originalPath: string,
|
|
36
34
|
thumbNail: string
|
|
37
35
|
) => void;
|
|
36
|
+
onUploadError?: (hasError: boolean, source: string) => void;
|
|
38
37
|
index?: number;
|
|
39
38
|
isUploaded: boolean;
|
|
40
39
|
fileId?: string;
|
|
@@ -50,6 +49,7 @@ const LoadingVideo = ({
|
|
|
50
49
|
onClose,
|
|
51
50
|
index,
|
|
52
51
|
onLoadFinish,
|
|
52
|
+
onUploadError,
|
|
53
53
|
isUploaded = false,
|
|
54
54
|
thumbNail,
|
|
55
55
|
onPlay,
|
|
@@ -59,7 +59,6 @@ const LoadingVideo = ({
|
|
|
59
59
|
postId,
|
|
60
60
|
setIsUploading,
|
|
61
61
|
}: OverlayImageProps) => {
|
|
62
|
-
const theme = useTheme() as MyMD3Theme;
|
|
63
62
|
const dispatch = useUIKitDispatch();
|
|
64
63
|
const { showToastMessage } = uiSlice.actions;
|
|
65
64
|
const [loading, setLoading] = useState(true);
|
|
@@ -129,23 +128,30 @@ const LoadingVideo = ({
|
|
|
129
128
|
} else {
|
|
130
129
|
handleLoadEnd();
|
|
131
130
|
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
131
|
+
setIsProcess(false);
|
|
132
132
|
setIsUploadError(true);
|
|
133
|
+
onUploadError?.(true, source);
|
|
133
134
|
}
|
|
134
135
|
} catch (error) {
|
|
135
136
|
handleLoadEnd();
|
|
136
137
|
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
138
|
+
setIsProcess(false);
|
|
137
139
|
setIsUploadError(true);
|
|
140
|
+
onUploadError?.(true, source);
|
|
138
141
|
}
|
|
139
142
|
}, [source]);
|
|
140
143
|
|
|
141
144
|
const handleDelete = async () => {
|
|
142
|
-
if (!
|
|
143
|
-
if (!isEditMode) {
|
|
145
|
+
if (fileId && !isEditMode) {
|
|
144
146
|
await deleteAmityFile(fileId);
|
|
145
147
|
}
|
|
146
148
|
onClose && onClose(source, fileId, postId);
|
|
147
149
|
};
|
|
148
150
|
useEffect(() => {
|
|
151
|
+
setIsUploadError(false);
|
|
152
|
+
onUploadError?.(false, source);
|
|
153
|
+
setProgress(0);
|
|
154
|
+
setIsProcess(false);
|
|
149
155
|
if (isUploaded) {
|
|
150
156
|
setLoading(false);
|
|
151
157
|
} else {
|
|
@@ -216,10 +222,10 @@ const LoadingVideo = ({
|
|
|
216
222
|
) : (
|
|
217
223
|
<TouchableOpacity
|
|
218
224
|
style={styles.closeButton}
|
|
219
|
-
disabled={loading || isProcess}
|
|
225
|
+
disabled={(loading || isProcess) && !isUploadError}
|
|
220
226
|
onPress={handleDelete}
|
|
221
227
|
>
|
|
222
|
-
<SvgXml xml={closeIcon(
|
|
228
|
+
<SvgXml xml={closeIcon('white')} width="12" height="12" />
|
|
223
229
|
</TouchableOpacity>
|
|
224
230
|
)}
|
|
225
231
|
</View>
|
|
@@ -2,12 +2,13 @@ import { Image, Text, TouchableOpacity, View } from 'react-native';
|
|
|
2
2
|
import React, { FC, useEffect, useState } from 'react';
|
|
3
3
|
import { SvgXml } from 'react-native-svg';
|
|
4
4
|
import {
|
|
5
|
+
errorIcon,
|
|
5
6
|
officialIcon,
|
|
6
7
|
privateIcon,
|
|
7
8
|
storyRing,
|
|
8
9
|
} from '../../../svg/svg-xml-list';
|
|
9
10
|
import { ComponentID, ElementID, ImageSizeState, PageID } from '../../enum';
|
|
10
|
-
import { useFile } from '../../hook';
|
|
11
|
+
import { useFile, useStoryPermission } from '../../hook';
|
|
11
12
|
import useConfig from '../../hook/useConfig';
|
|
12
13
|
import { useStyles } from './styles';
|
|
13
14
|
import { CommunityRepository } from '@amityco/ts-sdk-react-native';
|
|
@@ -26,18 +27,20 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
|
|
|
26
27
|
const theme = useTheme() as MyMD3Theme;
|
|
27
28
|
const [avatarUrl, setAvatarUrl] = useState(null);
|
|
28
29
|
const [communityData, setCommunityData] = useState<Amity.Community>(null);
|
|
30
|
+
const hasStoryPermission = useStoryPermission(storyTarget.targetId);
|
|
29
31
|
const { getImage } = useFile();
|
|
30
32
|
const { getUiKitConfig } = useConfig();
|
|
31
33
|
const styles = useStyles();
|
|
32
|
-
const storyRingColor: string[] =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
const storyRingColor: string[] =
|
|
35
|
+
hasStoryPermission && storyTarget?.failedStoriesCount > 0
|
|
36
|
+
? ['#DE1029', '#DE1029']
|
|
37
|
+
: storyTarget?.hasUnseen
|
|
38
|
+
? (getUiKitConfig({
|
|
39
|
+
page: PageID.StoryPage,
|
|
40
|
+
component: ComponentID.StoryTab,
|
|
41
|
+
element: ElementID.StoryRing,
|
|
42
|
+
})?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
|
|
43
|
+
: ['#e2e2e2', '#e2e2e2'];
|
|
41
44
|
|
|
42
45
|
useEffect(() => {
|
|
43
46
|
if (storyTarget.targetType !== 'community') return;
|
|
@@ -80,12 +83,16 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
|
|
|
80
83
|
height={68}
|
|
81
84
|
xml={storyRing(storyRingColor[0], storyRingColor[1])}
|
|
82
85
|
/>
|
|
83
|
-
{
|
|
86
|
+
{hasStoryPermission && storyTarget?.failedStoriesCount > 0 ? (
|
|
87
|
+
<View style={styles.errorIcon}>
|
|
88
|
+
<SvgXml width={16} height={16} xml={errorIcon()} />
|
|
89
|
+
</View>
|
|
90
|
+
) : communityData?.isOfficial ? (
|
|
84
91
|
<SvgXml
|
|
85
92
|
style={styles.officialIcon}
|
|
86
93
|
xml={officialIcon(theme.colors.primary)}
|
|
87
94
|
/>
|
|
88
|
-
)}
|
|
95
|
+
) : null}
|
|
89
96
|
<View style={styles.textRow}>
|
|
90
97
|
{!communityData?.isPublic && (
|
|
91
98
|
<SvgXml width={17} height={17} xml={privateIcon(theme.colors.base)} />
|
|
@@ -43,7 +43,9 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
43
43
|
const [imagePosts, setImagePosts] = useState<string[]>([]);
|
|
44
44
|
const [videoPosts, setVideoPosts] = useState<IVideoPost[]>([]);
|
|
45
45
|
const [pollIds, setPollIds] = useState<{ pollId: string }[]>([]);
|
|
46
|
-
const [livestreamId, setLivestreamId] = useState<Amity.
|
|
46
|
+
const [livestreamId, setLivestreamId] = useState<Amity.Stream['streamId'][]>(
|
|
47
|
+
[]
|
|
48
|
+
);
|
|
47
49
|
|
|
48
50
|
const [imagePostsFullSize, setImagePostsFullSize] = useState<MediaUri[]>([]);
|
|
49
51
|
const [videoPostsFullSize, setVideoPostsFullSize] = useState<MediaUri[]>([]);
|
|
@@ -94,7 +96,7 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
94
96
|
const images: string[] = [];
|
|
95
97
|
const videos: IVideoPost[] = [];
|
|
96
98
|
const polls: { pollId: string }[] = [];
|
|
97
|
-
const livestreams: Amity.
|
|
99
|
+
const livestreams: Amity.Stream['streamId'][] = [];
|
|
98
100
|
|
|
99
101
|
response.forEach((item) => {
|
|
100
102
|
if (item?.dataType === 'image' && item?.data?.fileId) {
|
|
@@ -117,9 +119,9 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
117
119
|
if (!polls.some((poll) => poll.pollId === item.data.pollId)) {
|
|
118
120
|
polls.push(item.data);
|
|
119
121
|
}
|
|
120
|
-
} else if (item?.dataType === '
|
|
121
|
-
if (!livestreams.includes(item.data.
|
|
122
|
-
livestreams.push(item.data.
|
|
122
|
+
} else if (item?.dataType === 'liveStream') {
|
|
123
|
+
if (!livestreams.includes(item.data.streamId)) {
|
|
124
|
+
livestreams.push(item.data.streamId);
|
|
123
125
|
}
|
|
124
126
|
}
|
|
125
127
|
});
|
|
@@ -342,7 +344,7 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
342
344
|
<LivestreamContent
|
|
343
345
|
post={post}
|
|
344
346
|
onPressPost={onPressPost}
|
|
345
|
-
|
|
347
|
+
streamId={livestreamId[0]}
|
|
346
348
|
/>
|
|
347
349
|
) : (
|
|
348
350
|
renderMediaPosts()
|
|
@@ -255,7 +255,7 @@ export function PostMenu({ pageId, componentId, post }: PostMenuProps) {
|
|
|
255
255
|
],
|
|
256
256
|
},
|
|
257
257
|
(post?.creator?.userId === myId || isIAmModerator) &&
|
|
258
|
-
((childrenPost?.dataType !== '
|
|
258
|
+
((childrenPost?.dataType !== 'liveStream' &&
|
|
259
259
|
childrenPost?.dataType !== 'poll') ||
|
|
260
260
|
(childrenPost?.dataType === 'poll' &&
|
|
261
261
|
pollData?.status === 'open')) &&
|
|
@@ -280,7 +280,7 @@ export function PostMenu({ pageId, componentId, post }: PostMenuProps) {
|
|
|
280
280
|
</TouchableOpacity>
|
|
281
281
|
)}
|
|
282
282
|
{post?.creator?.userId === myId &&
|
|
283
|
-
childrenPost?.dataType !== '
|
|
283
|
+
childrenPost?.dataType !== 'liveStream' &&
|
|
284
284
|
childrenPost?.dataType !== 'poll' && (
|
|
285
285
|
<TouchableOpacity
|
|
286
286
|
onPress={goToEditPost}
|
|
@@ -8,8 +8,8 @@ import { informative, failed, success } from '../../assets/icons';
|
|
|
8
8
|
import { CircularProgressIndicator } from '../CircularProgressIndicator';
|
|
9
9
|
|
|
10
10
|
const Toast = () => {
|
|
11
|
+
const { styles, theme } = useStyles();
|
|
11
12
|
const { hideToast, toast } = useToast();
|
|
12
|
-
const { styles, theme } = useStyles(toast.bottomPosition);
|
|
13
13
|
const timeoutRef = useRef<number | null>(null);
|
|
14
14
|
const fadeIn = useRef(new Animated.Value(0)).current;
|
|
15
15
|
|
|
@@ -3,7 +3,7 @@ import { useTheme } from 'react-native-paper';
|
|
|
3
3
|
import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
|
|
6
|
-
export const useStyles = (
|
|
6
|
+
export const useStyles = () => {
|
|
7
7
|
const theme = useTheme<MyMD3Theme>();
|
|
8
8
|
const { bottom } = useSafeAreaInsets();
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ export const useStyles = (bottomPosition: number = 16) => {
|
|
|
13
13
|
zIndex: 999,
|
|
14
14
|
width: '90%',
|
|
15
15
|
borderRadius: 8,
|
|
16
|
-
bottom: bottom +
|
|
16
|
+
bottom: bottom + 16,
|
|
17
17
|
paddingVertical: 16,
|
|
18
18
|
alignSelf: 'center',
|
|
19
19
|
flexDirection: 'row',
|
package/src/v4/hook/index.ts
CHANGED
package/src/v4/index.tsx
CHANGED
|
@@ -11,7 +11,7 @@ export { default as AmityMyCommunitiesSearchPage } from './PublicApi/Pages/Amity
|
|
|
11
11
|
export { default as AmityAllCategoriesPage } from './PublicApi/Pages/AmityAllCategoriesPage/AmityAllCategoriesPage';
|
|
12
12
|
export { default as AmityCommunitiesByCategoryPage } from './PublicApi/Pages/AmityCommunitiesByCategoryPage/AmityCommunitiesByCategoryPage';
|
|
13
13
|
export { default as AmityCommunityProfilePage } from './PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage';
|
|
14
|
-
export { default as AmityCreateLivestreamPage } from './PublicApi/Pages/AmityCreateLivestreamPage';
|
|
14
|
+
// export { default as AmityCreateLivestreamPage } from './PublicApi/Pages/AmityCreateLivestreamPage';
|
|
15
15
|
export { default as AmityLivestreamPostTargetSelectionPage } from './PublicApi/Pages/AmityLivestreamPostTargetSelectionPage';
|
|
16
16
|
export { default as AmityLivestreamTerminatedPage } from './PublicApi/Pages/AmityLivestreamTerminatedPage';
|
|
17
17
|
export { default as AmityLivestreamPlayerPage } from './PublicApi/Pages/AmityLivestreamPlayerPage';
|
|
@@ -10,14 +10,12 @@ type ToastState = {
|
|
|
10
10
|
message: string;
|
|
11
11
|
type: 'failed' | 'success' | 'informative' | 'loading';
|
|
12
12
|
duration?: number;
|
|
13
|
-
bottomPosition?: number;
|
|
14
13
|
};
|
|
15
14
|
const initialState: ToastState = {
|
|
16
15
|
visible: false,
|
|
17
16
|
message: '',
|
|
18
17
|
type: 'loading',
|
|
19
18
|
duration: 2500,
|
|
20
|
-
bottomPosition: 16,
|
|
21
19
|
};
|
|
22
20
|
|
|
23
21
|
const toastSlice = createSlice({
|
|
@@ -29,15 +27,12 @@ const toastSlice = createSlice({
|
|
|
29
27
|
state.message = action.payload.message;
|
|
30
28
|
state.type = action.payload.type;
|
|
31
29
|
state.duration = action.payload.duration ?? initialState.duration;
|
|
32
|
-
state.bottomPosition =
|
|
33
|
-
action.payload.bottomPosition ?? initialState.bottomPosition;
|
|
34
30
|
},
|
|
35
31
|
hideToast: (state) => {
|
|
36
32
|
state.visible = false;
|
|
37
33
|
state.message = '';
|
|
38
34
|
state.type = 'loading';
|
|
39
35
|
state.duration = 2500;
|
|
40
|
-
state.bottomPosition = 16;
|
|
41
36
|
},
|
|
42
37
|
},
|
|
43
38
|
});
|
package/uikit.config.json
CHANGED
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"image": "create_poll_button"
|
|
288
288
|
},
|
|
289
289
|
"social_home_page/create_post_menu/create_livestream_button": {
|
|
290
|
-
"text": "
|
|
290
|
+
"text": "Livestream",
|
|
291
291
|
"image": "create_livestream_button"
|
|
292
292
|
},
|
|
293
293
|
"select_post_target_page/*/close_button": {
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.RoomView = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _livekitClient = require("livekit-client");
|
|
10
|
-
var _reactNative2 = require("@livekit/react-native");
|
|
11
|
-
var _styles = require("./styles");
|
|
12
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
-
const RoomView = ({
|
|
14
|
-
onLocalParticipantReady,
|
|
15
|
-
isFrontCamera
|
|
16
|
-
}) => {
|
|
17
|
-
const {
|
|
18
|
-
localParticipant
|
|
19
|
-
} = (0, _reactNative2.useLocalParticipant)();
|
|
20
|
-
const styles = (0, _styles.useStyles)();
|
|
21
|
-
(0, _react.useEffect)(() => {
|
|
22
|
-
if (localParticipant && onLocalParticipantReady) {
|
|
23
|
-
onLocalParticipantReady(localParticipant);
|
|
24
|
-
}
|
|
25
|
-
}, [localParticipant, onLocalParticipantReady]);
|
|
26
|
-
if (!(localParticipant !== null && localParticipant !== void 0 && localParticipant.isCameraEnabled)) {
|
|
27
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
28
|
-
style: styles.roomContainer
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
const cameraTrack = localParticipant.getTrackPublication(_livekitClient.Track.Source.Camera);
|
|
32
|
-
if (!(cameraTrack !== null && cameraTrack !== void 0 && cameraTrack.track)) {
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
34
|
-
style: styles.roomContainer
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
38
|
-
style: styles.roomContainer
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative2.VideoTrack, {
|
|
40
|
-
trackRef: {
|
|
41
|
-
participant: localParticipant,
|
|
42
|
-
publication: cameraTrack,
|
|
43
|
-
source: _livekitClient.Track.Source.Camera
|
|
44
|
-
},
|
|
45
|
-
style: styles.videoTrack,
|
|
46
|
-
mirror: isFrontCamera
|
|
47
|
-
}));
|
|
48
|
-
};
|
|
49
|
-
exports.RoomView = RoomView;
|
|
50
|
-
//# sourceMappingURL=RoomView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_livekitClient","_reactNative2","_styles","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RoomView","onLocalParticipantReady","isFrontCamera","localParticipant","useLocalParticipant","styles","useStyles","useEffect","isCameraEnabled","createElement","View","style","roomContainer","cameraTrack","getTrackPublication","Track","Source","Camera","track","VideoTrack","trackRef","participant","publication","source","videoTrack","mirror","exports"],"sourceRoot":"../../../../../../src","sources":["v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAqC,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAO9B,MAAMkB,QAAiC,GAAGA,CAAC;EAChDC,uBAAuB;EACvBC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAiB,CAAC,GAAG,IAAAC,iCAAmB,EAAC,CAAC;EAClD,MAAMC,MAAM,GAAG,IAAAC,iBAAS,EAAC,CAAC;EAE1B,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIJ,gBAAgB,IAAIF,uBAAuB,EAAE;MAC/CA,uBAAuB,CAACE,gBAAgB,CAAC;IAC3C;EACF,CAAC,EAAE,CAACA,gBAAgB,EAAEF,uBAAuB,CAAC,CAAC;EAE/C,IAAI,EAACE,gBAAgB,aAAhBA,gBAAgB,eAAhBA,gBAAgB,CAAEK,eAAe,GAAE;IACtC,oBAAOlC,MAAA,CAAAiB,OAAA,CAAAkB,aAAA,CAAChC,YAAA,CAAAiC,IAAI;MAACC,KAAK,EAAEN,MAAM,CAACO;IAAc,CAAE,CAAC;EAC9C;EAEA,MAAMC,WAAW,GAAGV,gBAAgB,CAACW,mBAAmB,CAACC,oBAAK,CAACC,MAAM,CAACC,MAAM,CAAC;EAE7E,IAAI,EAACJ,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEK,KAAK,GAAE;IACvB,oBAAO5C,MAAA,CAAAiB,OAAA,CAAAkB,aAAA,CAAChC,YAAA,CAAAiC,IAAI;MAACC,KAAK,EAAEN,MAAM,CAACO;IAAc,CAAE,CAAC;EAC9C;EAEA,oBACEtC,MAAA,CAAAiB,OAAA,CAAAkB,aAAA,CAAChC,YAAA,CAAAiC,IAAI;IAACC,KAAK,EAAEN,MAAM,CAACO;EAAc,gBAChCtC,MAAA,CAAAiB,OAAA,CAAAkB,aAAA,CAAC9B,aAAA,CAAAwC,UAAU;IACTC,QAAQ,EAAE;MACRC,WAAW,EAAElB,gBAAgB;MAC7BmB,WAAW,EAAET,WAAW;MACxBU,MAAM,EAAER,oBAAK,CAACC,MAAM,CAACC;IACvB,CAAE;IACFN,KAAK,EAAEN,MAAM,CAACmB,UAAW;IACzBC,MAAM,EAAEvB;EAAc,CACvB,CACG,CAAC;AAEX,CAAC;AAACwB,OAAA,CAAA1B,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.RoomStatus = void 0;
|
|
7
|
-
const RoomStatus = exports.RoomStatus = {
|
|
8
|
-
idle: 'idle',
|
|
9
|
-
live: 'live',
|
|
10
|
-
recorded: 'recorded',
|
|
11
|
-
ended: 'ended',
|
|
12
|
-
waiting_reconnect: 'waiting_reconnect'
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=roomStatus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["RoomStatus","exports","idle","live","recorded","ended","waiting_reconnect"],"sourceRoot":"../../../../src","sources":["v4/enum/roomStatus.ts"],"mappings":";;;;;;AAAO,MAAMA,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG;EACxBE,IAAI,EAAE,MAA0B;EAChCC,IAAI,EAAE,MAA0B;EAChCC,QAAQ,EAAE,UAA8B;EACxCC,KAAK,EAAE,OAA2B;EAClCC,iBAAiB,EAAE;AACrB,CAAC","ignoreList":[]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.usePostSubscription = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _tsSdkReactNative = require("@amityco/ts-sdk-react-native");
|
|
9
|
-
const usePostSubscription = postId => {
|
|
10
|
-
const [subscribedPost, setSubscribedPost] = (0, _react.useState)(null);
|
|
11
|
-
(0, _react.useEffect)(() => {
|
|
12
|
-
let unsubscribe;
|
|
13
|
-
if (postId) {
|
|
14
|
-
unsubscribe = _tsSdkReactNative.PostRepository.getPost(postId, ({
|
|
15
|
-
data
|
|
16
|
-
}) => {
|
|
17
|
-
setSubscribedPost(data);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
return () => {
|
|
21
|
-
unsubscribe && unsubscribe();
|
|
22
|
-
};
|
|
23
|
-
}, [postId]);
|
|
24
|
-
(0, _react.useEffect)(() => {
|
|
25
|
-
let unsubscribe;
|
|
26
|
-
if (subscribedPost) {
|
|
27
|
-
unsubscribe = (0, _tsSdkReactNative.subscribeTopic)((0, _tsSdkReactNative.getPostTopic)(subscribedPost));
|
|
28
|
-
}
|
|
29
|
-
return () => {
|
|
30
|
-
unsubscribe && unsubscribe();
|
|
31
|
-
};
|
|
32
|
-
}, [subscribedPost]);
|
|
33
|
-
return {
|
|
34
|
-
subscribedPost
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
exports.usePostSubscription = usePostSubscription;
|
|
38
|
-
//# sourceMappingURL=usePostSubscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_tsSdkReactNative","usePostSubscription","postId","subscribedPost","setSubscribedPost","useState","useEffect","unsubscribe","PostRepository","getPost","data","subscribeTopic","getPostTopic","exports"],"sourceRoot":"../../../../src","sources":["v4/hook/usePostSubscription.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAMO,MAAME,mBAAmB,GAAIC,MAAc,IAAK;EACrD,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAG,IAAAC,eAAQ,EAAa,IAAI,CAAC;EAEtE,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIC,WAAuB;IAC3B,IAAIL,MAAM,EAAE;MACVK,WAAW,GAAGC,gCAAc,CAACC,OAAO,CAACP,MAAM,EAAE,CAAC;QAAEQ;MAAK,CAAC,KAAK;QACzDN,iBAAiB,CAACM,IAAI,CAAC;MACzB,CAAC,CAAC;IACJ;IACA,OAAO,MAAM;MACXH,WAAW,IAAIA,WAAW,CAAC,CAAC;IAC9B,CAAC;EACH,CAAC,EAAE,CAACL,MAAM,CAAC,CAAC;EAEZ,IAAAI,gBAAS,EAAC,MAAM;IACd,IAAIC,WAAuB;IAC3B,IAAIJ,cAAc,EAAE;MAClBI,WAAW,GAAG,IAAAI,gCAAc,EAAC,IAAAC,8BAAY,EAACT,cAAc,CAAC,CAAC;IAC5D;IACA,OAAO,MAAM;MACXI,WAAW,IAAIA,WAAW,CAAC,CAAC;IAC9B,CAAC;EACH,CAAC,EAAE,CAACJ,cAAc,CAAC,CAAC;EAEpB,OAAO;IAAEA;EAAe,CAAC;AAC3B,CAAC;AAACU,OAAA,CAAAZ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useRoomSubscription = void 0;
|
|
7
|
-
var _tsSdkReactNative = require("@amityco/ts-sdk-react-native");
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
const useRoomSubscription = ({
|
|
10
|
-
room
|
|
11
|
-
}) => {
|
|
12
|
-
(0, _react.useEffect)(() => {
|
|
13
|
-
const unsubscriber = [];
|
|
14
|
-
if (room !== null && room !== void 0 && room.roomId && (room === null || room === void 0 ? void 0 : room.status) !== 'recorded') {
|
|
15
|
-
unsubscriber.push((0, _tsSdkReactNative.subscribeTopic)((0, _tsSdkReactNative.getRoomWatcherTopic)(room)));
|
|
16
|
-
}
|
|
17
|
-
return () => unsubscriber.forEach(fn => fn());
|
|
18
|
-
}, [room, room === null || room === void 0 ? void 0 : room.roomId]);
|
|
19
|
-
return null;
|
|
20
|
-
};
|
|
21
|
-
exports.useRoomSubscription = useRoomSubscription;
|
|
22
|
-
//# sourceMappingURL=useRoomSubscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_tsSdkReactNative","require","_react","useRoomSubscription","room","useEffect","unsubscriber","roomId","status","push","subscribeTopic","getRoomWatcherTopic","forEach","fn","exports"],"sourceRoot":"../../../../src","sources":["v4/hook/useRoomSubscription.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,mBAAmB,GAAGA,CAAC;EAAEC;AAAmC,CAAC,KAAK;EAC7E,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,YAAkC,GAAG,EAAE;IAE7C,IAAIF,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEG,MAAM,IAAI,CAAAH,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEI,MAAM,MAAK,UAAU,EAAE;MAC/CF,YAAY,CAACG,IAAI,CAAC,IAAAC,gCAAc,EAAC,IAAAC,qCAAmB,EAACP,IAAI,CAAC,CAAC,CAAC;IAC9D;IAEA,OAAO,MAAME,YAAY,CAACM,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;EACjD,CAAC,EAAE,CAACT,IAAI,EAAEA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEG,MAAM,CAAC,CAAC;EAExB,OAAO,IAAI;AACb,CAAC;AAACO,OAAA,CAAAX,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
3
|
-
import { Track } from 'livekit-client';
|
|
4
|
-
import { VideoTrack, useLocalParticipant } from '@livekit/react-native';
|
|
5
|
-
import { useStyles } from './styles';
|
|
6
|
-
export const RoomView = ({
|
|
7
|
-
onLocalParticipantReady,
|
|
8
|
-
isFrontCamera
|
|
9
|
-
}) => {
|
|
10
|
-
const {
|
|
11
|
-
localParticipant
|
|
12
|
-
} = useLocalParticipant();
|
|
13
|
-
const styles = useStyles();
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
if (localParticipant && onLocalParticipantReady) {
|
|
16
|
-
onLocalParticipantReady(localParticipant);
|
|
17
|
-
}
|
|
18
|
-
}, [localParticipant, onLocalParticipantReady]);
|
|
19
|
-
if (!(localParticipant !== null && localParticipant !== void 0 && localParticipant.isCameraEnabled)) {
|
|
20
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
21
|
-
style: styles.roomContainer
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
const cameraTrack = localParticipant.getTrackPublication(Track.Source.Camera);
|
|
25
|
-
if (!(cameraTrack !== null && cameraTrack !== void 0 && cameraTrack.track)) {
|
|
26
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
27
|
-
style: styles.roomContainer
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
31
|
-
style: styles.roomContainer
|
|
32
|
-
}, /*#__PURE__*/React.createElement(VideoTrack, {
|
|
33
|
-
trackRef: {
|
|
34
|
-
participant: localParticipant,
|
|
35
|
-
publication: cameraTrack,
|
|
36
|
-
source: Track.Source.Camera
|
|
37
|
-
},
|
|
38
|
-
style: styles.videoTrack,
|
|
39
|
-
mirror: isFrontCamera
|
|
40
|
-
}));
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=RoomView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","View","Track","VideoTrack","useLocalParticipant","useStyles","RoomView","onLocalParticipantReady","isFrontCamera","localParticipant","styles","isCameraEnabled","createElement","style","roomContainer","cameraTrack","getTrackPublication","Source","Camera","track","trackRef","participant","publication","source","videoTrack","mirror"],"sourceRoot":"../../../../../../src","sources":["v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,KAAK,QAAQ,gBAAgB;AACtC,SAASC,UAAU,EAAEC,mBAAmB,QAAQ,uBAAuB;AACvE,SAASC,SAAS,QAAQ,UAAU;AAOpC,OAAO,MAAMC,QAAiC,GAAGA,CAAC;EAChDC,uBAAuB;EACvBC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAiB,CAAC,GAAGL,mBAAmB,CAAC,CAAC;EAClD,MAAMM,MAAM,GAAGL,SAAS,CAAC,CAAC;EAE1BL,SAAS,CAAC,MAAM;IACd,IAAIS,gBAAgB,IAAIF,uBAAuB,EAAE;MAC/CA,uBAAuB,CAACE,gBAAgB,CAAC;IAC3C;EACF,CAAC,EAAE,CAACA,gBAAgB,EAAEF,uBAAuB,CAAC,CAAC;EAE/C,IAAI,EAACE,gBAAgB,aAAhBA,gBAAgB,eAAhBA,gBAAgB,CAAEE,eAAe,GAAE;IACtC,oBAAOZ,KAAA,CAAAa,aAAA,CAACX,IAAI;MAACY,KAAK,EAAEH,MAAM,CAACI;IAAc,CAAE,CAAC;EAC9C;EAEA,MAAMC,WAAW,GAAGN,gBAAgB,CAACO,mBAAmB,CAACd,KAAK,CAACe,MAAM,CAACC,MAAM,CAAC;EAE7E,IAAI,EAACH,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEI,KAAK,GAAE;IACvB,oBAAOpB,KAAA,CAAAa,aAAA,CAACX,IAAI;MAACY,KAAK,EAAEH,MAAM,CAACI;IAAc,CAAE,CAAC;EAC9C;EAEA,oBACEf,KAAA,CAAAa,aAAA,CAACX,IAAI;IAACY,KAAK,EAAEH,MAAM,CAACI;EAAc,gBAChCf,KAAA,CAAAa,aAAA,CAACT,UAAU;IACTiB,QAAQ,EAAE;MACRC,WAAW,EAAEZ,gBAAgB;MAC7Ba,WAAW,EAAEP,WAAW;MACxBQ,MAAM,EAAErB,KAAK,CAACe,MAAM,CAACC;IACvB,CAAE;IACFL,KAAK,EAAEH,MAAM,CAACc,UAAW;IACzBC,MAAM,EAAEjB;EAAc,CACvB,CACG,CAAC;AAEX,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["RoomStatus","idle","live","recorded","ended","waiting_reconnect"],"sourceRoot":"../../../../src","sources":["v4/enum/roomStatus.ts"],"mappings":"AAAA,OAAO,MAAMA,UAAU,GAAG;EACxBC,IAAI,EAAE,MAA0B;EAChCC,IAAI,EAAE,MAA0B;EAChCC,QAAQ,EAAE,UAA8B;EACxCC,KAAK,EAAE,OAA2B;EAClCC,iBAAiB,EAAE;AACrB,CAAC","ignoreList":[]}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import { getPostTopic, PostRepository, subscribeTopic } from '@amityco/ts-sdk-react-native';
|
|
3
|
-
export const usePostSubscription = postId => {
|
|
4
|
-
const [subscribedPost, setSubscribedPost] = useState(null);
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
let unsubscribe;
|
|
7
|
-
if (postId) {
|
|
8
|
-
unsubscribe = PostRepository.getPost(postId, ({
|
|
9
|
-
data
|
|
10
|
-
}) => {
|
|
11
|
-
setSubscribedPost(data);
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
return () => {
|
|
15
|
-
unsubscribe && unsubscribe();
|
|
16
|
-
};
|
|
17
|
-
}, [postId]);
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
let unsubscribe;
|
|
20
|
-
if (subscribedPost) {
|
|
21
|
-
unsubscribe = subscribeTopic(getPostTopic(subscribedPost));
|
|
22
|
-
}
|
|
23
|
-
return () => {
|
|
24
|
-
unsubscribe && unsubscribe();
|
|
25
|
-
};
|
|
26
|
-
}, [subscribedPost]);
|
|
27
|
-
return {
|
|
28
|
-
subscribedPost
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=usePostSubscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","getPostTopic","PostRepository","subscribeTopic","usePostSubscription","postId","subscribedPost","setSubscribedPost","unsubscribe","getPost","data"],"sourceRoot":"../../../../src","sources":["v4/hook/usePostSubscription.ts"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SACEC,YAAY,EACZC,cAAc,EACdC,cAAc,QACT,8BAA8B;AAErC,OAAO,MAAMC,mBAAmB,GAAIC,MAAc,IAAK;EACrD,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,GAAGP,QAAQ,CAAa,IAAI,CAAC;EAEtED,SAAS,CAAC,MAAM;IACd,IAAIS,WAAuB;IAC3B,IAAIH,MAAM,EAAE;MACVG,WAAW,GAAGN,cAAc,CAACO,OAAO,CAACJ,MAAM,EAAE,CAAC;QAAEK;MAAK,CAAC,KAAK;QACzDH,iBAAiB,CAACG,IAAI,CAAC;MACzB,CAAC,CAAC;IACJ;IACA,OAAO,MAAM;MACXF,WAAW,IAAIA,WAAW,CAAC,CAAC;IAC9B,CAAC;EACH,CAAC,EAAE,CAACH,MAAM,CAAC,CAAC;EAEZN,SAAS,CAAC,MAAM;IACd,IAAIS,WAAuB;IAC3B,IAAIF,cAAc,EAAE;MAClBE,WAAW,GAAGL,cAAc,CAACF,YAAY,CAACK,cAAc,CAAC,CAAC;IAC5D;IACA,OAAO,MAAM;MACXE,WAAW,IAAIA,WAAW,CAAC,CAAC;IAC9B,CAAC;EACH,CAAC,EAAE,CAACF,cAAc,CAAC,CAAC;EAEpB,OAAO;IAAEA;EAAe,CAAC;AAC3B,CAAC","ignoreList":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { getRoomWatcherTopic, subscribeTopic } from '@amityco/ts-sdk-react-native';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
export const useRoomSubscription = ({
|
|
4
|
-
room
|
|
5
|
-
}) => {
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
const unsubscriber = [];
|
|
8
|
-
if (room !== null && room !== void 0 && room.roomId && (room === null || room === void 0 ? void 0 : room.status) !== 'recorded') {
|
|
9
|
-
unsubscriber.push(subscribeTopic(getRoomWatcherTopic(room)));
|
|
10
|
-
}
|
|
11
|
-
return () => unsubscriber.forEach(fn => fn());
|
|
12
|
-
}, [room, room === null || room === void 0 ? void 0 : room.roomId]);
|
|
13
|
-
return null;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=useRoomSubscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["getRoomWatcherTopic","subscribeTopic","useEffect","useRoomSubscription","room","unsubscriber","roomId","status","push","forEach","fn"],"sourceRoot":"../../../../src","sources":["v4/hook/useRoomSubscription.ts"],"mappings":"AAAA,SACEA,mBAAmB,EACnBC,cAAc,QACT,8BAA8B;AACrC,SAASC,SAAS,QAAQ,OAAO;AAEjC,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC;AAAmC,CAAC,KAAK;EAC7EF,SAAS,CAAC,MAAM;IACd,MAAMG,YAAkC,GAAG,EAAE;IAE7C,IAAID,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEE,MAAM,IAAI,CAAAF,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEG,MAAM,MAAK,UAAU,EAAE;MAC/CF,YAAY,CAACG,IAAI,CAACP,cAAc,CAACD,mBAAmB,CAACI,IAAI,CAAC,CAAC,CAAC;IAC9D;IAEA,OAAO,MAAMC,YAAY,CAACI,OAAO,CAAEC,EAAE,IAAKA,EAAE,CAAC,CAAC,CAAC;EACjD,CAAC,EAAE,CAACN,IAAI,EAAEA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,MAAM,CAAC,CAAC;EAExB,OAAO,IAAI;AACb,CAAC","ignoreList":[]}
|