@applicaster/quick-brick-player 14.0.0-alpha.1615413083 → 14.0.0-alpha.2247415563
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 +6 -7
- package/src/Player/AudioLayer/Layout/PlayerImage/AnimatedImage.tsx +3 -8
- package/src/Player/AudioLayer/Layout/PlayerImage/FlexImage.tsx +5 -9
- package/src/Player/AudioLayer/Layout/TransportInfo/index.tsx +3 -9
- package/src/Player/PlayerView/TVPlayerView.tsx +8 -1
- package/src/Player/PlayerView/types.ts +6 -3
- package/src/Player/index.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-player",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.2247415563",
|
|
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": "
|
|
39
|
-
"@applicaster/quick-brick-tv-transport-controls": "14.0.0-
|
|
40
|
-
"@applicaster/zapp-react-native-tvos-app": "14.0.0-alpha.
|
|
41
|
-
"@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.
|
|
42
|
-
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.
|
|
38
|
+
"@applicaster/quick-brick-mobile-transport-controls": "14.0.0-alpha.2247415563",
|
|
39
|
+
"@applicaster/quick-brick-tv-transport-controls": "14.0.0-alpha.2247415563",
|
|
40
|
+
"@applicaster/zapp-react-native-tvos-app": "14.0.0-alpha.2247415563",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.2247415563",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.2247415563",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"react-native-web-linear-gradient": "1.1.2",
|
|
45
45
|
"shaka-player": "4.3.5",
|
|
@@ -64,7 +64,6 @@
|
|
|
64
64
|
"react-native-fs": "*",
|
|
65
65
|
"react-native-gesture-handler": "*",
|
|
66
66
|
"react-native-linear-gradient": "*",
|
|
67
|
-
"react-native-safe-area-context": "*",
|
|
68
67
|
"react-native-svg": "*",
|
|
69
68
|
"react-native-web": "*",
|
|
70
69
|
"react-native-webview": "*",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from "react";
|
|
2
2
|
import { Image, Animated, StyleSheet, ImageStyle } from "react-native";
|
|
3
3
|
|
|
4
|
-
import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
|
|
5
4
|
import {
|
|
6
5
|
useModalAnimationContext,
|
|
7
6
|
PlayerAnimationStateEnum,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
DURATION_TO_MAXIMIZE,
|
|
10
9
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
11
10
|
import { PlayerAnimationStateT } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation/ModalAnimationContext";
|
|
11
|
+
import { useBackgroundImage } from "@applicaster/zapp-react-native-utils/audioPlayerUtils";
|
|
12
12
|
|
|
13
13
|
import { useChangePlayerState } from "./hooks";
|
|
14
14
|
|
|
@@ -30,10 +30,7 @@ type Props = PropsWithChildren<{
|
|
|
30
30
|
export const AnimatedImage = ({ entry, style, imageWidth, docked }: Props) => {
|
|
31
31
|
const heightAnim = React.useRef(new Animated.Value(imageWidth)).current;
|
|
32
32
|
|
|
33
|
-
const
|
|
34
|
-
() => ({ uri: imageSrcFromMediaItem(entry, undefined) }),
|
|
35
|
-
[entry]
|
|
36
|
-
);
|
|
33
|
+
const backgroundImageSource = useBackgroundImage(entry);
|
|
37
34
|
|
|
38
35
|
const { minimisedHeight } = useModalAnimationContext();
|
|
39
36
|
|
|
@@ -70,8 +67,6 @@ export const AnimatedImage = ({ entry, style, imageWidth, docked }: Props) => {
|
|
|
70
67
|
};
|
|
71
68
|
}, [changePlayerState$, minimisedHeight, imageWidth]);
|
|
72
69
|
|
|
73
|
-
if (!source) return null;
|
|
74
|
-
|
|
75
70
|
return (
|
|
76
71
|
<Animated.View
|
|
77
72
|
style={[
|
|
@@ -81,7 +76,7 @@ export const AnimatedImage = ({ entry, style, imageWidth, docked }: Props) => {
|
|
|
81
76
|
},
|
|
82
77
|
]}
|
|
83
78
|
>
|
|
84
|
-
<Image resizeMode="cover" style={style} source={
|
|
79
|
+
<Image resizeMode="cover" style={style} source={backgroundImageSource} />
|
|
85
80
|
</Animated.View>
|
|
86
81
|
);
|
|
87
82
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Image, ImageStyle } from "react-native";
|
|
3
|
-
|
|
4
|
-
import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
|
|
3
|
+
import { useBackgroundImage } from "@applicaster/zapp-react-native-utils/audioPlayerUtils";
|
|
5
4
|
|
|
6
5
|
type Props = {
|
|
7
6
|
entry: ZappEntry;
|
|
@@ -9,12 +8,9 @@ type Props = {
|
|
|
9
8
|
};
|
|
10
9
|
|
|
11
10
|
export const FlexImage = ({ entry, style }: Props) => {
|
|
12
|
-
const
|
|
13
|
-
() => ({ uri: imageSrcFromMediaItem(entry, undefined) }),
|
|
14
|
-
[entry]
|
|
15
|
-
);
|
|
11
|
+
const backgroundImageSource = useBackgroundImage(entry);
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
return (
|
|
14
|
+
<Image resizeMode="cover" style={style} source={backgroundImageSource} />
|
|
15
|
+
);
|
|
20
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 (
|
|
@@ -10,8 +10,15 @@ import {
|
|
|
10
10
|
|
|
11
11
|
const isTvOS = isTvOSPlatform();
|
|
12
12
|
|
|
13
|
+
const shouldRenderTvOSPlayerView = (
|
|
14
|
+
isTvOS: boolean,
|
|
15
|
+
inline: boolean
|
|
16
|
+
): boolean => {
|
|
17
|
+
return isTvOS && !inline;
|
|
18
|
+
};
|
|
19
|
+
|
|
13
20
|
export const TVPlayerView: React.FC<TVPlayerViewProps> = (props) => {
|
|
14
|
-
return isTvOS
|
|
21
|
+
return shouldRenderTvOSPlayerView(isTvOS, props.inline) ? (
|
|
15
22
|
<TvOSPlayerView {...(props as TvOSPlayerViewProps)} />
|
|
16
23
|
) : (
|
|
17
24
|
<GenericTVPlayerView {...(props as GenericTVPlayerViewProps)} />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode, ComponentType } from "react";
|
|
2
2
|
import { PlayNextData } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainer";
|
|
3
|
+
import { ViewStyle } from "react-native";
|
|
3
4
|
|
|
4
5
|
export interface PlayNextOverlayProps {
|
|
5
6
|
playerIsDocked: boolean;
|
|
@@ -9,11 +10,14 @@ export interface PlayNextOverlayProps {
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export interface PlayerComponentProps {
|
|
12
|
-
|
|
13
|
+
ref: React.RefObject<any>;
|
|
14
|
+
listener: Record<string, any>;
|
|
15
|
+
configuration: Record<string, any>;
|
|
16
|
+
style: ViewStyle;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
export interface AudioPlayerProps {
|
|
16
|
-
|
|
20
|
+
style: ViewStyle;
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
export interface PlayerViewBaseProps {
|
|
@@ -24,7 +28,6 @@ export interface PlayerViewBaseProps {
|
|
|
24
28
|
PlayerComponent: ComponentType<any>;
|
|
25
29
|
playerProps: PlayerComponentProps;
|
|
26
30
|
playNextProps: PlayNextOverlayProps;
|
|
27
|
-
AudioPlayer: ComponentType<any>;
|
|
28
31
|
audioPlayerProps: AudioPlayerProps;
|
|
29
32
|
transportControls?: ReactNode;
|
|
30
33
|
inline?: boolean;
|
package/src/Player/index.tsx
CHANGED
|
@@ -1107,6 +1107,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
1107
1107
|
style: this.takeParentStyle,
|
|
1108
1108
|
controller: this.props.controller,
|
|
1109
1109
|
}}
|
|
1110
|
+
audioPlayerProps={{ style: getStyle(styles.playerSize) }}
|
|
1110
1111
|
playNextProps={{
|
|
1111
1112
|
playerIsDocked: docked,
|
|
1112
1113
|
playerId: this.props.playerId,
|