@applicaster/zapp-react-native-ui-components 13.0.0-alpha.2040752175 → 13.0.0-alpha.2101002115
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/Components/AppContainer/__tests__/AppContainer.test.js +4 -6
- package/Components/AppContainer/__tests__/__snapshots__/AppContainer.test.js.snap +1 -1
- package/Components/AudioPlayer/AudioPlayer.tsx +7 -0
- package/Components/AudioPlayer/__tests__/Runtime.test.js +5 -8
- package/Components/AudioPlayer/__tests__/__snapshots__/Runtime.test.js.snap +4 -4
- package/Components/AudioPlayer/__tests__/__snapshots__/artWork.test.js.snap +3 -3
- package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayer.test.js.snap +56 -113
- package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +39 -23
- package/Components/AudioPlayer/__tests__/__snapshots__/channel.test.js.snap +3 -3
- package/Components/AudioPlayer/__tests__/__snapshots__/summary.test.js.snap +2 -2
- package/Components/AudioPlayer/__tests__/__snapshots__/title.test.js.snap +2 -2
- package/Components/AudioPlayer/__tests__/artWork.test.js +3 -5
- package/Components/AudioPlayer/__tests__/audioPlayer.test.js +3 -5
- package/Components/AudioPlayer/__tests__/audioPlayerLayout.test.js +7 -8
- package/Components/AudioPlayer/__tests__/channel.test.js +3 -5
- package/Components/AudioPlayer/__tests__/summary.test.js +3 -5
- package/Components/AudioPlayer/__tests__/title.test.js +3 -5
- package/Components/AudioPlayer/helpers.tsx +1 -0
- package/Components/BaseFocusable/index.ios.ts +1 -1
- package/Components/BaseFocusable/index.tsx +67 -31
- package/Components/Cell/Cell.tsx +15 -9
- package/Components/Cell/CellWithFocusable.tsx +44 -59
- package/Components/Cell/TvOSCellComponent.tsx +23 -30
- package/Components/Cell/__tests__/CellWIthFocusable.test.js +13 -6
- package/Components/Cell/index.js +3 -1
- package/Components/CellRendererResolver/__tests__/cellRendererResolver.test.js +50 -50
- package/Components/ComponentResolver/__tests__/__snapshots__/componentResolver.test.js.snap +1 -42
- package/Components/ComponentResolver/__tests__/componentResolver.test.js +26 -30
- package/Components/ContentScreen/__tests__/contentScreen.test.js +3 -3
- package/Components/DisplayState/__tests__/__snapshots__/displayState.test.js.snap +2 -2
- package/Components/ErrorScreen/index.tsx +6 -6
- package/Components/Focusable/Focusable.tsx +1 -54
- package/Components/Focusable/FocusableTvOS.tsx +6 -2
- package/Components/Focusable/Touchable.tsx +19 -20
- package/Components/Focusable/index.android.tsx +10 -3
- package/Components/FocusableGroup/FocusableTvOS.tsx +34 -86
- package/Components/FocusableGroup/index.tsx +0 -3
- package/Components/FocusableList/index.tsx +26 -10
- package/Components/FocusableScrollView/index.tsx +43 -13
- package/Components/GeneralContentScreen/utils/__tests__/useCurationAPI.test.js +9 -0
- package/Components/GeneralContentScreen/utils/useCurationAPI.ts +1 -1
- package/Components/Layout/TV/NavBarContainer.tsx +19 -23
- package/Components/Layout/TV/ScreenContainer.tsx +8 -1
- package/Components/Layout/TV/ScreenLayoutContextProvider.tsx +5 -0
- package/Components/Layout/TV/__tests__/ScreenContainer.test.tsx +3 -1
- package/Components/Layout/TV/__tests__/__snapshots__/LayoutContainer.test.tsx.snap +1 -1
- package/Components/Layout/TV/__tests__/__snapshots__/NavBarContainer.test.tsx.snap +6 -5
- package/Components/Layout/TV/__tests__/__snapshots__/ScreenContainer.test.tsx.snap +12 -11
- package/Components/Layout/TV/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/Components/Layout/TV/__tests__/index.test.tsx +7 -3
- package/Components/MasterCell/DefaultComponents/ActionButton.tsx +2 -3
- package/Components/MasterCell/DefaultComponents/BorderContainerView/__tests__/index.test.tsx +66 -0
- package/Components/MasterCell/DefaultComponents/BorderContainerView/index.tsx +4 -1
- package/Components/MasterCell/DefaultComponents/Image/Image.ios.tsx +6 -12
- package/Components/MasterCell/DefaultComponents/ImageBorderContainer/__tests__/index.test.ts +93 -0
- package/Components/MasterCell/DefaultComponents/LiveImage/index.tsx +2 -2
- package/Components/MasterCell/DefaultComponents/SecondaryImage/__tests__/__snapshots__/Image.test.tsx.snap +3 -3
- package/Components/MasterCell/DefaultComponents/SecondaryImage/utils.ts +1 -1
- package/Components/MasterCell/DefaultComponents/__tests__/image.test.js +1 -1
- package/Components/MasterCell/SharedUI/CollapsibleTextContainer/__tests__/__snapshots__/index.test.tsx.snap +1 -1
- package/Components/MasterCell/SharedUI/ProgressBar/hooks/useFillInPercent.ts +2 -8
- package/Components/MasterCell/__tests__/__snapshots__/dataAdapter.test.js.snap +180 -180
- package/Components/MasterCell/__tests__/__snapshots__/elementMapper.test.js.snap +11 -19
- package/Components/MasterCell/__tests__/__snapshots__/masterCell.test.js.snap +6 -235
- package/Components/MasterCell/__tests__/elementMapper.test.js +18 -5
- package/Components/MasterCell/__tests__/masterCell.test.js +26 -26
- package/Components/MasterCell/hooks/useAsyncRendering/MasterCellAsyncRenderManager.ts +2 -2
- package/Components/MasterCell/hooks/useAsyncRendering/index.ts +2 -2
- package/Components/MasterCell/utils/behaviorProvider.ts +133 -0
- package/Components/MasterCell/utils/index.ts +4 -130
- package/Components/ModalComponent/Button/index.tsx +6 -6
- package/Components/ModalComponent/Header/index.tsx +3 -3
- package/Components/NativeFocusables/{index.js → index.ts} +4 -2
- package/Components/OfflineHandler/NotificationView/NotificationView.lg.tsx +2 -2
- package/Components/OfflineHandler/NotificationView/NotificationView.samsung.tsx +2 -2
- package/Components/OfflineHandler/NotificationView/__tests__/index.test.tsx +0 -5
- package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +7 -7
- package/Components/OfflineHandler/__tests__/index.test.tsx +28 -25
- package/Components/PlayerContainer/PlayerContainer.tsx +22 -24
- package/Components/PlayerContainer/PlayerContainerContext.tsx +9 -0
- package/Components/PlayerContainer/ProgramInfo/index.tsx +2 -2
- package/Components/PlayerImageBackground/index.tsx +1 -1
- package/Components/River/ComponentsMap/ComponentsMap.tsx +42 -65
- package/Components/River/ComponentsMap/hooks/useLoadingState.ts +78 -51
- package/Components/River/RefreshControl.tsx +1 -1
- package/Components/River/RiverFooter.tsx +39 -9
- package/Components/River/RiverItem.tsx +37 -2
- package/Components/River/TV/index.tsx +6 -1
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +114 -45
- package/Components/River/__tests__/__snapshots__/river.test.js.snap +21 -83
- package/Components/River/__tests__/componentsMap.test.js +64 -17
- package/Components/River/__tests__/river.test.js +75 -40
- package/Components/RouteManager/__tests__/__snapshots__/routeManager.test.js.snap +12 -5
- package/Components/RouteManager/__tests__/routeManager.test.js +29 -14
- package/Components/RouteManager/__tests__/testId.test.js +8 -6
- package/Components/Screen/TV/index.web.tsx +5 -6
- package/Components/Screen/__tests__/Screen.test.tsx +41 -27
- package/Components/Screen/__tests__/__snapshots__/Screen.test.tsx.snap +4 -4
- package/Components/Screen/hooks.ts +53 -0
- package/Components/Screen/index.tsx +16 -42
- package/Components/ScreenResolver/__tests__/screenResolver.test.js +95 -70
- package/Components/Tabs/Tab.tsx +12 -9
- package/Components/TextInputTv/__tests__/TextInputTv.test.js +42 -42
- package/Components/TextInputTv/__tests__/__snapshots__/TextInputTv.test.js.snap +7 -0
- package/Components/TextInputTv/index.tsx +6 -5
- package/Components/Touchable/__tests__/__snapshots__/touchable.test.tsx.snap +2 -2
- package/Components/TrackedView/index.tsx +1 -0
- package/Components/Transitioner/AnimationManager.js +15 -15
- package/Components/Transitioner/Scene.tsx +53 -24
- package/Components/Transitioner/Transitioner.tsx +3 -3
- package/Components/Transitioner/__tests__/Scene.test.js +25 -14
- package/Components/Transitioner/__tests__/__snapshots__/AnimationManager.test.js.snap +26 -26
- package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +10 -50
- package/Components/Transitioner/__tests__/__snapshots__/config.test.js.snap +20 -20
- package/Components/Transitioner/__tests__/__snapshots__/transitioner.test.js.snap +4 -4
- package/Components/Transitioner/__tests__/transitioner.test.js +13 -4
- package/Components/Transitioner/index.js +8 -4
- package/Components/VideoLive/LiveImageManager.ts +27 -1
- package/Components/VideoLive/PlayerLiveImageComponent.tsx +36 -24
- package/Components/VideoLive/__tests__/PlayerLiveImageComponent.test.tsx +63 -8
- package/Components/VideoLive/__tests__/__snapshots__/PlayerLiveImageComponent.test.tsx.snap +6 -10
- package/Components/VideoModal/ModalAnimation/AnimatedPlayerModalWrapper.tsx +1 -1
- package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +49 -31
- package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.tsx +8 -4
- package/Components/VideoModal/ModalAnimation/AnimationComponent.tsx +32 -18
- package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +8 -15
- package/Components/VideoModal/ModalAnimation/index.ts +2 -1
- package/Components/VideoModal/ModalAnimation/useModalAnimationContext.ts +6 -0
- package/Components/VideoModal/ModalAnimation/utils.ts +2 -2
- package/Components/VideoModal/OpaqueLayer.tsx +33 -0
- package/Components/VideoModal/PlayerDetails.tsx +9 -6
- package/Components/VideoModal/PlayerWrapper.tsx +17 -36
- package/Components/VideoModal/VideoModal.tsx +14 -23
- package/Components/VideoModal/__tests__/PlayerDetails.test.tsx +5 -2
- package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +13 -10
- package/Components/VideoModal/__tests__/__snapshots__/PlayerDetails.test.tsx.snap +4 -4
- package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +66 -156
- package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +89 -0
- package/Components/VideoModal/hooks/index.ts +7 -0
- package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +49 -0
- package/Components/VideoModal/hooks/utils/__tests__/showDetails.test.ts +91 -0
- package/Components/VideoModal/hooks/utils/index.ts +33 -0
- package/Components/VideoModal/utils.ts +3 -5
- package/Components/Viewport/ViewportAware/__tests__/__snapshots__/viewportAware.test.js.snap +24 -36
- package/Components/Viewport/ViewportAware/__tests__/viewportAware.test.js +12 -18
- package/Components/Viewport/ViewportTracker/__tests__/__snapshots__/viewportTracker.test.js.snap +1 -1
- package/Components/Viewport/__tests__/utils.test.js +5 -4
- package/Components/ZappUIComponent/Placeholder.tsx +3 -1
- package/Components/ZappUIComponent/__tests__/{ZappUIComponent.test.js → ZappUIComponent.test.tsx} +26 -10
- package/Components/ZappUIComponent/index.tsx +3 -16
- package/Components/default-cell-renderer/__tests__/defaultCellRenderer.test.tsx +20 -17
- package/Components/default-cell-renderer/viewTrees/tv/DefaultCell/__tests__/DefaultCell.test.tsx +15 -11
- package/Contexts/ComponentsMapOffsetContext/index.tsx +49 -0
- package/Contexts/ConfigutaionContext/__tests__/__snapshots__/ConfigurationProvider.test.tsx.snap +1 -1
- package/Contexts/FocusableGroupContext/withFocusableContext.tsx +4 -10
- package/Contexts/HeaderOffsetContext/index.tsx +4 -6
- package/Contexts/ScreenContext/index.tsx +6 -12
- package/Contexts/ScreenLayoutContext/index.tsx +5 -3
- package/Decorators/Analytics/{index.js → index.tsx} +11 -11
- package/Decorators/Navigator/__tests__/navigator.test.js +16 -16
- package/Decorators/Navigator/index.tsx +1 -1
- package/Decorators/RiverFeedLoader/__tests__/__snapshots__/riverFeedLoader.test.tsx.snap +77 -77
- package/Decorators/RiverFeedLoader/__tests__/riverFeedLoader.test.tsx +34 -39
- package/Decorators/RiverFeedLoader/__tests__/utils.test.ts +0 -9
- package/Decorators/RiverFeedLoader/index.tsx +1 -1
- package/Decorators/RiverFeedLoader/utils/getDatasourceUrl.ts +39 -0
- package/Decorators/RiverFeedLoader/utils/index.ts +29 -0
- package/Decorators/RiverFeedLoader/utils/usePipesContexts.ts +40 -0
- package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +27 -27
- package/Decorators/RiverResolver/index.tsx +6 -8
- package/Decorators/ZappPipesDataConnector/__tests__/Hero.js +1 -1
- package/Decorators/ZappPipesDataConnector/__tests__/zappPipesDataConnector.test.js +29 -22
- package/Decorators/ZappPipesDataConnector/index.tsx +5 -2
- package/package.json +13 -10
- package/tsconfig.json +2 -3
- package/Components/CellRendererResolver/__tests__/__snapshots__/cellRendererResolver.test.js.snap +0 -53
- package/Components/RouteManager/__tests__/__snapshots__/testId.test.js.snap +0 -17
- package/Components/ScreenResolver/__tests__/__snapshots__/screenResolver.test.js.snap +0 -17
- package/Components/ZappUIComponent/__tests__/__snapshots__/ZappUIComponent.test.js.snap +0 -91
- package/Components/default-cell-renderer/__tests__/__snapshots__/defaultCellRenderer.test.tsx.snap +0 -338
- package/Decorators/Navigator/__tests__/__snapshots__/navigator.test.js.snap +0 -18
- package/Decorators/RiverFeedLoader/utils.ts +0 -100
- package/Decorators/RiverResolver/__tests__/__snapshots__/riverResolver.test.tsx.snap +0 -28
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Animated, StyleSheet, View
|
|
2
|
+
import { Animated, Platform, StyleSheet, View } from "react-native";
|
|
3
3
|
|
|
4
4
|
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
5
5
|
import {
|
|
6
|
+
GestureHandlerRootView,
|
|
6
7
|
NativeViewGestureHandler,
|
|
7
8
|
PanGestureHandler,
|
|
8
9
|
State,
|
|
9
10
|
TapGestureHandler,
|
|
10
|
-
GestureHandlerRootView,
|
|
11
11
|
} from "react-native-gesture-handler";
|
|
12
12
|
|
|
13
13
|
import { PlayerContainerContext } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainerContext";
|
|
14
14
|
import {
|
|
15
|
-
useModalAnimationContext,
|
|
16
15
|
PlayerAnimationStateEnum,
|
|
16
|
+
useModalAnimationContext,
|
|
17
17
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
18
18
|
import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
19
19
|
import { usePrevious } from "@applicaster/zapp-react-native-utils/reactHooks/utils";
|
|
20
20
|
|
|
21
21
|
import {
|
|
22
|
-
setScrollModalAnimatedValue,
|
|
23
22
|
resetScrollAnimatedValues,
|
|
23
|
+
setScrollModalAnimatedValue,
|
|
24
24
|
} from "./utils";
|
|
25
25
|
|
|
26
26
|
const getAnimatedConfig = (toValue) => {
|
|
@@ -62,25 +62,34 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
62
62
|
} = useModalAnimationContext();
|
|
63
63
|
|
|
64
64
|
const [enableGesture, setIEnableGesture] = React.useState<boolean>(true);
|
|
65
|
-
|
|
65
|
+
|
|
66
|
+
const { isLanguageOverlayVisible, isSeekBarTouch } = React.useContext(
|
|
67
|
+
PlayerContainerContext
|
|
68
|
+
);
|
|
66
69
|
|
|
67
70
|
const { maximiseVideoModal, minimiseVideoModal, videoModalState } =
|
|
68
71
|
useNavigation();
|
|
69
72
|
|
|
70
|
-
const {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
const {
|
|
74
|
+
mode: videoModalMode,
|
|
75
|
+
previousMode: previousVideoModalMode,
|
|
76
|
+
item: videoModalItem,
|
|
77
|
+
} = videoModalState;
|
|
78
|
+
|
|
79
|
+
const isMaximizedModal: boolean = videoModalMode === "MAXIMIZED";
|
|
80
|
+
const isMinimizedModal: boolean = videoModalMode === "MINIMIZED";
|
|
73
81
|
const previousItemId = usePrevious(videoModalItem?.id);
|
|
74
82
|
|
|
75
83
|
const isNotMinimizeMaximazeAnimation =
|
|
76
84
|
playerAnimationState !== PlayerAnimationStateEnum.minimize &&
|
|
77
|
-
playerAnimationState !== PlayerAnimationStateEnum.
|
|
85
|
+
playerAnimationState !== PlayerAnimationStateEnum.maximize;
|
|
78
86
|
|
|
79
87
|
const isEnablePanGesture =
|
|
80
88
|
enableGesture &&
|
|
81
89
|
!isLanguageOverlayVisible &&
|
|
82
90
|
isNotMinimizeMaximazeAnimation &&
|
|
83
|
-
|
|
91
|
+
!isSeekBarTouch &&
|
|
92
|
+
(isMaximizedModal || isMinimizedModal);
|
|
84
93
|
|
|
85
94
|
const isAudioItem = React.useMemo(
|
|
86
95
|
() =>
|
|
@@ -117,7 +126,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
117
126
|
const preparedTranslationY =
|
|
118
127
|
Math.abs(translationY) - lastScrollYValue.current;
|
|
119
128
|
|
|
120
|
-
if (
|
|
129
|
+
if (isMaximizedModal) {
|
|
121
130
|
const endOffsetY =
|
|
122
131
|
lastSnap + preparedTranslationY + dragToss * velocityY + 150;
|
|
123
132
|
|
|
@@ -133,14 +142,14 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
133
142
|
|
|
134
143
|
setLastSnap(destSnapPoint);
|
|
135
144
|
|
|
136
|
-
if (destSnapPoint === modalSnapPoints[0]) {
|
|
145
|
+
if (destSnapPoint === modalSnapPoints[0] && isMinimizedModal) {
|
|
137
146
|
translateYOffset.extractOffset();
|
|
138
147
|
translateYOffset.setValue(preparedTranslationY);
|
|
139
148
|
translateYOffset.flattenOffset();
|
|
140
149
|
dragScrollY.setValue(0);
|
|
141
150
|
|
|
142
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
143
|
-
} else {
|
|
151
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
152
|
+
} else if (destSnapPoint !== modalSnapPoints[0] && isMaximizedModal) {
|
|
144
153
|
setPlayerAnimationState(PlayerAnimationStateEnum.minimize);
|
|
145
154
|
}
|
|
146
155
|
} else {
|
|
@@ -154,7 +163,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
154
163
|
|
|
155
164
|
dragScrollY.setValue(0);
|
|
156
165
|
|
|
157
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
166
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
158
167
|
} else {
|
|
159
168
|
resetPlayerAnimationState();
|
|
160
169
|
}
|
|
@@ -164,7 +173,13 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
164
173
|
resetPlayerAnimationState();
|
|
165
174
|
}
|
|
166
175
|
},
|
|
167
|
-
[
|
|
176
|
+
[
|
|
177
|
+
lastSnap,
|
|
178
|
+
modalSnapPoints,
|
|
179
|
+
playerAnimationState,
|
|
180
|
+
isMinimizedModal,
|
|
181
|
+
isMaximizedModal,
|
|
182
|
+
]
|
|
168
183
|
);
|
|
169
184
|
|
|
170
185
|
const onScroll = React.useCallback(({ nativeEvent }) => {
|
|
@@ -215,17 +230,18 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
215
230
|
}, []);
|
|
216
231
|
|
|
217
232
|
React.useEffect(() => {
|
|
218
|
-
const { mode, previousMode, item } = videoModalState;
|
|
219
|
-
|
|
220
233
|
if (
|
|
221
|
-
|
|
234
|
+
videoModalMode === "MAXIMIZED" &&
|
|
222
235
|
!enableGesture &&
|
|
223
236
|
scrollPosition.current === 0
|
|
224
237
|
) {
|
|
225
238
|
setIEnableGesture(true);
|
|
226
239
|
}
|
|
227
240
|
|
|
228
|
-
if (
|
|
241
|
+
if (
|
|
242
|
+
videoModalMode === "MINIMIZED" &&
|
|
243
|
+
previousVideoModalMode === "MAXIMIZED"
|
|
244
|
+
) {
|
|
229
245
|
// set animation to the minimize values if moving from the player to another screen
|
|
230
246
|
if (playerAnimationState === null) {
|
|
231
247
|
setScrollModalAnimatedValue(
|
|
@@ -243,14 +259,16 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
243
259
|
}
|
|
244
260
|
} else if (
|
|
245
261
|
playerAnimationState === null &&
|
|
246
|
-
((previousItemId ===
|
|
247
|
-
|
|
248
|
-
(
|
|
249
|
-
|
|
262
|
+
((previousItemId === videoModalItem?.id &&
|
|
263
|
+
videoModalMode === "MAXIMIZED" &&
|
|
264
|
+
(previousVideoModalMode === "MINIMIZED" ||
|
|
265
|
+
previousVideoModalMode === "MAXIMIZED")) ||
|
|
266
|
+
(previousItemId !== videoModalItem?.id &&
|
|
267
|
+
videoModalMode !== "FULLSCREEN"))
|
|
250
268
|
) {
|
|
251
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
269
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
252
270
|
}
|
|
253
|
-
}, [
|
|
271
|
+
}, [videoModalMode, previousVideoModalMode, videoModalItem]);
|
|
254
272
|
|
|
255
273
|
React.useEffect(() => {
|
|
256
274
|
if (playerAnimationState === PlayerAnimationStateEnum.minimize) {
|
|
@@ -292,7 +310,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
292
310
|
|
|
293
311
|
resetPlayerAnimationState();
|
|
294
312
|
});
|
|
295
|
-
} else if (playerAnimationState === PlayerAnimationStateEnum.
|
|
313
|
+
} else if (playerAnimationState === PlayerAnimationStateEnum.maximize) {
|
|
296
314
|
Animated.timing(translateYOffset, getAnimatedConfig(0)).start(() => {
|
|
297
315
|
maximiseVideoModal();
|
|
298
316
|
setScrollModalAnimatedValue(translateYOffset, 0, setLastSnap);
|
|
@@ -342,6 +360,8 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
342
360
|
[]
|
|
343
361
|
);
|
|
344
362
|
|
|
363
|
+
const scrollEnabled = isMaximizedModal && isNotMinimizeMaximazeAnimation;
|
|
364
|
+
|
|
345
365
|
return (
|
|
346
366
|
<Wrapper style={generalStyles.container}>
|
|
347
367
|
<TapGestureHandler
|
|
@@ -355,7 +375,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
355
375
|
enabled={isEnablePanGesture}
|
|
356
376
|
ref={panHandlerRef}
|
|
357
377
|
simultaneousHandlers={[scrollRef, tapHandlerRef]}
|
|
358
|
-
shouldCancelWhenOutside={
|
|
378
|
+
shouldCancelWhenOutside={isMaximizedModal}
|
|
359
379
|
onGestureEvent={onGestureEvent}
|
|
360
380
|
onHandlerStateChange={onHandlerStateChange}
|
|
361
381
|
activeOffsetY={[-5, 5]}
|
|
@@ -367,9 +387,7 @@ export const AnimatedScrollModalComponent = ({ children }: Props) => {
|
|
|
367
387
|
simultaneousHandlers={panHandlerRef}
|
|
368
388
|
>
|
|
369
389
|
<Animated.ScrollView
|
|
370
|
-
scrollEnabled={
|
|
371
|
-
isMaximazedModal && isNotMinimizeMaximazeAnimation
|
|
372
|
-
}
|
|
390
|
+
scrollEnabled={scrollEnabled}
|
|
373
391
|
bounces={false}
|
|
374
392
|
onScrollBeginDrag={onRegisterLastScroll}
|
|
375
393
|
onScroll={onScroll}
|
|
@@ -41,17 +41,21 @@ export const AnimatedVideoPlayer = ({ children }: Props) => {
|
|
|
41
41
|
videoModalState: { mode: videoModalMode },
|
|
42
42
|
} = useNavigation();
|
|
43
43
|
|
|
44
|
-
const { isLanguageOverlayVisible } = React.useContext(
|
|
44
|
+
const { isLanguageOverlayVisible, isSeekBarTouch } = React.useContext(
|
|
45
|
+
PlayerContainerContext
|
|
46
|
+
);
|
|
47
|
+
|
|
45
48
|
const isMaximazedModal = videoModalMode === "MAXIMIZED";
|
|
46
49
|
const isMinimizedModal = videoModalMode === "MINIMIZED";
|
|
47
50
|
|
|
48
51
|
const isNotMinimizeMaximazeAnimation =
|
|
49
52
|
playerAnimationState !== PlayerAnimationStateEnum.minimize &&
|
|
50
|
-
playerAnimationState !== PlayerAnimationStateEnum.
|
|
53
|
+
playerAnimationState !== PlayerAnimationStateEnum.maximize;
|
|
51
54
|
|
|
52
55
|
const isEnablePanGesture =
|
|
53
56
|
!isLanguageOverlayVisible &&
|
|
54
57
|
isNotMinimizeMaximazeAnimation &&
|
|
58
|
+
!isSeekBarTouch &&
|
|
55
59
|
(isMaximazedModal || isMinimizedModal);
|
|
56
60
|
|
|
57
61
|
const onGestureEvent = Animated.event(
|
|
@@ -85,7 +89,7 @@ export const AnimatedVideoPlayer = ({ children }: Props) => {
|
|
|
85
89
|
setLastSnap(destSnapPoint);
|
|
86
90
|
|
|
87
91
|
if (destSnapPoint === modalSnapPoints[0]) {
|
|
88
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
92
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
89
93
|
} else {
|
|
90
94
|
lastScrollY.setValue(0);
|
|
91
95
|
lastScrollYValue.current = 0;
|
|
@@ -101,7 +105,7 @@ export const AnimatedVideoPlayer = ({ children }: Props) => {
|
|
|
101
105
|
modalSnapPoints[1] - preparedTranslationY
|
|
102
106
|
);
|
|
103
107
|
|
|
104
|
-
setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
108
|
+
setPlayerAnimationState(PlayerAnimationStateEnum.maximize);
|
|
105
109
|
} else {
|
|
106
110
|
resetPlayerAnimationState();
|
|
107
111
|
}
|
|
@@ -4,26 +4,26 @@ import { Animated, View } from "react-native";
|
|
|
4
4
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
-
useModalAnimationContext,
|
|
8
7
|
PlayerAnimationStateEnum,
|
|
8
|
+
useModalAnimationContext,
|
|
9
9
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
10
10
|
|
|
11
11
|
import {
|
|
12
|
+
useDimensions,
|
|
12
13
|
useGetBottomTabBarHeight,
|
|
13
14
|
useNavigation,
|
|
14
|
-
useDimensions,
|
|
15
15
|
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
16
16
|
import { useIsRTL } from "@applicaster/zapp-react-native-utils/localizationUtils";
|
|
17
17
|
import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
18
18
|
import { useAppState } from "@applicaster/zapp-react-native-utils/reactHooks/app";
|
|
19
19
|
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
AUDIO_PLAYER_HORIZONTAL_PADDING,
|
|
22
|
+
ComponentAnimationType,
|
|
23
23
|
defaultAspectRatioWidth,
|
|
24
|
+
gestureListenerHelper,
|
|
24
25
|
getAnimationDefaultValue,
|
|
25
|
-
|
|
26
|
-
AUDIO_PLAYER_HORIZONTAL_PADDING,
|
|
26
|
+
getAnimationStyle,
|
|
27
27
|
} from "./utils";
|
|
28
28
|
|
|
29
29
|
type Props = {
|
|
@@ -77,7 +77,7 @@ export const AnimationView = ({
|
|
|
77
77
|
const measureView = React.useCallback(() => {
|
|
78
78
|
if (isTabletLandscape && tabletLandscapePlayerTopPosition === 0) {
|
|
79
79
|
animationComponentRef.current.measure(
|
|
80
|
-
(
|
|
80
|
+
(_x, _y, _width, _height, _pageX, pageY) => {
|
|
81
81
|
setTabletLandscapePlayerTopPosition(pageY - 20);
|
|
82
82
|
}
|
|
83
83
|
);
|
|
@@ -100,10 +100,11 @@ export const AnimationView = ({
|
|
|
100
100
|
const moveUpValue = additionalData.saveArea
|
|
101
101
|
? -insets.top + (isAudioItem ? 0 : progressBarHeight)
|
|
102
102
|
: isTablet
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
? isTabletLandscape &&
|
|
104
|
+
(!isAudioItem || (isAudioItem && inlineAudioPlayer))
|
|
105
|
+
? -tabletLandscapePlayerTopPosition + progressBarHeight
|
|
106
|
+
: -130
|
|
107
|
+
: -50 + progressBarHeight;
|
|
107
108
|
|
|
108
109
|
const moveComponentHorizontalValue = additionalData.moveValue
|
|
109
110
|
? isRTL
|
|
@@ -227,6 +228,8 @@ export const AnimationView = ({
|
|
|
227
228
|
isAudioItem,
|
|
228
229
|
moveUpValue,
|
|
229
230
|
moveComponentHorizontalValue,
|
|
231
|
+
isRTL,
|
|
232
|
+
inlineAudioPlayer,
|
|
230
233
|
]
|
|
231
234
|
);
|
|
232
235
|
|
|
@@ -245,7 +248,7 @@ export const AnimationView = ({
|
|
|
245
248
|
default:
|
|
246
249
|
return getAnimationValue(
|
|
247
250
|
animationType,
|
|
248
|
-
PlayerAnimationStateEnum.
|
|
251
|
+
PlayerAnimationStateEnum.maximize
|
|
249
252
|
).toValue;
|
|
250
253
|
}
|
|
251
254
|
}, [defaultValue, videoModalState]);
|
|
@@ -277,6 +280,11 @@ export const AnimationView = ({
|
|
|
277
280
|
moveUpValue,
|
|
278
281
|
moveComponentHorizontalValue,
|
|
279
282
|
videoModalMode,
|
|
283
|
+
isAudioItem,
|
|
284
|
+
isTablet,
|
|
285
|
+
isTabletLandscape,
|
|
286
|
+
isRTL,
|
|
287
|
+
inlineAudioPlayer,
|
|
280
288
|
]
|
|
281
289
|
);
|
|
282
290
|
|
|
@@ -305,7 +313,7 @@ export const AnimationView = ({
|
|
|
305
313
|
}
|
|
306
314
|
|
|
307
315
|
if (
|
|
308
|
-
videoModalMode === "MAXIMIZED" &&
|
|
316
|
+
(videoModalMode === "MAXIMIZED" || videoModalMode === "MINIMIZED") &&
|
|
309
317
|
defaultValue.x !== screenWidth &&
|
|
310
318
|
width &&
|
|
311
319
|
height
|
|
@@ -331,7 +339,13 @@ export const AnimationView = ({
|
|
|
331
339
|
animatedValue.setValue(value);
|
|
332
340
|
}
|
|
333
341
|
}
|
|
334
|
-
}, [
|
|
342
|
+
}, [
|
|
343
|
+
animatedValue,
|
|
344
|
+
animationType,
|
|
345
|
+
getAnimationValue,
|
|
346
|
+
playerAnimationState,
|
|
347
|
+
videoModalState,
|
|
348
|
+
]);
|
|
335
349
|
|
|
336
350
|
React.useEffect(() => {
|
|
337
351
|
if (
|
|
@@ -343,7 +357,7 @@ export const AnimationView = ({
|
|
|
343
357
|
animatedValue,
|
|
344
358
|
getAnimationValue(animationType, playerAnimationState)
|
|
345
359
|
).start();
|
|
346
|
-
} else if (playerAnimationState === PlayerAnimationStateEnum.
|
|
360
|
+
} else if (playerAnimationState === PlayerAnimationStateEnum.maximize) {
|
|
347
361
|
animatedValue.setValue(defaultValue);
|
|
348
362
|
}
|
|
349
363
|
}, [playerAnimationState, startComponentsAnimation, defaultValue]);
|
|
@@ -404,7 +418,7 @@ export const AnimationView = ({
|
|
|
404
418
|
|
|
405
419
|
return (
|
|
406
420
|
<Animated.View
|
|
407
|
-
onLayout={additionalData.useLayoutMeasure
|
|
421
|
+
onLayout={additionalData.useLayoutMeasure ? measureView : undefined}
|
|
408
422
|
ref={animationComponentRef}
|
|
409
423
|
style={[
|
|
410
424
|
...preparedStyles,
|
|
@@ -434,8 +448,8 @@ export const AnimationComponent = (props: Props) => {
|
|
|
434
448
|
const Component = useAnimation
|
|
435
449
|
? AnimationView
|
|
436
450
|
: style
|
|
437
|
-
|
|
438
|
-
|
|
451
|
+
? View
|
|
452
|
+
: React.Fragment;
|
|
439
453
|
|
|
440
454
|
if (
|
|
441
455
|
additionalData.extraAnimation &&
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Animated } from "react-native";
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
useSafeAreaInsets,
|
|
6
6
|
useSafeAreaFrame,
|
|
7
7
|
} from "react-native-safe-area-context";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
useNavigation,
|
|
11
|
-
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
8
|
+
import { useGetBottomTabBarHeight } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useGetBottomTabBarHeight";
|
|
9
|
+
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useNavigation";
|
|
12
10
|
import { isLive } from "@applicaster/zapp-react-native-utils/playerUtils";
|
|
13
11
|
|
|
14
12
|
import { PROGRESS_BAR_HEIGHT } from "./utils";
|
|
@@ -16,12 +14,12 @@ import { useConfiguration } from "../utils";
|
|
|
16
14
|
|
|
17
15
|
export enum PlayerAnimationStateEnum {
|
|
18
16
|
minimize = "minimize",
|
|
19
|
-
|
|
17
|
+
maximize = "maximize",
|
|
20
18
|
drag_player = "drag_player",
|
|
21
19
|
drag_scroll = "drag_scroll",
|
|
22
20
|
}
|
|
23
21
|
|
|
24
|
-
type PlayerAnimationStateT = number | PlayerAnimationStateEnum | null;
|
|
22
|
+
export type PlayerAnimationStateT = number | PlayerAnimationStateEnum | null;
|
|
25
23
|
|
|
26
24
|
export type ModalAnimationContextT = {
|
|
27
25
|
isActiveGesture: boolean;
|
|
@@ -48,7 +46,7 @@ export type ModalAnimationContextT = {
|
|
|
48
46
|
progressBarHeight: number;
|
|
49
47
|
};
|
|
50
48
|
|
|
51
|
-
const ReactContext = React.createContext<ModalAnimationContextT>({
|
|
49
|
+
export const ReactContext = React.createContext<ModalAnimationContextT>({
|
|
52
50
|
isActiveGesture: false,
|
|
53
51
|
playerAnimationState: null,
|
|
54
52
|
setPlayerAnimationState: () => null,
|
|
@@ -73,10 +71,6 @@ const ReactContext = React.createContext<ModalAnimationContextT>({
|
|
|
73
71
|
progressBarHeight: 0,
|
|
74
72
|
});
|
|
75
73
|
|
|
76
|
-
export function useModalAnimationContext() {
|
|
77
|
-
return useContext<ModalAnimationContextT>(ReactContext);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
74
|
const Provider = ({ children }: { children: React.ReactNode }) => {
|
|
81
75
|
const [playerAnimationState, setPlayerAnimationState] =
|
|
82
76
|
React.useState<PlayerAnimationStateT>(null);
|
|
@@ -124,11 +118,10 @@ const Provider = ({ children }: { children: React.ReactNode }) => {
|
|
|
124
118
|
If bottomTabBarHeight is equal 0 it means an app does not use bottomTabBar.
|
|
125
119
|
Because of this we need to minus bottom SafeArea offset.
|
|
126
120
|
*/
|
|
121
|
+
|
|
127
122
|
const minValue =
|
|
128
123
|
height -
|
|
129
|
-
minimisedHeight
|
|
130
|
-
(bottomTabBarHeight || bottomSafeArea) -
|
|
131
|
-
progressBarHeight;
|
|
124
|
+
(minimisedHeight + bottomTabBarHeight + progressBarHeight + bottomSafeArea);
|
|
132
125
|
|
|
133
126
|
const modalSnapPoints = React.useMemo(() => [0, minValue], [minValue]);
|
|
134
127
|
// Last snap state which will helps us to make smooth responder to scrollview animation
|
|
@@ -6,10 +6,11 @@ export { AnimatedVideoPlayerComponent } from "./AnimatedVideoPlayerComponent";
|
|
|
6
6
|
|
|
7
7
|
export {
|
|
8
8
|
withModalAnimationProvider,
|
|
9
|
-
useModalAnimationContext,
|
|
10
9
|
PlayerAnimationStateEnum,
|
|
11
10
|
} from "./ModalAnimationContext";
|
|
12
11
|
|
|
12
|
+
export { useModalAnimationContext } from "./useModalAnimationContext";
|
|
13
|
+
|
|
13
14
|
export { AnimationComponent } from "./AnimationComponent";
|
|
14
15
|
|
|
15
16
|
export { ComponentAnimationType, defaultAspectRatioWidth } from "./utils";
|
|
@@ -108,8 +108,8 @@ export const calculateAnimationValue = (animationType, dragPosition, data) => {
|
|
|
108
108
|
: { forWidth: 3, forHeight: 3 }
|
|
109
109
|
: { forWidth: 2, forHeight: 2 }
|
|
110
110
|
: isTabletLandscape
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
? { forWidth: 8, forHeight: 6.5 }
|
|
112
|
+
: { forWidth: 3.5, forHeight: 2 };
|
|
113
113
|
|
|
114
114
|
const minWidth =
|
|
115
115
|
isAudioItem && !inlineAudioPlayer ? minimisedHeight : minimisedWidth;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StyleSheet, View } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
|
|
5
|
+
|
|
6
|
+
import { Spinner } from "../Spinner";
|
|
7
|
+
|
|
8
|
+
const styles = StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
...StyleSheet.absoluteFillObject,
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
justifyContent: "center",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const OpaqueLayer = () => {
|
|
17
|
+
const theme = useTheme();
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<View
|
|
21
|
+
style={[
|
|
22
|
+
styles.container,
|
|
23
|
+
{
|
|
24
|
+
// we assume that it's non-transparent and we could show spinner always until it will be covered by player
|
|
25
|
+
// this spinner hides all content under modal
|
|
26
|
+
backgroundColor: theme?.app_background_color,
|
|
27
|
+
},
|
|
28
|
+
]}
|
|
29
|
+
>
|
|
30
|
+
<Spinner />
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from "react";
|
|
2
2
|
import {
|
|
3
|
-
StyleProp,
|
|
4
|
-
ViewStyle,
|
|
5
3
|
Animated,
|
|
6
|
-
Easing,
|
|
7
4
|
Dimensions,
|
|
5
|
+
Easing,
|
|
6
|
+
StyleProp,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
StyleSheet,
|
|
8
9
|
} from "react-native";
|
|
9
10
|
import { useTargetScreenData } from "@applicaster/zapp-react-native-utils/reactHooks/screen";
|
|
10
11
|
import { ComponentsMap } from "@applicaster/zapp-react-native-ui-components/Components/River/ComponentsMap";
|
|
@@ -90,17 +91,19 @@ export const PlayerDetails = ({
|
|
|
90
91
|
{
|
|
91
92
|
// workaround for avoid wrong text-height after going back to portrait rotation
|
|
92
93
|
// we don't see this view in landscape mode, so we are able to use fixed width from portrait mode
|
|
93
|
-
width: isTablet
|
|
94
|
+
width: isTablet
|
|
95
|
+
? undefined
|
|
96
|
+
: (StyleSheet.flatten(style)?.width ?? SCREEN_WIDTH),
|
|
94
97
|
},
|
|
95
98
|
]}
|
|
96
99
|
>
|
|
97
|
-
{screenData
|
|
100
|
+
{screenData ? (
|
|
98
101
|
<ComponentsMap
|
|
99
102
|
riverId={screenData.id}
|
|
100
103
|
feed={screenData?.data?.source}
|
|
101
104
|
riverComponents={screenData.ui_components}
|
|
102
105
|
/>
|
|
103
|
-
)}
|
|
106
|
+
) : null}
|
|
104
107
|
</Animated.View>
|
|
105
108
|
);
|
|
106
109
|
};
|
|
@@ -10,7 +10,8 @@ import { Edge, SafeAreaView } from "react-native-safe-area-context";
|
|
|
10
10
|
import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
11
11
|
import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
12
12
|
import { PlayerDetails } from "./PlayerDetails";
|
|
13
|
-
import {
|
|
13
|
+
import { playerDimensionsHack } from "./utils";
|
|
14
|
+
import { useDelayedPlayerDetails } from "./hooks";
|
|
14
15
|
|
|
15
16
|
import {
|
|
16
17
|
AnimatedScrollModal,
|
|
@@ -121,34 +122,6 @@ const getTabletWidth = (
|
|
|
121
122
|
return Number(width) - sidebarWidth;
|
|
122
123
|
};
|
|
123
124
|
|
|
124
|
-
const showDetails = (
|
|
125
|
-
isMobile: boolean,
|
|
126
|
-
docked: boolean,
|
|
127
|
-
isInlineModal,
|
|
128
|
-
pip
|
|
129
|
-
): boolean => {
|
|
130
|
-
if (pip) {
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
if (!isInlineModal) {
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// for mobile we always show details. Mounting of it very heavy operation.
|
|
139
|
-
if (isMobile) {
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// workaround for tablets we need to mount/unmount in order to avoid PlayerDetails content dissappearing
|
|
144
|
-
// FIXME - find out the reason of dissapearing of content
|
|
145
|
-
if (docked) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
return true;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
125
|
const PlayerWrapperComponent = (props: Props) => {
|
|
153
126
|
const {
|
|
154
127
|
entry,
|
|
@@ -167,7 +140,15 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
167
140
|
|
|
168
141
|
const isInlineModal = inline && isModal;
|
|
169
142
|
|
|
170
|
-
//
|
|
143
|
+
// Mounting the PlayerDetails component is a resource-intensive process.
|
|
144
|
+
// Therefore, for performance reasons, we mount it with a delay to make the rotation process as smooth as possible.
|
|
145
|
+
// The flow is as follows: the rotation occurs first, and then, after a short delay, we mount the PlayerDetails component.
|
|
146
|
+
// This helps to avoid blocking the rotation and any animations related to the rotation.
|
|
147
|
+
const isShowPlayerDetails = useDelayedPlayerDetails({
|
|
148
|
+
isInline: isInlineModal,
|
|
149
|
+
isDocked: docked,
|
|
150
|
+
isPip: pip,
|
|
151
|
+
});
|
|
171
152
|
|
|
172
153
|
const isTabletLandscape = !isTV() && isTablet && !isTabletPortrait;
|
|
173
154
|
|
|
@@ -203,8 +184,8 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
203
184
|
const WrapperView = React.useMemo(() => (isTV() ? View : SafeAreaView), []);
|
|
204
185
|
|
|
205
186
|
const childrenStyles = React.useMemo(
|
|
206
|
-
() => ({ ...playerDimensions, ...
|
|
207
|
-
[containerDimensions,
|
|
187
|
+
() => ({ ...playerDimensions, ...playerDimensionsHack }),
|
|
188
|
+
[containerDimensions, playerDimensionsHack]
|
|
208
189
|
);
|
|
209
190
|
|
|
210
191
|
return (
|
|
@@ -213,7 +194,7 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
213
194
|
style={[
|
|
214
195
|
safeAreaStyles(configuration, isTablet),
|
|
215
196
|
style,
|
|
216
|
-
|
|
197
|
+
playerDimensionsHack,
|
|
217
198
|
]}
|
|
218
199
|
>
|
|
219
200
|
<AnimationComponent
|
|
@@ -227,7 +208,7 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
227
208
|
defaultStyles.playerContainer,
|
|
228
209
|
containerDimensions,
|
|
229
210
|
containerStyle,
|
|
230
|
-
|
|
211
|
+
playerDimensionsHack,
|
|
231
212
|
]}
|
|
232
213
|
>
|
|
233
214
|
<AnimationComponent
|
|
@@ -246,7 +227,7 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
246
227
|
</View>
|
|
247
228
|
|
|
248
229
|
<AnimatedScrollModal>
|
|
249
|
-
{
|
|
230
|
+
{isShowPlayerDetails ? (
|
|
250
231
|
<AnimationComponent
|
|
251
232
|
animationType={ComponentAnimationType.componentFade}
|
|
252
233
|
style={defaultStyles.flex}
|
|
@@ -259,7 +240,7 @@ const PlayerWrapperComponent = (props: Props) => {
|
|
|
259
240
|
isTablet={isTablet}
|
|
260
241
|
/>
|
|
261
242
|
</AnimationComponent>
|
|
262
|
-
)}
|
|
243
|
+
) : null}
|
|
263
244
|
</AnimatedScrollModal>
|
|
264
245
|
</AnimationComponent>
|
|
265
246
|
</WrapperView>
|