@applicaster/quick-brick-player 14.0.0-alpha.9567513212 → 14.0.0-alpha.9848043301
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": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.9848043301",
|
|
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-alpha.
|
|
38
|
+
"@applicaster/quick-brick-mobile-transport-controls": "14.0.0-alpha.9848043301",
|
|
39
39
|
"@applicaster/quick-brick-tv-transport-controls": "14.0.0-rc.7",
|
|
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.
|
|
40
|
+
"@applicaster/zapp-react-native-tvos-app": "14.0.0-alpha.9848043301",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.9848043301",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-alpha.9848043301",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"react-native-web-linear-gradient": "1.1.2",
|
|
45
45
|
"shaka-player": "4.3.5",
|
|
@@ -7,6 +7,7 @@ import { useConfiguration } from "@applicaster/zapp-react-native-ui-components/C
|
|
|
7
7
|
import { useVideoModalState } from "./hooks";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_IMAGE_RATIO_VIDEO,
|
|
10
|
+
MODAL_COLLAPSE_START,
|
|
10
11
|
MODAL_RADIUS,
|
|
11
12
|
SCREEN_HEIGHT,
|
|
12
13
|
SCREEN_WIDTH,
|
|
@@ -89,9 +90,11 @@ export function VideoPlayerModal({
|
|
|
89
90
|
|
|
90
91
|
const VIDEO_TRANSITION_THRESHOLD = 0.5; // Threshold for video transition
|
|
91
92
|
|
|
93
|
+
const insets = useSafeAreaInsets();
|
|
94
|
+
|
|
92
95
|
// Interpolated opacities for smooth cross-fade
|
|
93
96
|
const collapsedOpacity = translateY.interpolate({
|
|
94
|
-
inputRange: [
|
|
97
|
+
inputRange: [MODAL_COLLAPSE_START, height - collapsedHeight],
|
|
95
98
|
outputRange: [0, 1],
|
|
96
99
|
extrapolate: "clamp",
|
|
97
100
|
});
|
|
@@ -110,8 +113,6 @@ export function VideoPlayerModal({
|
|
|
110
113
|
|
|
111
114
|
const vidHeight = width / aspectRatio;
|
|
112
115
|
|
|
113
|
-
const insets = useSafeAreaInsets();
|
|
114
|
-
|
|
115
116
|
const yPosition = translateY.interpolate({
|
|
116
117
|
inputRange: [height * VIDEO_TRANSITION_THRESHOLD, height - collapsedHeight],
|
|
117
118
|
outputRange: [
|
|
@@ -5,11 +5,11 @@ export const DOCKED_PROGRESSBAR_HEIGHT = 3; // Height of the docked progress bar
|
|
|
5
5
|
export const { width: SCREEN_WIDTH, height: SCREEN_HEIGHT } =
|
|
6
6
|
Dimensions.get("window");
|
|
7
7
|
|
|
8
|
-
export const MODAL_COLLAPSE_START = SCREEN_HEIGHT * 0.
|
|
8
|
+
export const MODAL_COLLAPSE_START = SCREEN_HEIGHT * 0.7; // 70% of screen height
|
|
9
9
|
|
|
10
|
-
export const DRAG_TO_COLLAPSE = 0.
|
|
10
|
+
export const DRAG_TO_COLLAPSE = 0.05; // 5% to collapse
|
|
11
11
|
|
|
12
|
-
export const DRAG_TO_EXPAND = 0.
|
|
12
|
+
export const DRAG_TO_EXPAND = 0.02; // 2% to expand
|
|
13
13
|
|
|
14
14
|
export const DEFAULT_IMAGE_RATIO_VIDEO = 16 / 9; // Default aspect ratio for video
|
|
15
15
|
|
|
@@ -82,8 +82,11 @@ export const useVideoModalState = (
|
|
|
82
82
|
newY = SCREEN_HEIGHT - collapsedHeight;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
const shouldCollapse =
|
|
86
|
-
|
|
85
|
+
const shouldCollapse =
|
|
86
|
+
translationY > (SCREEN_HEIGHT - collapsedHeight) * DRAG_TO_COLLAPSE;
|
|
87
|
+
|
|
88
|
+
const shouldExpand =
|
|
89
|
+
translationY < -(SCREEN_HEIGHT - collapsedHeight) * DRAG_TO_EXPAND;
|
|
87
90
|
|
|
88
91
|
if (!collapsed && shouldCollapse) {
|
|
89
92
|
// Collapse
|