@applicaster/zapp-react-native-ui-components 14.0.0-alpha.1661204539 → 14.0.0-alpha.1740013076
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/AnimatedInOut/index.tsx +5 -3
- package/Components/AudioPlayer/index.tsx +15 -0
- package/Components/AudioPlayer/mobile/Layout.tsx +66 -0
- package/Components/AudioPlayer/{__tests__/__snapshots__/audioPlayer.test.js.snap → mobile/__tests__/__snapshots__/audioPlayerMobileLayout.test.js.snap} +2 -2
- package/Components/AudioPlayer/mobile/__tests__/audioPlayerMobileLayout.test.js +18 -0
- package/Components/AudioPlayer/mobile/index.tsx +18 -0
- package/Components/AudioPlayer/tv/Artwork.tsx +41 -0
- package/Components/AudioPlayer/{Channel.tsx → tv/Channel.tsx} +7 -7
- package/Components/AudioPlayer/tv/Layout.tsx +168 -0
- package/Components/AudioPlayer/{Runtime.tsx → tv/Runtime.tsx} +9 -2
- package/Components/AudioPlayer/{Summary.tsx → tv/Summary.tsx} +17 -10
- package/Components/AudioPlayer/tv/Title.tsx +46 -0
- package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/Runtime.test.js.snap +4 -4
- package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/artWork.test.js.snap +9 -4
- package/Components/AudioPlayer/tv/__tests__/__snapshots__/audioPlayer.test.js.snap +164 -0
- package/Components/AudioPlayer/tv/__tests__/__snapshots__/channel.test.js.snap +19 -0
- package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/summary.test.js.snap +2 -3
- package/Components/AudioPlayer/{__tests__ → tv/__tests__}/__snapshots__/title.test.js.snap +2 -3
- package/Components/AudioPlayer/{__tests__ → tv/__tests__}/audioPlayer.test.js +7 -3
- package/Components/AudioPlayer/{helpers.tsx → tv/helpers.tsx} +13 -7
- package/Components/AudioPlayer/{AudioPlayer.tsx → tv/index.tsx} +18 -57
- package/Components/AudioPlayer/types.ts +40 -0
- package/Components/BaseFocusable/index.tsx +23 -12
- package/Components/Cell/Cell.tsx +91 -64
- package/Components/Cell/CellWithFocusable.tsx +3 -0
- package/Components/Cell/__tests__/CellWIthFocusable.test.js +3 -2
- package/Components/Cell/index.js +7 -3
- package/Components/ComponentResolver/index.ts +1 -1
- package/Components/FeedLoader/FeedLoader.tsx +7 -16
- package/Components/FeedLoader/FeedLoaderHOC.tsx +21 -0
- package/Components/FeedLoader/index.js +2 -8
- package/Components/Focusable/Focusable.tsx +12 -3
- package/Components/Focusable/FocusableTvOS.tsx +5 -5
- package/Components/Focusable/FocusableiOS.tsx +2 -2
- package/Components/Focusable/__tests__/index.android.test.tsx +3 -0
- package/Components/Focusable/index.android.tsx +12 -8
- package/Components/Focusable/index.tsx +1 -1
- package/Components/FocusableGroup/FocusableTvOS.tsx +1 -1
- package/Components/FocusableList/index.tsx +6 -2
- package/Components/FreezeWithCallback/__tests__/index.test.tsx +67 -43
- package/Components/GeneralContentScreen/GeneralContentScreen.tsx +0 -2
- package/Components/GeneralContentScreen/utils/__tests__/useCurationAPI.test.js +42 -59
- package/Components/GeneralContentScreen/utils/useCurationAPI.ts +13 -10
- package/Components/HandlePlayable/HandlePlayable.tsx +25 -9
- package/Components/Layout/TV/LayoutBackground.tsx +1 -1
- package/Components/Layout/TV/__tests__/index.test.tsx +0 -1
- package/Components/MasterCell/DefaultComponents/ActionButton.tsx +6 -2
- package/Components/MasterCell/DefaultComponents/Button.tsx +1 -1
- package/Components/MasterCell/DefaultComponents/FocusableView/index.tsx +4 -39
- package/Components/MasterCell/DefaultComponents/Image/hoc/withDimensions.tsx +1 -1
- package/Components/MasterCell/DefaultComponents/ImageContainer/index.tsx +1 -1
- package/Components/MasterCell/DefaultComponents/Text/index.tsx +27 -6
- package/Components/MasterCell/DefaultComponents/__tests__/image.test.js +10 -10
- package/Components/MasterCell/DefaultComponents/__tests__/text.test.tsx +18 -18
- package/Components/MasterCell/SharedUI/CollapsibleTextContainer/__tests__/index.test.tsx +10 -10
- package/Components/MasterCell/elementMapper.tsx +1 -2
- package/Components/MasterCell/index.tsx +1 -1
- package/Components/MasterCell/utils/behaviorProvider.ts +19 -6
- package/Components/MasterCell/utils/index.ts +9 -13
- package/Components/OfflineHandler/NotificationView/__tests__/index.test.tsx +13 -18
- package/Components/OfflineHandler/__tests__/__snapshots__/index.test.tsx.snap +9 -0
- package/Components/OfflineHandler/__tests__/index.test.tsx +26 -35
- package/Components/PlayerContainer/ErrorDisplay/index.ts +1 -1
- package/Components/PlayerContainer/PlayerContainer.tsx +66 -67
- package/Components/PlayerContainer/ProgramInfo/index.tsx +1 -1
- package/Components/PlayerContainer/index.ts +1 -1
- package/Components/PlayerImageBackground/index.tsx +1 -1
- package/Components/River/ComponentsMap/ComponentsMap.tsx +1 -6
- package/Components/River/ComponentsMap/hooks/__tests__/useLoadingState.test.ts +378 -0
- package/Components/River/ComponentsMap/hooks/useLoadingState.ts +2 -2
- package/Components/River/RefreshControl.tsx +11 -17
- package/Components/River/RiverItem.tsx +8 -8
- package/Components/River/TV/River.tsx +2 -20
- package/Components/River/TV/index.tsx +3 -1
- package/Components/River/TV/withPipesV1DataLoader.tsx +43 -0
- package/Components/River/TV/withRiverDataLoader.tsx +17 -0
- package/Components/River/TV/withTVEventHandler.tsx +1 -1
- package/Components/River/__tests__/__snapshots__/componentsMap.test.js.snap +2 -6
- package/Components/River/__tests__/river.test.js +12 -26
- package/Components/River/index.tsx +1 -1
- package/Components/Screen/__tests__/Screen.test.tsx +28 -29
- package/Components/Screen/__tests__/navigationHandler.test.ts +133 -22
- package/Components/Screen/navigationHandler.ts +20 -2
- package/Components/ScreenRevealManager/ScreenRevealManager.ts +76 -0
- package/Components/ScreenRevealManager/__tests__/ScreenRevealManager.test.ts +107 -0
- package/Components/ScreenRevealManager/__tests__/withScreenRevealManager.test.tsx +96 -0
- package/Components/ScreenRevealManager/index.ts +1 -0
- package/Components/ScreenRevealManager/withScreenRevealManager.tsx +79 -0
- package/Components/Tabs/TV/Tabs.android.tsx +1 -3
- package/Components/Tabs/Tabs.tsx +2 -3
- package/Components/TextInputTv/__tests__/__snapshots__/TextInputTv.test.js.snap +13 -0
- package/Components/TextInputTv/index.tsx +11 -0
- package/Components/TopMarginApplicator/TopMarginApplicator.tsx +16 -15
- package/Components/Touchable/__tests__/__snapshots__/touchable.test.tsx.snap +34 -0
- package/Components/Touchable/__tests__/touchable.test.tsx +12 -17
- package/Components/Transitioner/__tests__/__snapshots__/Scene.test.js.snap +15 -9
- package/Components/VideoLive/animationUtils.ts +3 -3
- package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.tsx +3 -9
- package/Components/VideoModal/ModalAnimation/AnimatedScrollModal.web.tsx +294 -0
- package/Components/VideoModal/ModalAnimation/AnimatedVideoPlayerComponent.web.tsx +93 -0
- package/Components/VideoModal/ModalAnimation/ModalAnimationContext.tsx +32 -8
- package/Components/VideoModal/PlayerDetails.tsx +24 -2
- package/Components/VideoModal/PlayerWrapper.tsx +26 -142
- package/Components/VideoModal/VideoModal.tsx +3 -17
- package/Components/VideoModal/__tests__/PlayerDetails.test.tsx +5 -5
- package/Components/VideoModal/__tests__/PlayerWrapper.test.tsx +1 -7
- package/Components/VideoModal/__tests__/__snapshots__/PlayerWrapper.test.tsx.snap +44 -180
- package/Components/VideoModal/hooks/__tests__/useDelayedPlayerDetails.test.ts +17 -55
- package/Components/VideoModal/hooks/index.ts +0 -2
- package/Components/VideoModal/hooks/useDelayedPlayerDetails.ts +15 -26
- package/Components/VideoModal/hooks/useModalSize.ts +18 -2
- package/Components/VideoModal/utils.ts +6 -0
- package/Components/Viewport/ViewportAware/__tests__/viewportAware.test.js +12 -16
- package/Components/Viewport/ViewportTracker/__tests__/viewportTracker.test.js +84 -24
- package/Components/Viewport/VisibilitySensor/VisibilitySensor.tsx +3 -3
- package/Components/default-cell-renderer/viewTrees/tv/DefaultCell/index.ts +3 -3
- package/Contexts/CellFocusedStateContext/index.tsx +27 -0
- package/Contexts/ConfigutaionContext/__tests__/ConfigurationProvider.test.tsx +3 -3
- package/Contexts/ScreenContext/index.tsx +46 -6
- package/Decorators/ConfigurationWrapper/__tests__/withConfigurationProvider.test.tsx +3 -3
- package/Decorators/ConfigurationWrapper/withConfigurationProvider.tsx +2 -2
- package/Decorators/RiverFeedLoader/__tests__/__snapshots__/riverFeedLoader.test.tsx.snap +221 -209
- package/Decorators/RiverFeedLoader/__tests__/riverFeedLoader.test.tsx +14 -16
- package/Decorators/RiverFeedLoader/__tests__/utils.test.ts +0 -20
- package/Decorators/RiverFeedLoader/index.tsx +21 -9
- package/Decorators/RiverFeedLoader/utils/index.ts +0 -23
- package/Decorators/RiverResolver/__tests__/riverResolver.test.tsx +3 -6
- package/Decorators/ZappPipesDataConnector/ResolverSelector.tsx +25 -0
- package/Decorators/ZappPipesDataConnector/__tests__/NullFeedResolver.test.tsx +78 -0
- package/Decorators/ZappPipesDataConnector/__tests__/ResolverSelector.test.tsx +205 -0
- package/Decorators/ZappPipesDataConnector/__tests__/StaticFeedResolver.test.tsx +251 -0
- package/Decorators/ZappPipesDataConnector/__tests__/UrlFeedResolver.test.tsx +368 -0
- package/Decorators/ZappPipesDataConnector/__tests__/utils.test.ts +39 -0
- package/Decorators/ZappPipesDataConnector/index.tsx +27 -308
- package/Decorators/ZappPipesDataConnector/resolvers/NullFeedResolver.tsx +25 -0
- package/Decorators/ZappPipesDataConnector/resolvers/StaticFeedResolver.tsx +87 -0
- package/Decorators/ZappPipesDataConnector/resolvers/UrlFeedResolver.tsx +266 -0
- package/Decorators/ZappPipesDataConnector/types.ts +29 -0
- package/Decorators/ZappPipesDataConnector/utils/mongoFilter.ts +738 -0
- package/Decorators/ZappPipesDataConnector/utils/useFilter.tsx +157 -0
- package/events/index.ts +1 -0
- package/index.d.ts +0 -1
- package/package.json +5 -10
- package/Components/AudioPlayer/Artwork.tsx +0 -35
- package/Components/AudioPlayer/AudioPlayerLayout.tsx +0 -202
- package/Components/AudioPlayer/Title.tsx +0 -39
- package/Components/AudioPlayer/__tests__/__snapshots__/audioPlayerLayout.test.js.snap +0 -66
- package/Components/AudioPlayer/__tests__/__snapshots__/channel.test.js.snap +0 -28
- package/Components/AudioPlayer/__tests__/audioPlayerLayout.test.js +0 -26
- package/Components/AudioPlayer/index.ts +0 -1
- package/Components/River/__tests__/__snapshots__/river.test.js.snap +0 -27
- package/Components/VideoModal/hooks/useBackgroundColor.ts +0 -10
- /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/Runtime.test.js +0 -0
- /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/artWork.test.js +0 -0
- /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/channel.test.js +0 -0
- /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/summary.test.js +0 -0
- /package/Components/AudioPlayer/{__tests__ → tv/__tests__}/title.test.js +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useEffect, useReducer } from "react";
|
|
3
|
-
|
|
4
|
-
import { TVMenuControl, View, ViewStyle } from "react-native";
|
|
3
|
+
import { View, ViewStyle } from "react-native";
|
|
5
4
|
import * as R from "ramda";
|
|
6
5
|
import uuid from "uuid/v4";
|
|
7
6
|
import { playerManager } from "@applicaster/zapp-react-native-utils/appUtils/playerManager";
|
|
8
7
|
import {
|
|
9
|
-
isApplePlatform,
|
|
10
8
|
isTV,
|
|
11
9
|
platformSelect,
|
|
12
10
|
isAndroidTVPlatform,
|
|
11
|
+
isTvOSPlatform,
|
|
13
12
|
} from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
14
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
isAudioItem,
|
|
15
|
+
isInlineTV as isInlineTVUtil,
|
|
16
|
+
} from "@applicaster/zapp-react-native-utils/playerUtils";
|
|
15
17
|
|
|
16
18
|
import { TVEventHandlerComponent } from "@applicaster/zapp-react-native-tvos-ui-components/Components/TVEventHandlerComponent";
|
|
17
19
|
import { usePrevious } from "@applicaster/zapp-react-native-utils/reactHooks/utils";
|
|
@@ -22,7 +24,7 @@ import {
|
|
|
22
24
|
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
23
25
|
|
|
24
26
|
import { PlayerStateContext } from "../../Contexts/PlayerStateContext";
|
|
25
|
-
|
|
27
|
+
|
|
26
28
|
import {
|
|
27
29
|
QUICK_BRICK_EVENTS,
|
|
28
30
|
QuickBrickEvent,
|
|
@@ -59,6 +61,11 @@ import {
|
|
|
59
61
|
useModalAnimationContext,
|
|
60
62
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
61
63
|
|
|
64
|
+
import {
|
|
65
|
+
PlayerNativeCommandTypes,
|
|
66
|
+
PlayerNativeSendCommand,
|
|
67
|
+
} from "@applicaster/zapp-react-native-utils/appUtils/playerManager/playerNativeCommand";
|
|
68
|
+
|
|
62
69
|
type Props = {
|
|
63
70
|
Player: React.ComponentType<any>;
|
|
64
71
|
PlayerLoadingView?: React.ComponentType<any>; // 👀 we are not receiving this prop
|
|
@@ -85,7 +92,7 @@ export const VideoModalMode = {
|
|
|
85
92
|
MAXIMIZED: "MAXIMIZED",
|
|
86
93
|
MINIMIZED: "MINIMIZED",
|
|
87
94
|
FULLSCREEN: "FULLSCREEN",
|
|
88
|
-
};
|
|
95
|
+
} as const;
|
|
89
96
|
|
|
90
97
|
export type PlayNextData = {
|
|
91
98
|
state: PlayNextState;
|
|
@@ -97,6 +104,11 @@ const focusableBottomContainerId = "player-container-bottom";
|
|
|
97
104
|
|
|
98
105
|
const isAndroidTV = isAndroidTVPlatform();
|
|
99
106
|
|
|
107
|
+
const isTvOS = isTvOSPlatform();
|
|
108
|
+
|
|
109
|
+
// height for container with additional content below player
|
|
110
|
+
const INLINE_CONTAINER_CONTENT_HEIGHT = 400;
|
|
111
|
+
|
|
100
112
|
const withBorderHack = () => {
|
|
101
113
|
if (isAndroidTV) {
|
|
102
114
|
/* @HACK: see GH#7269 */
|
|
@@ -119,14 +131,14 @@ const webStyles = {
|
|
|
119
131
|
playerScreen: {
|
|
120
132
|
flex: 1,
|
|
121
133
|
height: "100vh",
|
|
122
|
-
|
|
134
|
+
backgroundColor: "black",
|
|
123
135
|
},
|
|
124
136
|
playerWrapper: {
|
|
125
137
|
height: "100%",
|
|
126
138
|
flex: "initial",
|
|
127
139
|
},
|
|
128
140
|
inlineRiver: {
|
|
129
|
-
height:
|
|
141
|
+
height: INLINE_CONTAINER_CONTENT_HEIGHT,
|
|
130
142
|
},
|
|
131
143
|
};
|
|
132
144
|
|
|
@@ -137,14 +149,13 @@ const nativeStyles = {
|
|
|
137
149
|
},
|
|
138
150
|
playerScreen: {
|
|
139
151
|
flex: 1,
|
|
140
|
-
backgroundColor: "black",
|
|
141
152
|
overflow: "hidden",
|
|
142
153
|
},
|
|
143
154
|
playerWrapper: {
|
|
144
155
|
flex: 1,
|
|
145
156
|
},
|
|
146
157
|
inlineRiver: {
|
|
147
|
-
height:
|
|
158
|
+
height: INLINE_CONTAINER_CONTENT_HEIGHT,
|
|
148
159
|
},
|
|
149
160
|
};
|
|
150
161
|
|
|
@@ -164,12 +175,11 @@ const renderApplePlayer = ({
|
|
|
164
175
|
videoStyle,
|
|
165
176
|
playNextData,
|
|
166
177
|
}) => {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (!isAppleTV() || !player) {
|
|
178
|
+
if (!isTvOS || !player) {
|
|
170
179
|
return null;
|
|
171
180
|
}
|
|
172
181
|
|
|
182
|
+
// render audio_player for tvos
|
|
173
183
|
if (isAudioContent) {
|
|
174
184
|
return (
|
|
175
185
|
<AudioPlayer
|
|
@@ -183,6 +193,8 @@ const renderApplePlayer = ({
|
|
|
183
193
|
return null;
|
|
184
194
|
}
|
|
185
195
|
|
|
196
|
+
const { title, summary } = item || {};
|
|
197
|
+
|
|
186
198
|
return (
|
|
187
199
|
<ProgramInfo
|
|
188
200
|
title={title}
|
|
@@ -193,21 +205,6 @@ const renderApplePlayer = ({
|
|
|
193
205
|
);
|
|
194
206
|
};
|
|
195
207
|
|
|
196
|
-
const renderRestPlayers = ({ item, showAudioPlayer, pluginConfiguration }) => {
|
|
197
|
-
if (isApplePlatform()) {
|
|
198
|
-
return null;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
return (
|
|
202
|
-
showAudioPlayer && (
|
|
203
|
-
<AudioPlayer
|
|
204
|
-
audio_item={item}
|
|
205
|
-
plugin_configuration={pluginConfiguration}
|
|
206
|
-
/>
|
|
207
|
-
)
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
|
|
211
208
|
const PlayerContainerComponent = (props: Props) => {
|
|
212
209
|
const {
|
|
213
210
|
Player,
|
|
@@ -266,9 +263,15 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
266
263
|
return;
|
|
267
264
|
}
|
|
268
265
|
|
|
266
|
+
// send command to clear and stop player
|
|
267
|
+
PlayerNativeSendCommand(
|
|
268
|
+
PlayerNativeCommandTypes.clearPlayerData,
|
|
269
|
+
state.playerId
|
|
270
|
+
);
|
|
271
|
+
|
|
269
272
|
showNavBar(true);
|
|
270
273
|
navigator.goBack();
|
|
271
|
-
}, [isModal, navigator.goBack, showNavBar]);
|
|
274
|
+
}, [isModal, navigator.goBack, state.playerId, showNavBar]);
|
|
272
275
|
|
|
273
276
|
const playEntry = (entry) => navigator.replaceTop(entry, { mode });
|
|
274
277
|
|
|
@@ -337,7 +340,7 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
337
340
|
|
|
338
341
|
setState({ error: errorObj });
|
|
339
342
|
|
|
340
|
-
if (!
|
|
343
|
+
if (!isTvOS) {
|
|
341
344
|
setTimeout(() => {
|
|
342
345
|
close();
|
|
343
346
|
}, 800);
|
|
@@ -396,13 +399,17 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
396
399
|
}
|
|
397
400
|
};
|
|
398
401
|
|
|
399
|
-
const playerRemoteHandler = (
|
|
400
|
-
|
|
402
|
+
const playerRemoteHandler = React.useCallback(
|
|
403
|
+
(isLanguageOverlayVisible = false) =>
|
|
404
|
+
(event) => {
|
|
405
|
+
const { eventType } = event;
|
|
401
406
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
407
|
+
if (!isLanguageOverlayVisible && eventType === "menu") {
|
|
408
|
+
close();
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
[close]
|
|
412
|
+
);
|
|
406
413
|
|
|
407
414
|
// Effects
|
|
408
415
|
useEffect(() => {
|
|
@@ -416,7 +423,10 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
416
423
|
id: playerContainerId,
|
|
417
424
|
listener: {
|
|
418
425
|
onVideoEnd,
|
|
419
|
-
onError
|
|
426
|
+
onError: (err: Error) => {
|
|
427
|
+
// Adapt Error to the expected shape for onError
|
|
428
|
+
onError({ error: err });
|
|
429
|
+
},
|
|
420
430
|
onLoad,
|
|
421
431
|
onPlayerClose: close,
|
|
422
432
|
onPlayerDetached: close,
|
|
@@ -515,16 +525,6 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
515
525
|
}
|
|
516
526
|
}, [isAudioContent]);
|
|
517
527
|
|
|
518
|
-
// Needs to handle back button on Apple TV
|
|
519
|
-
// https://github.com/facebook/react-native/issues/18930
|
|
520
|
-
useEffect(() => {
|
|
521
|
-
TVMenuControl?.enableTVMenuKey();
|
|
522
|
-
|
|
523
|
-
return () => {
|
|
524
|
-
TVMenuControl?.disableTVMenuKey();
|
|
525
|
-
};
|
|
526
|
-
}, []);
|
|
527
|
-
|
|
528
528
|
useEffect(() => {
|
|
529
529
|
playerEvent("source_changed", { item });
|
|
530
530
|
|
|
@@ -568,14 +568,12 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
568
568
|
|
|
569
569
|
const uri = item?.content ? item.content?.src : null;
|
|
570
570
|
|
|
571
|
-
const isInlineTV =
|
|
572
|
-
screenData?.ui_components &&
|
|
573
|
-
screenData?.ui_components?.length > 0 &&
|
|
574
|
-
isTV();
|
|
571
|
+
const isInlineTV = isInlineTVUtil(screenData);
|
|
575
572
|
|
|
576
573
|
const inline =
|
|
577
|
-
[VideoModalMode.MAXIMIZED, VideoModalMode.MINIMIZED].includes(
|
|
578
|
-
|
|
574
|
+
[VideoModalMode.MAXIMIZED, VideoModalMode.MINIMIZED].includes(
|
|
575
|
+
mode as any
|
|
576
|
+
) || isInlineTV;
|
|
579
577
|
|
|
580
578
|
const value = React.useMemo(
|
|
581
579
|
() => ({ playerId: state.playerId }),
|
|
@@ -596,7 +594,11 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
596
594
|
);
|
|
597
595
|
}
|
|
598
596
|
|
|
599
|
-
if (
|
|
597
|
+
if (
|
|
598
|
+
screen_background_color &&
|
|
599
|
+
mode !== VideoModalMode.FULLSCREEN &&
|
|
600
|
+
isTV()
|
|
601
|
+
) {
|
|
600
602
|
updatedStyles.playerScreen.backgroundColor = screen_background_color;
|
|
601
603
|
}
|
|
602
604
|
|
|
@@ -626,11 +628,7 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
626
628
|
playNextData,
|
|
627
629
|
};
|
|
628
630
|
|
|
629
|
-
const
|
|
630
|
-
item,
|
|
631
|
-
showAudioPlayer: isAudioContent,
|
|
632
|
-
pluginConfiguration,
|
|
633
|
-
};
|
|
631
|
+
const pointerEventsProp = mode === "MINIMIZED" ? "box-none" : "auto";
|
|
634
632
|
|
|
635
633
|
return (
|
|
636
634
|
<PlayerStateContext.Provider value={value}>
|
|
@@ -642,9 +640,9 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
642
640
|
<PlayerContainerContext.Consumer>
|
|
643
641
|
{(context) => (
|
|
644
642
|
<TVEventHandlerComponent
|
|
645
|
-
tvEventHandler={(
|
|
646
|
-
|
|
647
|
-
}
|
|
643
|
+
tvEventHandler={playerRemoteHandler(
|
|
644
|
+
context.isLanguageOverlayVisible
|
|
645
|
+
)}
|
|
648
646
|
>
|
|
649
647
|
<FocusableGroup
|
|
650
648
|
id={FocusableGroupMainContainerId}
|
|
@@ -652,14 +650,17 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
652
650
|
preferredFocus
|
|
653
651
|
shouldUsePreferredFocus
|
|
654
652
|
groupId={groupId}
|
|
653
|
+
pointerEvents={pointerEventsProp}
|
|
655
654
|
>
|
|
656
655
|
{/* Video player and components */}
|
|
657
656
|
<View
|
|
658
657
|
style={styles.playerScreen}
|
|
659
658
|
testID={"player-screen-container"}
|
|
659
|
+
pointerEvents={pointerEventsProp}
|
|
660
660
|
>
|
|
661
661
|
{/* Player container */}
|
|
662
662
|
<View
|
|
663
|
+
pointerEvents={pointerEventsProp}
|
|
663
664
|
style={[
|
|
664
665
|
styles.playerWrapper,
|
|
665
666
|
// eslint-disable-next-line react-native/no-inline-styles, react-native/no-color-literals
|
|
@@ -707,8 +708,6 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
707
708
|
</Player>
|
|
708
709
|
</PlayerFocusableWrapperView>
|
|
709
710
|
|
|
710
|
-
{renderRestPlayers(restPlayerProps)}
|
|
711
|
-
|
|
712
711
|
{state.error ? <ErrorDisplay error={state.error} /> : null}
|
|
713
712
|
</View>
|
|
714
713
|
{/* Components container */}
|
|
@@ -732,12 +731,12 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
732
731
|
screenId={screenData.id}
|
|
733
732
|
key={item.id}
|
|
734
733
|
groupId={FocusableGroupMainContainerId}
|
|
735
|
-
cellTapAction={
|
|
736
|
-
extraAnchorPointYOffset={
|
|
734
|
+
cellTapAction={onCellTap}
|
|
735
|
+
extraAnchorPointYOffset={0}
|
|
737
736
|
isScreenWrappedInContainer={true}
|
|
738
737
|
containerHeight={styles.inlineRiver.height}
|
|
739
738
|
componentsMapExtraProps={{
|
|
740
|
-
isNestedComponentsMap:
|
|
739
|
+
isNestedComponentsMap: true,
|
|
741
740
|
}}
|
|
742
741
|
/>
|
|
743
742
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { connectToStore } from "@applicaster/zapp-react-native-redux";
|
|
1
|
+
import { connectToStore } from "@applicaster/zapp-react-native-redux/utils/connectToStore";
|
|
2
2
|
import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils";
|
|
3
3
|
import { styleKeys } from "@applicaster/zapp-react-native-utils/styleKeysUtils";
|
|
4
4
|
import { transformColorCode as fixColorHexCode } from "@applicaster/zapp-react-native-utils/transform";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as R from "ramda";
|
|
2
2
|
|
|
3
|
-
import { connectToStore } from "@applicaster/zapp-react-native-redux";
|
|
3
|
+
import { connectToStore } from "@applicaster/zapp-react-native-redux/utils/connectToStore";
|
|
4
4
|
import { loadPipesData } from "@applicaster/zapp-react-native-redux/ZappPipes";
|
|
5
5
|
|
|
6
6
|
import { PlayerContainer as PlayerContainerComponent } from "./PlayerContainer";
|
|
@@ -28,7 +28,7 @@ const PlayerImageBackgroundComponent = ({
|
|
|
28
28
|
defaultImageDimensions,
|
|
29
29
|
}: Props) => {
|
|
30
30
|
const source = React.useMemo(
|
|
31
|
-
() => ({ uri: imageSrcFromMediaItem(entry, imageKey) }),
|
|
31
|
+
() => ({ uri: imageSrcFromMediaItem(entry, [imageKey]) }),
|
|
32
32
|
[imageKey, entry]
|
|
33
33
|
);
|
|
34
34
|
|
|
@@ -281,12 +281,11 @@ function ComponentsMapComponent(props: Props) {
|
|
|
281
281
|
scrollIndicatorInsets={scrollIndicatorInsets}
|
|
282
282
|
extraData={feed}
|
|
283
283
|
stickyHeaderIndices={stickyHeaderIndices}
|
|
284
|
-
onLayout={handleOnLayout}
|
|
285
284
|
removeClippedSubviews={isAndroid}
|
|
285
|
+
onLayout={handleOnLayout}
|
|
286
286
|
initialNumToRender={3}
|
|
287
287
|
maxToRenderPerBatch={10}
|
|
288
288
|
windowSize={12}
|
|
289
|
-
listKey={riverId}
|
|
290
289
|
keyExtractor={keyExtractor}
|
|
291
290
|
renderItem={renderRiverItem}
|
|
292
291
|
data={riverComponents}
|
|
@@ -303,10 +302,6 @@ function ComponentsMapComponent(props: Props) {
|
|
|
303
302
|
onMomentumScrollEnd={_onMomentumScrollEnd}
|
|
304
303
|
onScrollEndDrag={_onScrollEndDrag}
|
|
305
304
|
scrollEventThrottle={16}
|
|
306
|
-
maintainVisibleContentPosition={{
|
|
307
|
-
minIndexForVisible: 0,
|
|
308
|
-
autoscrollToTopThreshold: 10,
|
|
309
|
-
}}
|
|
310
305
|
{...scrollViewExtraProps}
|
|
311
306
|
/>
|
|
312
307
|
</ViewportTracker>
|