@applicaster/quick-brick-player 14.0.0-rc.13 → 14.0.0-rc.15
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/package.json +5 -5
- package/src/Player/AudioLayer/Layout/PlayerImage/AnimatedImage.tsx +4 -5
- package/src/Player/AudioLayer/Layout/PlayerImage/FlexImage.tsx +5 -6
- package/src/Player/AudioLayer/Layout/PlayerImage/hooks/index.ts +0 -2
- package/src/Player/AudioLayer/Layout/TransportInfo/index.tsx +3 -9
- package/src/Player/AudioLayer/Layout/PlayerImage/hooks/useBackgroundImage.ts +0 -46
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-player",
|
|
3
|
-
"version": "14.0.0-rc.
|
|
3
|
+
"version": "14.0.0-rc.15",
|
|
4
4
|
"description": "Quick Brick Player",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@applicaster/quick-brick-mobile-transport-controls": "14.0.0-rc.
|
|
38
|
+
"@applicaster/quick-brick-mobile-transport-controls": "14.0.0-rc.14",
|
|
39
39
|
"@applicaster/quick-brick-tv-transport-controls": "14.0.0-rc.13",
|
|
40
|
-
"@applicaster/zapp-react-native-tvos-app": "14.0.0-rc.
|
|
41
|
-
"@applicaster/zapp-react-native-ui-components": "14.0.0-rc.
|
|
42
|
-
"@applicaster/zapp-react-native-utils": "14.0.0-rc.
|
|
40
|
+
"@applicaster/zapp-react-native-tvos-app": "14.0.0-rc.15",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "14.0.0-rc.15",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-rc.15",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"react-native-web-linear-gradient": "1.1.2",
|
|
45
45
|
"shaka-player": "4.3.5",
|
|
@@ -8,8 +8,9 @@ import {
|
|
|
8
8
|
DURATION_TO_MAXIMIZE,
|
|
9
9
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
10
10
|
import { PlayerAnimationStateT } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation/ModalAnimationContext";
|
|
11
|
+
import { useBackgroundImage } from "@applicaster/zapp-react-native-utils/audioPlayerUtils";
|
|
11
12
|
|
|
12
|
-
import { useChangePlayerState
|
|
13
|
+
import { useChangePlayerState } from "./hooks";
|
|
13
14
|
|
|
14
15
|
const styles = StyleSheet.create({
|
|
15
16
|
container: {
|
|
@@ -29,7 +30,7 @@ type Props = PropsWithChildren<{
|
|
|
29
30
|
export const AnimatedImage = ({ entry, style, imageWidth, docked }: Props) => {
|
|
30
31
|
const heightAnim = React.useRef(new Animated.Value(imageWidth)).current;
|
|
31
32
|
|
|
32
|
-
const
|
|
33
|
+
const backgroundImageSource = useBackgroundImage(entry);
|
|
33
34
|
|
|
34
35
|
const { minimisedHeight } = useModalAnimationContext();
|
|
35
36
|
|
|
@@ -66,8 +67,6 @@ export const AnimatedImage = ({ entry, style, imageWidth, docked }: Props) => {
|
|
|
66
67
|
};
|
|
67
68
|
}, [changePlayerState$, minimisedHeight, imageWidth]);
|
|
68
69
|
|
|
69
|
-
if (!source) return null;
|
|
70
|
-
|
|
71
70
|
return (
|
|
72
71
|
<Animated.View
|
|
73
72
|
style={[
|
|
@@ -77,7 +76,7 @@ export const AnimatedImage = ({ entry, style, imageWidth, docked }: Props) => {
|
|
|
77
76
|
},
|
|
78
77
|
]}
|
|
79
78
|
>
|
|
80
|
-
<Image resizeMode="cover" style={style} source={
|
|
79
|
+
<Image resizeMode="cover" style={style} source={backgroundImageSource} />
|
|
81
80
|
</Animated.View>
|
|
82
81
|
);
|
|
83
82
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Image, ImageStyle } from "react-native";
|
|
3
|
-
|
|
4
|
-
import { useBackgroundImage } from "./hooks";
|
|
3
|
+
import { useBackgroundImage } from "@applicaster/zapp-react-native-utils/audioPlayerUtils";
|
|
5
4
|
|
|
6
5
|
type Props = {
|
|
7
6
|
entry: ZappEntry;
|
|
@@ -9,9 +8,9 @@ type Props = {
|
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export const FlexImage = ({ entry, style }: Props) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
if (!source) return null;
|
|
11
|
+
const backgroundImageSource = useBackgroundImage(entry);
|
|
15
12
|
|
|
16
|
-
return
|
|
13
|
+
return (
|
|
14
|
+
<Image resizeMode="cover" style={style} source={backgroundImageSource} />
|
|
15
|
+
);
|
|
17
16
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { compose, map, propOr, split, take, trim } from "ramda";
|
|
3
2
|
import { LayoutChangeEvent, StyleSheet, View } from "react-native";
|
|
4
3
|
|
|
5
4
|
import { TransportInfo as MobileTransportInfo } from "@applicaster/quick-brick-mobile-transport-controls";
|
|
@@ -16,6 +15,7 @@ import { NAVBAR_HEIGHT, TABLET_LANDSCAPE } from "../const";
|
|
|
16
15
|
import { withDebug } from "../debug";
|
|
17
16
|
import { useSafeAreaFrame } from "react-native-safe-area-context";
|
|
18
17
|
import { isSmallTabletHeight } from "../utils";
|
|
18
|
+
import { getPlayerActionButtons } from "@applicaster/zapp-react-native-utils/playerUtils";
|
|
19
19
|
|
|
20
20
|
const styles = StyleSheet.create({
|
|
21
21
|
container: {
|
|
@@ -85,14 +85,8 @@ export const TransportInfo = ({
|
|
|
85
85
|
);
|
|
86
86
|
|
|
87
87
|
const actionButtons = React.useMemo(
|
|
88
|
-
() =>
|
|
89
|
-
|
|
90
|
-
take(2),
|
|
91
|
-
map(trim),
|
|
92
|
-
split(","),
|
|
93
|
-
propOr("", "player_action_buttons")
|
|
94
|
-
)(configuration),
|
|
95
|
-
[configuration.player_action_buttons]
|
|
88
|
+
() => getPlayerActionButtons(configuration),
|
|
89
|
+
[configuration]
|
|
96
90
|
);
|
|
97
91
|
|
|
98
92
|
return (
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useZStore } from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
3
|
-
import { getBackgroundImage } from "@applicaster/zapp-react-native-utils/audioPlayerUtils";
|
|
4
|
-
|
|
5
|
-
const audioPlayerImageKeySelector = (config) => config?.audio_player_image_key;
|
|
6
|
-
|
|
7
|
-
const audioPlayerBackgroundImageSelector = (config) =>
|
|
8
|
-
config?.audio_player_background_image;
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
entry: ZappEntry;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
type Return = {
|
|
15
|
-
uri: string;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const useBackgroundImage = ({ entry }: Props): Return => {
|
|
19
|
-
const configuration = useZStore("playerConfiguration");
|
|
20
|
-
|
|
21
|
-
const audio_player_image_key = configuration(audioPlayerImageKeySelector);
|
|
22
|
-
|
|
23
|
-
const audio_player_background_image = configuration(
|
|
24
|
-
audioPlayerBackgroundImageSelector
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
const pluginConfiguration = React.useMemo(
|
|
28
|
-
() => ({
|
|
29
|
-
audio_player_image_key,
|
|
30
|
-
audio_player_background_image,
|
|
31
|
-
}),
|
|
32
|
-
[audio_player_image_key, audio_player_background_image]
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
const source = React.useMemo(
|
|
36
|
-
() => ({
|
|
37
|
-
uri: getBackgroundImage({
|
|
38
|
-
entry,
|
|
39
|
-
plugin_configuration: pluginConfiguration,
|
|
40
|
-
}),
|
|
41
|
-
}),
|
|
42
|
-
[entry, pluginConfiguration]
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
return source;
|
|
46
|
-
};
|