@zezosoft/zezo-ott-react-native-ui-kit 1.1.0 → 1.1.2
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/module/Styles/globalStyles.js +0 -5
- package/lib/module/Styles/globalStyles.js.map +1 -1
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js +64 -40
- package/lib/module/components/Auth/AuthProvider/AuthProvider.js.map +1 -1
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js +5 -2
- package/lib/module/components/Auth/ForgotPassword/ForgotPassword.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithEmail.js +17 -11
- package/lib/module/components/Auth/Login/LoginWithEmail.js.map +1 -1
- package/lib/module/components/Auth/Login/LoginWithPhone.js +12 -6
- package/lib/module/components/Auth/Login/LoginWithPhone.js.map +1 -1
- package/lib/module/components/Auth/OTP/OTP.js +7 -4
- package/lib/module/components/Auth/OTP/OTP.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/QrLogin.js +133 -86
- package/lib/module/components/Auth/QrLogin/QrLogin.js.map +1 -1
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js +174 -109
- package/lib/module/components/Auth/QrLogin/components/QrViewArea.js.map +1 -1
- package/lib/module/components/Auth/SignUp/SignUp.js +19 -13
- package/lib/module/components/Auth/SignUp/SignUp.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js +54 -36
- package/lib/module/components/Auth/SplashScreen/SplashScreen.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js +29 -11
- package/lib/module/components/Auth/SplashScreen/components/SplashImage/SplashImage.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js +13 -7
- package/lib/module/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.js.map +1 -1
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js +33 -21
- package/lib/module/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.js.map +1 -1
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js +26 -20
- package/lib/module/components/BackgroundLayout/BackgroundLayout.js.map +1 -1
- package/lib/module/components/BlogView/BlogView.js +36 -20
- package/lib/module/components/BlogView/BlogView.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +152 -0
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -0
- package/lib/module/components/BottomSheet/index.js +4 -0
- package/lib/module/components/BottomSheet/index.js.map +1 -0
- package/lib/module/components/Button/BackBtn.js +46 -16
- package/lib/module/components/Button/BackBtn.js.map +1 -1
- package/lib/module/components/Button/PrimaryBtn.js +19 -13
- package/lib/module/components/Button/PrimaryBtn.js.map +1 -1
- package/lib/module/components/Button/SecondaryBtn.js +19 -13
- package/lib/module/components/Button/SecondaryBtn.js.map +1 -1
- package/lib/module/components/Button/TextButton.js +19 -13
- package/lib/module/components/Button/TextButton.js.map +1 -1
- package/lib/module/components/Content/Card/Category/Category.js +70 -37
- package/lib/module/components/Content/Card/Category/Category.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/One.js +40 -32
- package/lib/module/components/Content/Card/Sliders/Styles/One.js.map +1 -1
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js +109 -48
- package/lib/module/components/Content/Card/Sliders/Styles/Two.js.map +1 -1
- package/lib/module/components/Content/Card/Styles/RotateInOut.js +4 -11
- package/lib/module/components/Content/Card/Styles/RotateInOut.js.map +1 -1
- package/lib/module/components/Content/Card/components/CardPoster.js +105 -43
- package/lib/module/components/Content/Card/components/CardPoster.js.map +1 -1
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js +18 -17
- package/lib/module/components/Content/Card/components/RentOrBuyIcon.js.map +1 -1
- package/lib/module/components/Content/Card/components/ThumbnailCard.js +78 -28
- package/lib/module/components/Content/Card/components/ThumbnailCard.js.map +1 -1
- package/lib/module/components/Content/Content.js +44 -25
- package/lib/module/components/Content/Content.js.map +1 -1
- package/lib/module/components/Content/Sections.js +37 -29
- package/lib/module/components/Content/Sections.js.map +1 -1
- package/lib/module/components/ContentView/ContentView.js +70 -41
- package/lib/module/components/ContentView/ContentView.js.map +1 -1
- package/lib/module/components/ContentView/MoreContentList.js +74 -40
- package/lib/module/components/ContentView/MoreContentList.js.map +1 -1
- package/lib/module/components/ContentView/components/AboutSection.js +40 -19
- package/lib/module/components/ContentView/components/AboutSection.js.map +1 -1
- package/lib/module/components/ContentView/components/CastCard.js +6 -7
- package/lib/module/components/ContentView/components/CastCard.js.map +1 -1
- package/lib/module/components/ContentView/components/EpisodeCard.js +2 -2
- package/lib/module/components/ContentView/components/EpisodeCard.js.map +1 -1
- package/lib/module/components/ContentView/components/GenreTags.js +25 -13
- package/lib/module/components/ContentView/components/GenreTags.js.map +1 -1
- package/lib/module/components/ContentView/components/HeroBanner.js +39 -11
- package/lib/module/components/ContentView/components/HeroBanner.js.map +1 -1
- package/lib/module/components/ContentView/components/MiniInfo.js +84 -77
- package/lib/module/components/ContentView/components/MiniInfo.js.map +1 -1
- package/lib/module/components/ContentView/components/PlayButton.js +11 -7
- package/lib/module/components/ContentView/components/PlayButton.js.map +1 -1
- package/lib/module/components/ContentView/components/Title.js +12 -12
- package/lib/module/components/ContentView/components/Title.js.map +1 -1
- package/lib/module/components/ContentView/components/TrailerButton.js +12 -7
- package/lib/module/components/ContentView/components/TrailerButton.js.map +1 -1
- package/lib/module/components/Fallbacks/NoContentFallback.js +27 -22
- package/lib/module/components/Fallbacks/NoContentFallback.js.map +1 -1
- package/lib/module/components/Fallbacks/NotFoundFallback.js +6 -4
- package/lib/module/components/Fallbacks/NotFoundFallback.js.map +1 -1
- package/lib/module/components/Headers/AppHeader.js +22 -13
- package/lib/module/components/Headers/AppHeader.js.map +1 -1
- package/lib/module/components/Headers/Three.js +6 -5
- package/lib/module/components/Headers/Three.js.map +1 -1
- package/lib/module/components/Headers/Two.js +19 -14
- package/lib/module/components/Headers/Two.js.map +1 -1
- package/lib/module/components/Input/InputOne.js +46 -31
- package/lib/module/components/Input/InputOne.js.map +1 -1
- package/lib/module/components/Loader/Loader.js +2 -2
- package/lib/module/components/Loader/Loader.js.map +1 -1
- package/lib/module/components/Logo/Logo.js +17 -14
- package/lib/module/components/Logo/Logo.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js +134 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/BottomControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js +154 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MiddleControls.js +173 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/MiddleControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js +77 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/RightControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/TopControls.js +132 -0
- package/lib/module/components/Reels/ReelsSeries/MediaControls/TopControls.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/DetailsModal.js +165 -0
- package/lib/module/components/Reels/ReelsSeries/Model/DetailsModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js +106 -0
- package/lib/module/components/Reels/ReelsSeries/Model/SettingModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/Model/UnlockModal.js +124 -0
- package/lib/module/components/Reels/ReelsSeries/Model/UnlockModal.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js +102 -64
- package/lib/module/components/Reels/ReelsSeries/ReelsSeries.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js +241 -232
- package/lib/module/components/Reels/ReelsSeries/ReelsSeriesItem.js.map +1 -1
- package/lib/module/components/Reels/ReelsSeries/components/AnimatedThreeLines.js +153 -0
- package/lib/module/components/Reels/ReelsSeries/components/AnimatedThreeLines.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/{Model → components}/Episodes.js +46 -36
- package/lib/module/components/Reels/ReelsSeries/components/Episodes.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/GradientOverlay.js +35 -0
- package/lib/module/components/Reels/ReelsSeries/components/GradientOverlay.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/Like.js +37 -0
- package/lib/module/components/Reels/ReelsSeries/components/Like.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/RotatingLoader.js +55 -0
- package/lib/module/components/Reels/ReelsSeries/components/RotatingLoader.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/Synopsis.js +268 -0
- package/lib/module/components/Reels/ReelsSeries/components/Synopsis.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js +143 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/QualityControl.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.js +56 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.js.map +1 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/index.js +5 -0
- package/lib/module/components/Reels/ReelsSeries/components/VideoControls/index.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/gestureUtils.js +30 -0
- package/lib/module/components/Reels/utils/Controls/gestureUtils.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/index.js +7 -0
- package/lib/module/components/Reels/utils/Controls/index.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/overlayUtils.js +28 -0
- package/lib/module/components/Reels/utils/Controls/overlayUtils.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/videoControlsConstants.js +27 -0
- package/lib/module/components/Reels/utils/Controls/videoControlsConstants.js.map +1 -0
- package/lib/module/components/Reels/utils/Controls/videoRef.js +5 -0
- package/lib/module/components/Reels/utils/Controls/videoRef.js.map +1 -0
- package/lib/module/components/Reels/utils/index.js +4 -0
- package/lib/module/components/Reels/utils/index.js.map +1 -0
- package/lib/module/components/Reels/utils/timeoutUtils.js +24 -0
- package/lib/module/components/Reels/utils/timeoutUtils.js.map +1 -0
- package/lib/module/components/Search/One.js +2 -1
- package/lib/module/components/Search/One.js.map +1 -1
- package/lib/module/components/Search/components/SearchCard.js +15 -19
- package/lib/module/components/Search/components/SearchCard.js.map +1 -1
- package/lib/module/components/Settings/AppSettings.js +97 -62
- package/lib/module/components/Settings/AppSettings.js.map +1 -1
- package/lib/module/components/Subscription/SubOne.js +313 -254
- package/lib/module/components/Subscription/SubOne.js.map +1 -1
- package/lib/module/components/Text/Text.js +15 -12
- package/lib/module/components/Text/Text.js.map +1 -1
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js +25 -23
- package/lib/module/components/User/DeviceSessions/DeviceSessions.js.map +1 -1
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js +23 -18
- package/lib/module/components/User/ProfileUpdate/ProfileUpdate.js.map +1 -1
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js +38 -24
- package/lib/module/components/User/PurchaseHistory/PurchaseHistory.js.map +1 -1
- package/lib/module/components/User/WatchHistory/WatchHistory.js +21 -14
- package/lib/module/components/User/WatchHistory/WatchHistory.js.map +1 -1
- package/lib/module/components/User/WatchLater/WatchLater.js +30 -21
- package/lib/module/components/User/WatchLater/WatchLater.js.map +1 -1
- package/lib/module/components/User/components/UserAvatar.js +38 -19
- package/lib/module/components/User/components/UserAvatar.js.map +1 -1
- package/lib/module/components/User/components/UserSection.js +37 -17
- package/lib/module/components/User/components/UserSection.js.map +1 -1
- package/lib/module/components/View/View.js +7 -4
- package/lib/module/components/View/View.js.map +1 -1
- package/lib/module/components/index.js +1 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/hooks/index.js +17 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useDebounce.js +25 -6
- package/lib/module/hooks/useDebounce.js.map +1 -1
- package/lib/module/hooks/useKeyboard.js +7 -4
- package/lib/module/hooks/useKeyboard.js.map +1 -1
- package/lib/module/hooks/useNavigationMode.js +10 -4
- package/lib/module/hooks/useNavigationMode.js.map +1 -1
- package/lib/module/hooks/usePaginatedSection.js +1 -1
- package/lib/module/hooks/usePaginatedSection.js.map +1 -1
- package/lib/module/hooks/usePrevious.js +30 -0
- package/lib/module/hooks/usePrevious.js.map +1 -0
- package/lib/module/hooks/useSafeCallback.js +33 -0
- package/lib/module/hooks/useSafeCallback.js.map +1 -0
- package/lib/module/hooks/useSkeletonItems.js +33 -0
- package/lib/module/hooks/useSkeletonItems.js.map +1 -0
- package/lib/module/hooks/useSplashCache.js +2 -1
- package/lib/module/hooks/useSplashCache.js.map +1 -1
- package/lib/module/hooks/useThemeColors.js +33 -0
- package/lib/module/hooks/useThemeColors.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +24 -15
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/hook/useInternalTheme.js +18 -11
- package/lib/module/theme/hook/useInternalTheme.js.map +1 -1
- package/lib/module/theme/hook/useThemeStatusBar.js +10 -4
- package/lib/module/theme/hook/useThemeStatusBar.js.map +1 -1
- package/lib/module/theme/themes.js +3 -3
- package/lib/typescript/src/Styles/globalStyles.d.ts +0 -5
- package/lib/typescript/src/Styles/globalStyles.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/AuthProvider/AuthProvider.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/ForgotPassword/ForgotPassword.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithEmail.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/Login/LoginWithPhone.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/OTP/OTP.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts +0 -15
- package/lib/typescript/src/components/Auth/QrLogin/QrLogin.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts +0 -1
- package/lib/typescript/src/components/Auth/QrLogin/components/QrViewArea.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SignUp/SignUp.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/SplashScreen.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.d.ts.map +1 -1
- package/lib/typescript/src/components/Auth/index.d.ts.map +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts +1 -1
- package/lib/typescript/src/components/BackgroundLayout/BackgroundLayout.d.ts.map +1 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts +2 -1
- package/lib/typescript/src/components/BlogView/BlogView.d.ts.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +18 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts +3 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Button/BackBtn.d.ts +5 -3
- package/lib/typescript/src/components/Button/BackBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/PrimaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts +2 -1
- package/lib/typescript/src/components/Button/SecondaryBtn.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/TextButton.d.ts +2 -2
- package/lib/typescript/src/components/Button/TextButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Button/index.d.ts +4 -2
- package/lib/typescript/src/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Category/Category.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Sliders/Styles/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/Styles/RotateInOut.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/CardPoster.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts +2 -2
- package/lib/typescript/src/components/Content/Card/components/RentOrBuyIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts +2 -0
- package/lib/typescript/src/components/Content/Card/components/ThumbnailCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Content.d.ts +2 -0
- package/lib/typescript/src/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/src/components/Content/Sections.d.ts +2 -2
- package/lib/typescript/src/components/Content/Sections.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/ContentView.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/MoreContentList.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/AboutSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts +6 -1
- package/lib/typescript/src/components/ContentView/components/CastCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/EpisodeCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/GenreTags.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/HeroBanner.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/MiniInfo.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/PlayButton.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts +1 -1
- package/lib/typescript/src/components/ContentView/components/Title.d.ts.map +1 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts +2 -1
- package/lib/typescript/src/components/ContentView/components/TrailerButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts +2 -1
- package/lib/typescript/src/components/Fallbacks/NoContentFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts +1 -1
- package/lib/typescript/src/components/Fallbacks/NotFoundFallback.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/AppHeader.d.ts +2 -2
- package/lib/typescript/src/components/Headers/AppHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Three.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Three.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/Two.d.ts +2 -2
- package/lib/typescript/src/components/Headers/Two.d.ts.map +1 -1
- package/lib/typescript/src/components/Headers/index.d.ts +2 -2
- package/lib/typescript/src/components/Input/Input.d.ts +1 -1
- package/lib/typescript/src/components/Input/InputOne.d.ts +2 -2
- package/lib/typescript/src/components/Input/InputOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Loader/Loader.d.ts.map +1 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts +2 -1
- package/lib/typescript/src/components/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/BottomControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts +60 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/RightControls.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/RightControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/TopControls.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/MediaControls/TopControls.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/DetailsModal.d.ts +16 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/DetailsModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts +15 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/SettingModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/UnlockModal.d.ts +14 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/UnlockModal.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts +8 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeries.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts +8 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelsSeriesItem.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.d.ts +13 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/{Model → components}/Episodes.d.ts +3 -2
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Episodes.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/GradientOverlay.d.ts +7 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/GradientOverlay.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Like.d.ts +7 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Like.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/RotatingLoader.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/RotatingLoader.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Synopsis.d.ts +12 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/Synopsis.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.d.ts +11 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.d.ts +10 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/index.d.ts +3 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/components/VideoControls/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts +13 -0
- package/lib/typescript/src/components/Reels/ReelsSeries/types.d.ts.map +1 -1
- package/lib/typescript/src/components/Reels/utils/Controls/gestureUtils.d.ts +10 -0
- package/lib/typescript/src/components/Reels/utils/Controls/gestureUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/index.d.ts +5 -0
- package/lib/typescript/src/components/Reels/utils/Controls/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/overlayUtils.d.ts +12 -0
- package/lib/typescript/src/components/Reels/utils/Controls/overlayUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoControlsConstants.d.ts +24 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoControlsConstants.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoRef.d.ts +3 -0
- package/lib/typescript/src/components/Reels/utils/Controls/videoRef.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/index.d.ts +2 -0
- package/lib/typescript/src/components/Reels/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/components/Reels/utils/timeoutUtils.d.ts +14 -0
- package/lib/typescript/src/components/Reels/utils/timeoutUtils.d.ts.map +1 -0
- package/lib/typescript/src/components/Search/One.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts +2 -5
- package/lib/typescript/src/components/Search/components/SearchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Search/index.d.ts +1 -1
- package/lib/typescript/src/components/Settings/AppSettings.d.ts +2 -2
- package/lib/typescript/src/components/Settings/AppSettings.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/SubOne.d.ts.map +1 -1
- package/lib/typescript/src/components/Subscription/index.d.ts.map +1 -1
- package/lib/typescript/src/components/Text/Text.d.ts +2 -2
- package/lib/typescript/src/components/Text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts +1 -1
- package/lib/typescript/src/components/User/DeviceSessions/DeviceSessions.d.ts.map +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts +1 -1
- package/lib/typescript/src/components/User/ProfileUpdate/ProfileUpdate.d.ts.map +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts +1 -1
- package/lib/typescript/src/components/User/PurchaseHistory/PurchaseHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts +1 -1
- package/lib/typescript/src/components/User/WatchHistory/WatchHistory.d.ts.map +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts +1 -1
- package/lib/typescript/src/components/User/WatchLater/WatchLater.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts +1 -1
- package/lib/typescript/src/components/User/components/UserAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts +1 -1
- package/lib/typescript/src/components/User/components/UserSection.d.ts.map +1 -1
- package/lib/typescript/src/components/View/View.d.ts +2 -0
- package/lib/typescript/src/components/View/View.d.ts.map +1 -1
- package/lib/typescript/src/components/index.d.ts +1 -1
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/index.d.ts +14 -0
- package/lib/typescript/src/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useDebounce.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useKeyboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useNavigationMode.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePrevious.d.ts +12 -0
- package/lib/typescript/src/hooks/usePrevious.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts +15 -0
- package/lib/typescript/src/hooks/useSafeCallback.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts +11 -0
- package/lib/typescript/src/hooks/useSkeletonItems.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSplashCache.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useThemeColors.d.ts +27 -0
- package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useInternalTheme.d.ts.map +1 -1
- package/lib/typescript/src/theme/hook/useThemeStatusBar.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Styles/globalStyles.ts +0 -5
- package/src/components/Auth/AuthProvider/AuthProvider.tsx +288 -212
- package/src/components/Auth/ForgotPassword/ForgotPassword.tsx +11 -4
- package/src/components/Auth/Login/LoginWithEmail.tsx +266 -238
- package/src/components/Auth/Login/LoginWithPhone.tsx +18 -6
- package/src/components/Auth/OTP/OTP.tsx +21 -5
- package/src/components/Auth/QrLogin/QrLogin.tsx +225 -185
- package/src/components/Auth/QrLogin/components/QrViewArea.tsx +282 -166
- package/src/components/Auth/SignUp/SignUp.tsx +312 -293
- package/src/components/Auth/SplashScreen/SplashScreen.tsx +186 -131
- package/src/components/Auth/SplashScreen/components/SplashImage/SplashImage.tsx +32 -15
- package/src/components/Auth/SplashScreen/components/SplashLottie/SplashLottie.tsx +11 -5
- package/src/components/Auth/SplashScreen/components/SplashVideo/SplashVideo.tsx +34 -18
- package/src/components/BackgroundLayout/BackgroundLayout.tsx +43 -37
- package/src/components/BlogView/BlogView.tsx +66 -30
- package/src/components/BottomSheet/BottomSheet.tsx +195 -0
- package/src/components/BottomSheet/index.ts +2 -0
- package/src/components/Button/BackBtn.tsx +87 -24
- package/src/components/Button/PrimaryBtn.tsx +42 -25
- package/src/components/Button/SecondaryBtn.tsx +41 -25
- package/src/components/Button/TextButton.tsx +54 -32
- package/src/components/Content/Card/Category/Category.tsx +94 -56
- package/src/components/Content/Card/Sliders/Styles/One.tsx +63 -47
- package/src/components/Content/Card/Sliders/Styles/Two.tsx +131 -51
- package/src/components/Content/Card/Styles/RotateInOut.tsx +7 -9
- package/src/components/Content/Card/components/CardPoster.tsx +136 -55
- package/src/components/Content/Card/components/RentOrBuyIcon.tsx +58 -38
- package/src/components/Content/Card/components/ThumbnailCard.tsx +122 -47
- package/src/components/Content/Content.tsx +164 -97
- package/src/components/Content/Sections.tsx +99 -43
- package/src/components/ContentView/ContentView.tsx +194 -128
- package/src/components/ContentView/MoreContentList.tsx +215 -151
- package/src/components/ContentView/components/AboutSection.tsx +132 -93
- package/src/components/ContentView/components/CastCard.tsx +148 -138
- package/src/components/ContentView/components/EpisodeCard.tsx +160 -155
- package/src/components/ContentView/components/GenreTags.tsx +68 -53
- package/src/components/ContentView/components/HeroBanner.tsx +326 -284
- package/src/components/ContentView/components/MiniInfo.tsx +181 -159
- package/src/components/ContentView/components/PlayButton.tsx +27 -16
- package/src/components/ContentView/components/Title.tsx +89 -72
- package/src/components/ContentView/components/TrailerButton.tsx +35 -22
- package/src/components/Fallbacks/NoContentFallback.tsx +107 -103
- package/src/components/Fallbacks/NotFoundFallback.tsx +12 -4
- package/src/components/Headers/AppHeader.tsx +42 -26
- package/src/components/Headers/Three.tsx +12 -8
- package/src/components/Headers/Two.tsx +31 -10
- package/src/components/Input/InputOne.tsx +136 -108
- package/src/components/Loader/Loader.tsx +2 -2
- package/src/components/Logo/Logo.tsx +43 -27
- package/src/components/Reels/ReelsSeries/MediaControls/BottomControls.tsx +156 -0
- package/src/components/Reels/ReelsSeries/MediaControls/MediaControlsProvider.tsx +234 -0
- package/src/components/Reels/ReelsSeries/MediaControls/MiddleControls.tsx +196 -0
- package/src/components/Reels/ReelsSeries/MediaControls/RightControls.tsx +92 -0
- package/src/components/Reels/ReelsSeries/MediaControls/TopControls.tsx +163 -0
- package/src/components/Reels/ReelsSeries/Model/DetailsModal.tsx +210 -0
- package/src/components/Reels/ReelsSeries/Model/SettingModal.tsx +143 -0
- package/src/components/Reels/ReelsSeries/Model/UnlockModal.tsx +154 -0
- package/src/components/Reels/ReelsSeries/ReelsSeries.tsx +142 -74
- package/src/components/Reels/ReelsSeries/ReelsSeriesItem.tsx +349 -250
- package/src/components/Reels/ReelsSeries/components/AnimatedThreeLines.tsx +184 -0
- package/src/components/Reels/ReelsSeries/{Model → components}/Episodes.tsx +54 -33
- package/src/components/Reels/ReelsSeries/components/GradientOverlay.tsx +41 -0
- package/src/components/Reels/ReelsSeries/components/Like.tsx +40 -0
- package/src/components/Reels/ReelsSeries/components/RotatingLoader.tsx +79 -0
- package/src/components/Reels/ReelsSeries/components/Synopsis.tsx +332 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/QualityControl.tsx +190 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/SpeedControl.tsx +80 -0
- package/src/components/Reels/ReelsSeries/components/VideoControls/index.ts +2 -0
- package/src/components/Reels/ReelsSeries/types.ts +13 -2
- package/src/components/Reels/utils/Controls/gestureUtils.ts +42 -0
- package/src/components/Reels/utils/Controls/index.ts +4 -0
- package/src/components/Reels/utils/Controls/overlayUtils.ts +35 -0
- package/src/components/Reels/utils/Controls/videoControlsConstants.ts +25 -0
- package/src/components/Reels/utils/Controls/videoRef.ts +4 -0
- package/src/components/Reels/utils/index.ts +1 -0
- package/src/components/Reels/utils/timeoutUtils.ts +29 -0
- package/src/components/Search/One.tsx +2 -4
- package/src/components/Search/components/SearchCard.tsx +19 -13
- package/src/components/Settings/AppSettings.tsx +217 -128
- package/src/components/Subscription/SubOne.tsx +394 -317
- package/src/components/Text/Text.tsx +33 -22
- package/src/components/User/DeviceSessions/DeviceSessions.tsx +129 -102
- package/src/components/User/ProfileUpdate/ProfileUpdate.tsx +36 -17
- package/src/components/User/PurchaseHistory/PurchaseHistory.tsx +194 -140
- package/src/components/User/WatchHistory/WatchHistory.tsx +63 -36
- package/src/components/User/WatchLater/WatchLater.tsx +119 -81
- package/src/components/User/components/UserAvatar.tsx +49 -15
- package/src/components/User/components/UserSection.tsx +71 -37
- package/src/components/View/View.tsx +10 -2
- package/src/components/index.ts +1 -1
- package/src/hooks/index.ts +14 -0
- package/src/hooks/useDebounce.ts +25 -6
- package/src/hooks/useKeyboard.ts +12 -5
- package/src/hooks/useNavigationMode.ts +16 -5
- package/src/hooks/usePaginatedSection.ts +1 -1
- package/src/hooks/usePrevious.ts +28 -0
- package/src/hooks/useSafeCallback.ts +43 -0
- package/src/hooks/useSkeletonItems.ts +30 -0
- package/src/hooks/useSplashCache.ts +2 -1
- package/src/hooks/useThemeColors.ts +51 -0
- package/src/theme/ThemeProvider.tsx +33 -11
- package/src/theme/hook/useInternalTheme.ts +19 -13
- package/src/theme/hook/useThemeStatusBar.ts +14 -5
- package/src/theme/themes.ts +3 -3
- package/lib/module/components/Reels/ReelsSeries/Model/Episodes.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js +0 -212
- package/lib/module/components/Reels/ReelsSeries/Model/Synopsis.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js +0 -182
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesDetailsModal.js.map +0 -1
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js +0 -203
- package/lib/module/components/Reels/ReelsSeries/ReelSeriesOverlay.js.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Episodes.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts +0 -9
- package/lib/typescript/src/components/Reels/ReelsSeries/Model/Synopsis.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts +0 -13
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.d.ts.map +0 -1
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts +0 -18
- package/lib/typescript/src/components/Reels/ReelsSeries/ReelSeriesOverlay.d.ts.map +0 -1
- package/src/components/Reels/ReelsSeries/Model/Synopsis.tsx +0 -242
- package/src/components/Reels/ReelsSeries/ReelSeriesDetailsModal.tsx +0 -209
- package/src/components/Reels/ReelsSeries/ReelSeriesOverlay.tsx +0 -185
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
useState,
|
|
3
|
+
useEffect,
|
|
4
|
+
useRef,
|
|
5
|
+
useCallback,
|
|
6
|
+
useMemo,
|
|
7
|
+
memo,
|
|
8
|
+
} from 'react';
|
|
2
9
|
import { View, Dimensions, StyleSheet } from 'react-native';
|
|
3
|
-
import
|
|
4
|
-
import ReelSeriesDetailsModal from './ReelSeriesDetailsModal';
|
|
5
|
-
import type { ISeriesEpisode, ISeriesItem } from './types';
|
|
6
|
-
import { Video, type VideoRef } from 'react-native-video';
|
|
7
|
-
import FastImage from 'react-native-fast-image';
|
|
10
|
+
import { Video } from 'react-native-video';
|
|
8
11
|
import {
|
|
9
|
-
Gesture,
|
|
10
12
|
GestureDetector,
|
|
11
13
|
GestureHandlerRootView,
|
|
12
14
|
} from 'react-native-gesture-handler';
|
|
13
|
-
import { Pause, Play } from 'lucide-react-native';
|
|
14
|
-
import { moderateScale } from 'react-native-size-matters';
|
|
15
|
-
import LottieView from 'lottie-react-native';
|
|
16
|
-
import DoubleTapAnim from '../../../assets/animations/heart.json';
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
import type {
|
|
17
|
+
ILikeMoreData,
|
|
18
|
+
ISeriesEpisode,
|
|
19
|
+
ISeriesItem,
|
|
20
|
+
ModalState,
|
|
21
|
+
} from './types';
|
|
22
|
+
import type { ITheme } from '../../../theme';
|
|
23
|
+
import {
|
|
24
|
+
videoRef,
|
|
25
|
+
videoControlsStyles,
|
|
26
|
+
PAUSE_ICON_TIMEOUT,
|
|
27
|
+
LIKE_ANIM_TIMEOUT,
|
|
28
|
+
UNLOCK_MODAL_DELAY,
|
|
29
|
+
useOverlayThresholds,
|
|
30
|
+
useIsInOverlay,
|
|
31
|
+
useCreateTapGesture,
|
|
32
|
+
useCombinedGesture,
|
|
33
|
+
} from '../utils/Controls';
|
|
34
|
+
import { clearTimeoutSafely, setTimeoutSafely } from '../utils';
|
|
35
|
+
import MediaControlsProvider from './MediaControls/MediaControlsProvider';
|
|
36
|
+
import FastImage from 'react-native-fast-image';
|
|
37
|
+
|
|
38
|
+
const INITIAL_MODAL_STATE: ModalState = {
|
|
39
|
+
type: 'none',
|
|
40
|
+
isVisible: false,
|
|
41
|
+
};
|
|
19
42
|
|
|
20
43
|
interface IReelItemProps {
|
|
21
44
|
reel: ISeriesEpisode;
|
|
@@ -28,7 +51,12 @@ interface IReelItemProps {
|
|
|
28
51
|
isVisible: boolean;
|
|
29
52
|
preload: boolean;
|
|
30
53
|
activeEpisodeIndex: number;
|
|
31
|
-
onEpisodeSelect: (
|
|
54
|
+
onEpisodeSelect: (episode: ISeriesEpisode) => void;
|
|
55
|
+
theme: ITheme;
|
|
56
|
+
onBackPress?: () => void;
|
|
57
|
+
onSearchPress?: () => void;
|
|
58
|
+
onLikeMorePress?: (item: ILikeMoreData) => void;
|
|
59
|
+
onEpisodeUnlockPress?: (episode: ISeriesEpisode) => void;
|
|
32
60
|
}
|
|
33
61
|
|
|
34
62
|
const ReelItem: React.FC<IReelItemProps> = ({
|
|
@@ -38,296 +66,367 @@ const ReelItem: React.FC<IReelItemProps> = ({
|
|
|
38
66
|
videoHeight,
|
|
39
67
|
onLikePress,
|
|
40
68
|
onSharePress,
|
|
69
|
+
onBackPress,
|
|
41
70
|
isVisible,
|
|
42
71
|
preload,
|
|
43
72
|
activeEpisodeIndex,
|
|
44
73
|
onEpisodeSelect,
|
|
74
|
+
onSearchPress,
|
|
75
|
+
onLikeMorePress,
|
|
76
|
+
onEpisodeUnlockPress,
|
|
77
|
+
theme,
|
|
45
78
|
}) => {
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
const [isPaused, setIsPaused] = useState
|
|
49
|
-
const [
|
|
50
|
-
const [
|
|
79
|
+
// State
|
|
80
|
+
const [buffering, setBuffering] = useState(true);
|
|
81
|
+
const [isPaused, setIsPaused] = useState(false);
|
|
82
|
+
const [showPauseIcon, setShowPauseIcon] = useState<boolean | null>(null);
|
|
83
|
+
const [modal, setModal] = useState<ModalState>(INITIAL_MODAL_STATE);
|
|
84
|
+
const [unlockModalVisible, setUnlockModalVisible] = useState(false);
|
|
85
|
+
const [unlockModalDismissed, setUnlockModalDismissed] = useState(false);
|
|
86
|
+
const [showLikeAnim, setShowLikeAnim] = useState(false);
|
|
51
87
|
const [currentTime, setCurrentTime] = useState(0);
|
|
52
88
|
const [duration, setDuration] = useState(0);
|
|
53
|
-
const [
|
|
54
|
-
const [
|
|
89
|
+
const [playbackRate, setPlaybackRate] = useState(1);
|
|
90
|
+
const [videoQuality, setVideoQuality] = useState('Auto');
|
|
91
|
+
const [isLiked, setIsLiked] = useState(data.isLiked);
|
|
92
|
+
const [likesCount, setLikesCount] = useState(data.likes);
|
|
93
|
+
const [hasError, setHasError] = useState(false);
|
|
94
|
+
|
|
95
|
+
// Refs
|
|
96
|
+
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
97
|
+
const likeAnimTimeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
98
|
+
|
|
99
|
+
// Constants
|
|
100
|
+
const isLocked = reel.isLocked;
|
|
101
|
+
const videoUri = useMemo(() => reel.videoUrl || '', [reel.videoUrl]);
|
|
102
|
+
const thumbnail = data.thumbnail;
|
|
103
|
+
|
|
104
|
+
// Overlay thresholds
|
|
105
|
+
const { rightThreshold, bottomThreshold } = useOverlayThresholds(videoHeight);
|
|
106
|
+
|
|
107
|
+
// Computed values
|
|
108
|
+
const finalPause = useMemo(
|
|
109
|
+
() => isLocked || !isVisible || modal.isVisible || isPaused || hasError,
|
|
110
|
+
[isLocked, isVisible, modal.isVisible, isPaused, hasError]
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
const showCenterControls = useMemo(
|
|
114
|
+
() => showPauseIcon || buffering || isLocked || hasError,
|
|
115
|
+
[showPauseIcon, buffering, isLocked, hasError]
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
// Handlers
|
|
119
|
+
const closeUnlockModal = useCallback(() => {
|
|
120
|
+
setUnlockModalVisible(false);
|
|
121
|
+
setUnlockModalDismissed(true); // Prevent auto-open after manual close
|
|
122
|
+
}, []);
|
|
123
|
+
|
|
124
|
+
const closeAllModals = useCallback(() => {
|
|
125
|
+
setModal(INITIAL_MODAL_STATE);
|
|
126
|
+
closeUnlockModal();
|
|
127
|
+
}, [closeUnlockModal]);
|
|
128
|
+
|
|
129
|
+
const openUnlockModal = useCallback(() => {
|
|
130
|
+
setUnlockModalVisible(true);
|
|
131
|
+
}, []);
|
|
132
|
+
|
|
133
|
+
// Effects
|
|
134
|
+
useEffect(() => {
|
|
135
|
+
setIsLiked(data.isLiked);
|
|
136
|
+
setLikesCount(data.likes);
|
|
137
|
+
}, [data.isLiked, data.likes]);
|
|
55
138
|
|
|
56
139
|
useEffect(() => {
|
|
57
|
-
setIsPaused(!isVisible);
|
|
58
140
|
if (!isVisible) {
|
|
59
|
-
|
|
60
|
-
|
|
141
|
+
setShowPauseIcon(null);
|
|
142
|
+
setModal((prev) =>
|
|
143
|
+
prev.isVisible ? { ...prev, isVisible: false } : prev
|
|
144
|
+
);
|
|
145
|
+
setUnlockModalVisible(false);
|
|
146
|
+
setUnlockModalDismissed(false);
|
|
147
|
+
setHasError(false);
|
|
61
148
|
}
|
|
62
149
|
}, [isVisible]);
|
|
63
150
|
|
|
64
|
-
|
|
151
|
+
useEffect(() => {
|
|
152
|
+
if (isVisible && isLocked && !unlockModalVisible && !unlockModalDismissed) {
|
|
153
|
+
setIsPaused(true);
|
|
154
|
+
setUnlockModalDismissed(true);
|
|
155
|
+
}
|
|
156
|
+
}, [isVisible, isLocked, unlockModalVisible, unlockModalDismissed]);
|
|
157
|
+
|
|
65
158
|
useEffect(() => {
|
|
66
159
|
return () => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
160
|
+
clearTimeoutSafely(timeoutRef);
|
|
161
|
+
clearTimeoutSafely(likeAnimTimeoutRef);
|
|
70
162
|
};
|
|
71
163
|
}, []);
|
|
72
164
|
|
|
73
|
-
const videoUri = reel.videoUrl || '';
|
|
74
|
-
// Handle like
|
|
75
165
|
const handleLikePress = useCallback(() => {
|
|
76
|
-
const newLiked = !
|
|
166
|
+
const newLiked = !isLiked;
|
|
167
|
+
const newCount = newLiked ? likesCount + 1 : Math.max(0, likesCount - 1);
|
|
168
|
+
|
|
169
|
+
setIsLiked(newLiked);
|
|
170
|
+
setLikesCount(newCount);
|
|
171
|
+
|
|
172
|
+
// Update data object for parent component
|
|
77
173
|
data.isLiked = newLiked;
|
|
78
|
-
data.likes
|
|
174
|
+
data.likes = newCount;
|
|
175
|
+
|
|
79
176
|
if (newLiked) {
|
|
80
177
|
setShowLikeAnim(true);
|
|
81
|
-
|
|
178
|
+
setTimeoutSafely(
|
|
179
|
+
likeAnimTimeoutRef,
|
|
180
|
+
() => setShowLikeAnim(false),
|
|
181
|
+
LIKE_ANIM_TIMEOUT
|
|
182
|
+
);
|
|
82
183
|
}
|
|
184
|
+
|
|
83
185
|
onLikePress?.(reel.episodeId, newLiked);
|
|
84
|
-
}, [data, onLikePress, reel.episodeId]);
|
|
186
|
+
}, [isLiked, likesCount, data, onLikePress, reel.episodeId]);
|
|
85
187
|
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
188
|
+
const handleTogglePlay = useCallback(() => {
|
|
189
|
+
setIsPaused((prev) => !prev);
|
|
190
|
+
setShowPauseIcon(true);
|
|
191
|
+
if (isPaused) {
|
|
192
|
+
setTimeoutSafely(
|
|
193
|
+
timeoutRef,
|
|
194
|
+
() => setShowPauseIcon(false),
|
|
195
|
+
PAUSE_ICON_TIMEOUT
|
|
196
|
+
);
|
|
197
|
+
} else {
|
|
198
|
+
setShowPauseIcon(true);
|
|
90
199
|
}
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
200
|
+
}, [isPaused]);
|
|
201
|
+
|
|
202
|
+
const handleEpisodeSelect = useCallback(
|
|
203
|
+
(episode: ISeriesEpisode) => {
|
|
204
|
+
closeAllModals();
|
|
205
|
+
if (episode.isLocked) {
|
|
206
|
+
setTimeout(() => openUnlockModal(), UNLOCK_MODAL_DELAY);
|
|
207
|
+
} else {
|
|
208
|
+
onEpisodeSelect(episode);
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
[closeAllModals, onEpisodeSelect, openUnlockModal]
|
|
212
|
+
);
|
|
96
213
|
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
214
|
+
const handleVideoEnd = useCallback(() => {
|
|
215
|
+
if (!autoScroll) return;
|
|
216
|
+
const nextEpisode = data.episodes?.[activeEpisodeIndex + 1];
|
|
217
|
+
if (nextEpisode) {
|
|
218
|
+
onEpisodeSelect(nextEpisode);
|
|
219
|
+
}
|
|
220
|
+
}, [autoScroll, data.episodes, activeEpisodeIndex, onEpisodeSelect]);
|
|
221
|
+
|
|
222
|
+
// Gestures
|
|
223
|
+
const handleLockedTap = useCallback(() => {
|
|
224
|
+
closeAllModals();
|
|
225
|
+
openUnlockModal();
|
|
226
|
+
}, [closeAllModals, openUnlockModal]);
|
|
227
|
+
|
|
228
|
+
const isInOverlay = useIsInOverlay(rightThreshold, bottomThreshold);
|
|
229
|
+
const createTapGesture = useCreateTapGesture(
|
|
230
|
+
isInOverlay,
|
|
231
|
+
isLocked,
|
|
232
|
+
handleLockedTap
|
|
233
|
+
);
|
|
102
234
|
|
|
103
|
-
|
|
235
|
+
const singleTap = useMemo(
|
|
236
|
+
() => createTapGesture(handleTogglePlay),
|
|
237
|
+
[createTapGesture, handleTogglePlay]
|
|
238
|
+
);
|
|
104
239
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
240
|
+
const doubleTap = useMemo(
|
|
241
|
+
() => createTapGesture(handleLikePress, 2),
|
|
242
|
+
[createTapGesture, handleLikePress]
|
|
243
|
+
);
|
|
109
244
|
|
|
110
|
-
|
|
111
|
-
timeoutRef.current = setTimeout(() => {
|
|
112
|
-
if (currentState === 'play') {
|
|
113
|
-
setPaused(null);
|
|
114
|
-
}
|
|
115
|
-
}, 700);
|
|
245
|
+
const combinedGesture = useCombinedGesture(singleTap, doubleTap);
|
|
116
246
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
247
|
+
// Memoized props objects
|
|
248
|
+
const unlockProps = useMemo(
|
|
249
|
+
() => ({
|
|
250
|
+
isVisible: unlockModalVisible,
|
|
251
|
+
onClose: closeUnlockModal,
|
|
252
|
+
}),
|
|
253
|
+
[unlockModalVisible, closeUnlockModal]
|
|
254
|
+
);
|
|
120
255
|
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
256
|
+
const contentProps = useMemo(
|
|
257
|
+
() => ({
|
|
258
|
+
series: data,
|
|
259
|
+
episode: reel,
|
|
260
|
+
activeIndex: activeEpisodeIndex,
|
|
261
|
+
}),
|
|
262
|
+
[data, reel, activeEpisodeIndex]
|
|
263
|
+
);
|
|
128
264
|
|
|
129
|
-
|
|
130
|
-
|
|
265
|
+
const videoProps = useMemo(
|
|
266
|
+
() => ({
|
|
267
|
+
currentTime,
|
|
268
|
+
duration,
|
|
269
|
+
paused: finalPause,
|
|
270
|
+
buffering,
|
|
271
|
+
showCenterControls,
|
|
272
|
+
isLocked,
|
|
273
|
+
hasError,
|
|
274
|
+
}),
|
|
275
|
+
[
|
|
276
|
+
currentTime,
|
|
277
|
+
duration,
|
|
278
|
+
finalPause,
|
|
279
|
+
buffering,
|
|
280
|
+
showCenterControls,
|
|
281
|
+
isLocked,
|
|
282
|
+
hasError,
|
|
283
|
+
]
|
|
284
|
+
);
|
|
131
285
|
|
|
132
|
-
|
|
133
|
-
|
|
286
|
+
const likesProps = useMemo(
|
|
287
|
+
() => ({
|
|
288
|
+
liked: isLiked,
|
|
289
|
+
count: likesCount,
|
|
290
|
+
showAnimation: showLikeAnim,
|
|
291
|
+
}),
|
|
292
|
+
[isLiked, likesCount, showLikeAnim]
|
|
293
|
+
);
|
|
134
294
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const rightIconsArea = x > screenWidth - 80;
|
|
154
|
-
|
|
155
|
-
// Bottom area (bottom 150px)
|
|
156
|
-
const bottomArea = y > screenHeight - 150;
|
|
157
|
-
|
|
158
|
-
// If tap is in overlay area, don't trigger like
|
|
159
|
-
if (rightIconsArea || bottomArea) {
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
295
|
+
const actionsProps = useMemo(
|
|
296
|
+
() => ({
|
|
297
|
+
onLike: handleLikePress,
|
|
298
|
+
onEpisodeSelect: handleEpisodeSelect,
|
|
299
|
+
onLikeMore: onLikeMorePress,
|
|
300
|
+
onShare: onSharePress,
|
|
301
|
+
onUnLock: openUnlockModal,
|
|
302
|
+
onUnlockPress: onEpisodeUnlockPress,
|
|
303
|
+
}),
|
|
304
|
+
[
|
|
305
|
+
handleLikePress,
|
|
306
|
+
handleEpisodeSelect,
|
|
307
|
+
onLikeMorePress,
|
|
308
|
+
onSharePress,
|
|
309
|
+
onEpisodeUnlockPress,
|
|
310
|
+
openUnlockModal,
|
|
311
|
+
]
|
|
312
|
+
);
|
|
162
313
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
314
|
+
const navigationProps = useMemo(
|
|
315
|
+
() => ({
|
|
316
|
+
onBack: onBackPress,
|
|
317
|
+
onSearch: onSearchPress,
|
|
318
|
+
}),
|
|
319
|
+
[onBackPress, onSearchPress]
|
|
320
|
+
);
|
|
166
321
|
|
|
167
|
-
const
|
|
322
|
+
const settingsProps = useMemo(
|
|
323
|
+
() => ({
|
|
324
|
+
playbackRate,
|
|
325
|
+
quality: videoQuality,
|
|
326
|
+
onPlaybackRateChange: setPlaybackRate,
|
|
327
|
+
onQualityChange: setVideoQuality,
|
|
328
|
+
}),
|
|
329
|
+
[playbackRate, videoQuality]
|
|
330
|
+
);
|
|
168
331
|
|
|
332
|
+
// ----------------------- RENDER -----------------------
|
|
169
333
|
return (
|
|
170
|
-
<View
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
{
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
source={{ uri: videoUri }}
|
|
196
|
-
style={StyleSheet.absoluteFillObject}
|
|
197
|
-
resizeMode="cover"
|
|
198
|
-
posterResizeMode="cover"
|
|
199
|
-
repeat
|
|
200
|
-
paused={isPaused}
|
|
201
|
-
onLoad={(e) => setDuration(e.duration)}
|
|
202
|
-
onProgress={({ currentTime: ct }) => setCurrentTime(ct)}
|
|
203
|
-
ignoreSilentSwitch="ignore"
|
|
204
|
-
playWhenInactive={false}
|
|
205
|
-
playInBackground={false}
|
|
206
|
-
controls={false}
|
|
207
|
-
controlsStyles={{
|
|
208
|
-
hideForward: true,
|
|
209
|
-
hideDuration: true,
|
|
210
|
-
hideFullscreen: true,
|
|
211
|
-
hidePlayPause: true,
|
|
212
|
-
hideNavigationBarOnFullScreenMode: true,
|
|
213
|
-
hideNotificationBarOnFullScreenMode: true,
|
|
214
|
-
hideNext: true,
|
|
215
|
-
hidePosition: true,
|
|
216
|
-
hidePrevious: true,
|
|
217
|
-
hideRewind: true,
|
|
218
|
-
hideSeekBar: true,
|
|
219
|
-
hideSettingButton: true,
|
|
220
|
-
}}
|
|
221
|
-
disableFocus={true}
|
|
222
|
-
shutterColor="transparent"
|
|
223
|
-
onReadyForDisplay={handleVideoLoad}
|
|
224
|
-
onEnd={() => {
|
|
225
|
-
if (autoScroll) {
|
|
226
|
-
onEpisodeSelect(activeEpisodeIndex + 1);
|
|
227
|
-
}
|
|
228
|
-
}}
|
|
229
|
-
/>
|
|
230
|
-
) : null}
|
|
231
|
-
|
|
232
|
-
{showLikeAnim && (
|
|
233
|
-
<View style={styles.lottieContainer}>
|
|
234
|
-
<LottieView
|
|
235
|
-
style={styles.lottie}
|
|
236
|
-
source={DoubleTapAnim}
|
|
237
|
-
autoPlay
|
|
238
|
-
loop={false}
|
|
334
|
+
<View style={[styles.container, { height: videoHeight }]}>
|
|
335
|
+
<MediaControlsProvider
|
|
336
|
+
theme={theme}
|
|
337
|
+
modal={modal}
|
|
338
|
+
setModal={setModal}
|
|
339
|
+
unlock={unlockProps}
|
|
340
|
+
content={contentProps}
|
|
341
|
+
video={videoProps}
|
|
342
|
+
likes={likesProps}
|
|
343
|
+
actions={actionsProps}
|
|
344
|
+
navigation={navigationProps}
|
|
345
|
+
settings={settingsProps}
|
|
346
|
+
>
|
|
347
|
+
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
348
|
+
<GestureDetector gesture={combinedGesture}>
|
|
349
|
+
<View style={{ flex: 1 }}>
|
|
350
|
+
{buffering && (
|
|
351
|
+
<FastImage
|
|
352
|
+
source={{
|
|
353
|
+
uri: thumbnail,
|
|
354
|
+
priority: FastImage.priority.high,
|
|
355
|
+
}}
|
|
356
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
357
|
+
defaultSource={require('../../../assets/img/play.png')}
|
|
358
|
+
style={StyleSheet.absoluteFillObject}
|
|
239
359
|
/>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
)}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
onEpisodeSelect={handleEpisodeSelect}
|
|
283
|
-
/>
|
|
284
|
-
</View>
|
|
285
|
-
</GestureDetector>
|
|
286
|
-
</GestureHandlerRootView>
|
|
360
|
+
)}
|
|
361
|
+
{(isVisible || preload) && (
|
|
362
|
+
<Video
|
|
363
|
+
ref={videoRef}
|
|
364
|
+
source={{ uri: videoUri }}
|
|
365
|
+
paused={finalPause}
|
|
366
|
+
repeat
|
|
367
|
+
resizeMode="cover"
|
|
368
|
+
poster={thumbnail}
|
|
369
|
+
posterResizeMode="cover"
|
|
370
|
+
rate={playbackRate}
|
|
371
|
+
onLoadStart={() => {
|
|
372
|
+
setBuffering(true);
|
|
373
|
+
setHasError(false);
|
|
374
|
+
}}
|
|
375
|
+
onBuffer={({ isBuffering }) => setBuffering(isBuffering)}
|
|
376
|
+
onReadyForDisplay={() => {
|
|
377
|
+
setBuffering(false);
|
|
378
|
+
setHasError(false);
|
|
379
|
+
}}
|
|
380
|
+
onLoad={(info) => {
|
|
381
|
+
setDuration(info.duration);
|
|
382
|
+
setHasError(false);
|
|
383
|
+
}}
|
|
384
|
+
onProgress={(p) => setCurrentTime(p.currentTime)}
|
|
385
|
+
onEnd={handleVideoEnd}
|
|
386
|
+
style={StyleSheet.absoluteFillObject}
|
|
387
|
+
controls={false}
|
|
388
|
+
controlsStyles={videoControlsStyles}
|
|
389
|
+
ignoreSilentSwitch="ignore"
|
|
390
|
+
playInBackground={false}
|
|
391
|
+
onError={() => {
|
|
392
|
+
setBuffering(false);
|
|
393
|
+
setHasError(true);
|
|
394
|
+
setIsPaused(true);
|
|
395
|
+
}}
|
|
396
|
+
/>
|
|
397
|
+
)}
|
|
398
|
+
</View>
|
|
399
|
+
</GestureDetector>
|
|
400
|
+
</GestureHandlerRootView>
|
|
401
|
+
</MediaControlsProvider>
|
|
287
402
|
</View>
|
|
288
403
|
);
|
|
289
404
|
};
|
|
290
405
|
|
|
291
|
-
|
|
406
|
+
// Memo comparison
|
|
407
|
+
const areEqual = (prev: IReelItemProps, next: IReelItemProps) => {
|
|
292
408
|
return (
|
|
293
|
-
|
|
294
|
-
|
|
409
|
+
prev.reel.episodeId === next.reel.episodeId &&
|
|
410
|
+
prev.isVisible === next.isVisible &&
|
|
411
|
+
prev.preload === next.preload &&
|
|
412
|
+
prev.activeEpisodeIndex === next.activeEpisodeIndex &&
|
|
413
|
+
prev.videoHeight === next.videoHeight &&
|
|
414
|
+
prev.data.isLiked === next.data.isLiked &&
|
|
415
|
+
prev.data.likes === next.data.likes &&
|
|
416
|
+
prev.reel.isLocked === next.reel.isLocked &&
|
|
417
|
+
prev.reel.videoUrl === next.reel.videoUrl &&
|
|
418
|
+
prev.isVisible === next.isVisible
|
|
295
419
|
);
|
|
296
420
|
};
|
|
297
421
|
|
|
298
422
|
export default memo(ReelItem, areEqual);
|
|
299
423
|
|
|
424
|
+
const { width } = Dimensions.get('window');
|
|
425
|
+
|
|
300
426
|
const styles = StyleSheet.create({
|
|
301
427
|
container: {
|
|
302
428
|
width,
|
|
303
|
-
position: 'relative',
|
|
304
429
|
overflow: 'hidden',
|
|
305
|
-
|
|
306
|
-
flexGrow: 1,
|
|
307
|
-
},
|
|
308
|
-
playPauseButtonContainer: {
|
|
309
|
-
position: 'absolute',
|
|
310
|
-
top: 0,
|
|
311
|
-
left: 0,
|
|
312
|
-
right: 0,
|
|
313
|
-
bottom: 0,
|
|
314
|
-
justifyContent: 'center',
|
|
315
|
-
alignItems: 'center',
|
|
316
|
-
},
|
|
317
|
-
shadow: {
|
|
318
|
-
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
319
|
-
padding: moderateScale(10),
|
|
320
|
-
borderRadius: moderateScale(50),
|
|
321
|
-
},
|
|
322
|
-
lottieContainer: {
|
|
323
|
-
width: '100%',
|
|
324
|
-
height: '100%',
|
|
325
|
-
position: 'absolute',
|
|
326
|
-
justifyContent: 'center',
|
|
327
|
-
alignItems: 'center',
|
|
328
|
-
},
|
|
329
|
-
lottie: {
|
|
330
|
-
width: '100%',
|
|
331
|
-
height: '100%',
|
|
430
|
+
backgroundColor: '#000',
|
|
332
431
|
},
|
|
333
432
|
});
|