@applicaster/zapp-react-native-ui-components 16.0.0-rc.25 → 16.0.0-rc.27
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/CellRendererResolver/index.ts +1 -1
- package/Components/MasterCell/index.tsx +20 -4
- package/Components/PlayerContainer/PlayerContainer.tsx +7 -3
- package/package.json +5 -5
- /package/Components/BackgroundImage/{BackgroundImage.tv.android.tsx → BackgroundImage.android.tv.tsx} +0 -0
- /package/Components/BackgroundImage/{BackgroundImage.tv.ios.tsx → BackgroundImage.ios.tv.tsx} +0 -0
- /package/Components/MasterCell/DefaultComponents/ButtonContainerView/{index.tv.android.tsx → index.android.tv.tsx} +0 -0
|
@@ -2,6 +2,8 @@ import * as R from "ramda";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { v4 as uuid } from "uuid";
|
|
4
4
|
|
|
5
|
+
import { isHorizontalList } from "@applicaster/zapp-react-native-utils/componentsUtils";
|
|
6
|
+
import { isVideoPreviewEnabled } from "@applicaster/zapp-react-native-ui-components/Components/MasterCell/utils";
|
|
5
7
|
import { useRoute } from "@applicaster/zapp-react-native-utils/reactHooks/navigation";
|
|
6
8
|
import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
|
|
7
9
|
import { useScreenState } from "@applicaster/zapp-react-native-utils/screenState";
|
|
@@ -35,8 +37,8 @@ type MasterCellBuilderOptions = {
|
|
|
35
37
|
containerStyle: any;
|
|
36
38
|
cellOptions?: {
|
|
37
39
|
isRTL?: boolean;
|
|
38
|
-
generateId?: () => string;
|
|
39
40
|
skipButtons?: boolean;
|
|
41
|
+
component?: ZappComponent;
|
|
40
42
|
};
|
|
41
43
|
};
|
|
42
44
|
|
|
@@ -47,7 +49,7 @@ export function masterCellBuilder({
|
|
|
47
49
|
containerStyle = defaultContainerStyle,
|
|
48
50
|
cellOptions = {},
|
|
49
51
|
}: MasterCellBuilderOptions) {
|
|
50
|
-
const {
|
|
52
|
+
const { skipButtons = false, component } = cellOptions;
|
|
51
53
|
|
|
52
54
|
const componentsMap = R.merge(defaultComponents, components);
|
|
53
55
|
const { View } = componentsMap;
|
|
@@ -100,8 +102,22 @@ export function masterCellBuilder({
|
|
|
100
102
|
|
|
101
103
|
const wrapperRef = React.useRef(null);
|
|
102
104
|
|
|
103
|
-
const cellUUID = React.useMemo<string>(
|
|
104
|
-
|
|
105
|
+
const cellUUID = React.useMemo<string>(() => {
|
|
106
|
+
const isLiveImage = isVideoPreviewEnabled({
|
|
107
|
+
enable_video_preview: component?.rules?.enable_video_preview,
|
|
108
|
+
player_screen_id: component?.rules?.player_screen_id,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
const isHL = isHorizontalList(component);
|
|
112
|
+
|
|
113
|
+
return isHL && isLiveImage
|
|
114
|
+
? `${component?.id}-${component?.styles?.cell_plugin_configuration_id}`
|
|
115
|
+
: uuid();
|
|
116
|
+
}, [
|
|
117
|
+
component?.id,
|
|
118
|
+
component?.styles?.cell_plugin_configuration_id,
|
|
119
|
+
component?.rules?.enable_video_preview,
|
|
120
|
+
component?.rules?.player_screen_id,
|
|
105
121
|
screenId,
|
|
106
122
|
item?.id,
|
|
107
123
|
]);
|
|
@@ -344,11 +344,15 @@ const PlayerContainerComponent = (props: Props) => {
|
|
|
344
344
|
setIsLoadingNextVideo(false);
|
|
345
345
|
|
|
346
346
|
const resumeTime = Number(item?.extensions?.resumeTime);
|
|
347
|
+
const activePlayer = playerManager.getActivePlayer();
|
|
347
348
|
|
|
348
|
-
// Сhecking that the player itself knows where to start playing, and there is no need to call seekTo after returning from the Сhromecast
|
|
349
|
+
// Сhecking that the player itself knows where to start playing, and there is no need to call seekTo after returning from the Сhromecast.
|
|
350
|
+
// Live streams and a missing/zero resume position are skipped: seeking to 0 on
|
|
351
|
+
// a live stream pulls playback off the live edge into a buffer-starvation seek loop.
|
|
349
352
|
if (
|
|
350
|
-
!
|
|
351
|
-
|
|
353
|
+
!activePlayer?.hasResumePosition() &&
|
|
354
|
+
resumeTime > 0 &&
|
|
355
|
+
!activePlayer?.isLive()
|
|
352
356
|
) {
|
|
353
357
|
player?.seekTo(resumeTime);
|
|
354
358
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-ui-components",
|
|
3
|
-
"version": "16.0.0-rc.
|
|
3
|
+
"version": "16.0.0-rc.27",
|
|
4
4
|
"description": "Applicaster Zapp React Native ui components for the Quick Brick App",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "16.0.0-rc.
|
|
32
|
-
"@applicaster/zapp-react-native-bridge": "16.0.0-rc.
|
|
33
|
-
"@applicaster/zapp-react-native-redux": "16.0.0-rc.
|
|
34
|
-
"@applicaster/zapp-react-native-utils": "16.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "16.0.0-rc.27",
|
|
32
|
+
"@applicaster/zapp-react-native-bridge": "16.0.0-rc.27",
|
|
33
|
+
"@applicaster/zapp-react-native-redux": "16.0.0-rc.27",
|
|
34
|
+
"@applicaster/zapp-react-native-utils": "16.0.0-rc.27",
|
|
35
35
|
"fast-json-stable-stringify": "^2.1.0",
|
|
36
36
|
"promise": "^8.3.0",
|
|
37
37
|
"url": "^0.11.0",
|
|
File without changes
|
/package/Components/BackgroundImage/{BackgroundImage.tv.ios.tsx → BackgroundImage.ios.tv.tsx}
RENAMED
|
File without changes
|
|
File without changes
|