@applicaster/quick-brick-player 15.0.0-rc.33 → 15.0.0-rc.34
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-player",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.34",
|
|
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": "15.0.0-rc.
|
|
38
|
+
"@applicaster/quick-brick-mobile-transport-controls": "15.0.0-rc.34",
|
|
39
39
|
"@applicaster/quick-brick-tv-transport-controls": "15.0.0-rc.15",
|
|
40
|
-
"@applicaster/zapp-react-native-tvos-app": "15.0.0-rc.
|
|
41
|
-
"@applicaster/zapp-react-native-ui-components": "15.0.0-rc.
|
|
42
|
-
"@applicaster/zapp-react-native-utils": "15.0.0-rc.
|
|
40
|
+
"@applicaster/zapp-react-native-tvos-app": "15.0.0-rc.34",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "15.0.0-rc.34",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "15.0.0-rc.34",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"shaka-player": "4.3.5",
|
|
45
45
|
"typeface-montserrat": "^0.0.54",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { LayoutChangeEvent, View } from "react-native";
|
|
2
|
+
import { Animated, LayoutChangeEvent, View } from "react-native";
|
|
3
3
|
|
|
4
4
|
import { noop } from "@applicaster/zapp-react-native-utils/functionUtils";
|
|
5
5
|
import { toBooleanWithDefaultTrue } from "@applicaster/zapp-react-native-utils/booleanUtils";
|
|
@@ -8,6 +8,7 @@ import { FlexImage } from "./FlexImage";
|
|
|
8
8
|
|
|
9
9
|
import { styles } from "./styles";
|
|
10
10
|
import { toNumberWithDefaultZero } from "@applicaster/zapp-react-native-utils/numberUtils";
|
|
11
|
+
import { useModalAnimationContext } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
11
12
|
|
|
12
13
|
type Props = {
|
|
13
14
|
entry: ZappEntry;
|
|
@@ -29,15 +30,34 @@ export const PlayerImage = (props: Props) => {
|
|
|
29
30
|
configuration.audio_player_artwork_border_radius
|
|
30
31
|
);
|
|
31
32
|
|
|
33
|
+
const { yTranslate } = useModalAnimationContext();
|
|
34
|
+
|
|
35
|
+
const isModalExpanded = yTranslate.current.interpolate({
|
|
36
|
+
inputRange: [0, 1], // this should be end with `1` only when it's in initial state ( 0pos), otherwise `0`
|
|
37
|
+
outputRange: [1, 0],
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
// do not use styles.shadow when isModalExpanded is 0
|
|
41
|
+
|
|
42
|
+
const animatedStyle = {
|
|
43
|
+
opacity: isModalExpanded,
|
|
44
|
+
};
|
|
45
|
+
|
|
32
46
|
return (
|
|
33
47
|
<View style={styles.alignItemsCenter}>
|
|
48
|
+
{/* Using an Animated.View to apply shadow to the image */}
|
|
49
|
+
<Animated.View
|
|
50
|
+
style={[
|
|
51
|
+
animatedStyle,
|
|
52
|
+
shouldShowShadow ? styles.shadow : undefined,
|
|
53
|
+
{ borderRadius },
|
|
54
|
+
]}
|
|
55
|
+
/>
|
|
34
56
|
<View
|
|
35
57
|
onLayout={onLayoutImage}
|
|
36
|
-
style={[
|
|
58
|
+
style={[styles.defaultImageWrapperView, { borderRadius }]}
|
|
37
59
|
>
|
|
38
|
-
<
|
|
39
|
-
<FlexImage entry={entry} style={styles.backgroundImageContainer} />
|
|
40
|
-
</View>
|
|
60
|
+
<FlexImage entry={entry} style={styles.backgroundImageContainer} />
|
|
41
61
|
</View>
|
|
42
62
|
</View>
|
|
43
63
|
);
|
|
@@ -23,7 +23,12 @@ export const styles = StyleSheet.create({
|
|
|
23
23
|
overflow: "hidden",
|
|
24
24
|
},
|
|
25
25
|
shadow: {
|
|
26
|
-
|
|
26
|
+
zIndex: 0,
|
|
27
|
+
position: "absolute",
|
|
28
|
+
top: 0,
|
|
29
|
+
left: 0,
|
|
30
|
+
right: 0,
|
|
31
|
+
bottom: 0,
|
|
27
32
|
shadowColor: SHADOW_COLOR,
|
|
28
33
|
shadowOffset: { width: 0, height: 24 },
|
|
29
34
|
shadowOpacity: platformSelect({
|
|
@@ -7,7 +7,10 @@ import { State } from "react-native-gesture-handler";
|
|
|
7
7
|
import { Animated } from "react-native";
|
|
8
8
|
|
|
9
9
|
import { VideoModalMode } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainer";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
useConfiguration,
|
|
12
|
+
useAnimationStateStore,
|
|
13
|
+
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/utils";
|
|
11
14
|
import { getTabBarHeight } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/getTabBarHeight";
|
|
12
15
|
import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks/navigation/useNavigation";
|
|
13
16
|
import { isMenuVisible } from "@applicaster/zapp-react-native-ui-components/Components/Screen/navigationHandler";
|
|
@@ -100,6 +103,15 @@ export const useVideoModalState = (
|
|
|
100
103
|
|
|
101
104
|
const onHandlerStateChange = useCallback(
|
|
102
105
|
(event: any) => {
|
|
106
|
+
if (
|
|
107
|
+
event.nativeEvent.state === State.ACTIVE ||
|
|
108
|
+
event.nativeEvent.oldState === State.ACTIVE
|
|
109
|
+
) {
|
|
110
|
+
useAnimationStateStore.setState({
|
|
111
|
+
isAnimationInProgress: event.nativeEvent.state === State.ACTIVE,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
103
115
|
if (event.nativeEvent.oldState === State.ACTIVE) {
|
|
104
116
|
const { translationY } = event.nativeEvent;
|
|
105
117
|
let newY = offset.current + translationY;
|