@applicaster/quick-brick-player 14.0.0-rc.38 → 14.0.0-rc.39
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-rc.
|
|
3
|
+
"version": "14.0.0-rc.39",
|
|
4
4
|
"description": "Quick Brick Player",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@applicaster/quick-brick-mobile-transport-controls": "14.0.0-rc.37",
|
|
39
39
|
"@applicaster/quick-brick-tv-transport-controls": "14.0.0-rc.37",
|
|
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.39",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "14.0.0-rc.39",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "14.0.0-rc.39",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"shaka-player": "4.3.5",
|
|
45
45
|
"typeface-montserrat": "^0.0.54",
|
|
@@ -32,14 +32,15 @@ const directionStyles = (isLandscape: boolean): ViewStyle => {
|
|
|
32
32
|
type AnimatedModalProps = {
|
|
33
33
|
enabled?: boolean;
|
|
34
34
|
pip?: boolean;
|
|
35
|
+
fullscreen?: boolean;
|
|
35
36
|
content?: (
|
|
36
|
-
opacity: Animated.Value | Animated.AnimatedInterpolation
|
|
37
|
+
opacity: Animated.Value | Animated.AnimatedInterpolation<number>
|
|
37
38
|
) => ReactElement;
|
|
38
39
|
collapsedContent?: (
|
|
39
|
-
opacity: Animated.Value | Animated.AnimatedInterpolation
|
|
40
|
+
opacity: Animated.Value | Animated.AnimatedInterpolation<number>
|
|
40
41
|
) => ReactElement;
|
|
41
42
|
extraContent?: (
|
|
42
|
-
opacity: Animated.Value | Animated.AnimatedInterpolation
|
|
43
|
+
opacity: Animated.Value | Animated.AnimatedInterpolation<number>
|
|
43
44
|
) => ReactElement;
|
|
44
45
|
aspectRatio?: number;
|
|
45
46
|
isTabletPortrait?: boolean;
|
|
@@ -61,6 +62,7 @@ export function VideoPlayerModal({
|
|
|
61
62
|
isTabletPortrait,
|
|
62
63
|
style,
|
|
63
64
|
pip = false,
|
|
65
|
+
fullscreen = false,
|
|
64
66
|
}: AnimatedModalProps) {
|
|
65
67
|
const isTablet = useIsTablet();
|
|
66
68
|
|
|
@@ -91,65 +93,78 @@ export function VideoPlayerModal({
|
|
|
91
93
|
|
|
92
94
|
const insets = useSafeAreaInsets();
|
|
93
95
|
|
|
96
|
+
const isFullScreenOrPIP = fullscreen || pip;
|
|
97
|
+
|
|
94
98
|
// Interpolated opacities for smooth cross-fade
|
|
95
|
-
const collapsedOpacity =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
99
|
+
const collapsedOpacity = !isFullScreenOrPIP
|
|
100
|
+
? translateY.interpolate({
|
|
101
|
+
inputRange: [MODAL_COLLAPSE_START, height - collapsedHeight],
|
|
102
|
+
outputRange: [0, 1],
|
|
103
|
+
extrapolate: "clamp",
|
|
104
|
+
})
|
|
105
|
+
: new Animated.Value(0);
|
|
106
|
+
|
|
107
|
+
const expandedOpacity = !isFullScreenOrPIP
|
|
108
|
+
? translateY.interpolate({
|
|
109
|
+
inputRange: [0, height - collapsedHeight],
|
|
110
|
+
outputRange: [1, 0],
|
|
111
|
+
extrapolate: "clamp",
|
|
112
|
+
})
|
|
113
|
+
: new Animated.Value(1);
|
|
114
|
+
|
|
115
|
+
const xPosition = !isFullScreenOrPIP
|
|
116
|
+
? translateY.interpolate({
|
|
117
|
+
inputRange: [
|
|
118
|
+
height * VIDEO_TRANSITION_THRESHOLD,
|
|
119
|
+
height - collapsedHeight,
|
|
120
|
+
],
|
|
121
|
+
outputRange: [0, -(width - width * SCALE_FACTOR) / 2],
|
|
122
|
+
extrapolate: "clamp",
|
|
123
|
+
})
|
|
124
|
+
: new Animated.Value(0);
|
|
112
125
|
|
|
113
126
|
const vidHeight = width / aspectRatio;
|
|
114
127
|
|
|
115
|
-
const yPosition =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
128
|
+
const yPosition = !isFullScreenOrPIP
|
|
129
|
+
? translateY.interpolate({
|
|
130
|
+
inputRange: [
|
|
131
|
+
height * VIDEO_TRANSITION_THRESHOLD,
|
|
132
|
+
height - collapsedHeight,
|
|
133
|
+
],
|
|
134
|
+
outputRange: [
|
|
135
|
+
0,
|
|
136
|
+
isTablet && isTabletLandscape
|
|
137
|
+
? -((-PROGRESS_BAR_HEIGHT + height - vidHeight * SCALE_FACTOR) / 2)
|
|
138
|
+
: -(
|
|
139
|
+
PROGRESS_BAR_HEIGHT +
|
|
140
|
+
insets.top / 2 +
|
|
141
|
+
(SCREEN_WIDTH / aspectRatio -
|
|
142
|
+
(SCREEN_WIDTH / aspectRatio) * SCALE_FACTOR) /
|
|
143
|
+
2
|
|
144
|
+
),
|
|
145
|
+
],
|
|
146
|
+
extrapolate: "clamp",
|
|
147
|
+
})
|
|
148
|
+
: new Animated.Value(0);
|
|
149
|
+
|
|
150
|
+
const scalePosition = !isFullScreenOrPIP
|
|
151
|
+
? translateY.interpolate({
|
|
152
|
+
inputRange: [
|
|
153
|
+
height * VIDEO_TRANSITION_THRESHOLD,
|
|
154
|
+
height - collapsedHeight,
|
|
155
|
+
],
|
|
156
|
+
outputRange: [1, SCALE_FACTOR],
|
|
157
|
+
extrapolate: "clamp",
|
|
158
|
+
})
|
|
159
|
+
: new Animated.Value(1);
|
|
160
|
+
|
|
161
|
+
const borderTopRadiusAnimated = !isFullScreenOrPIP
|
|
162
|
+
? translateY.interpolate({
|
|
163
|
+
inputRange: [0, height - collapsedHeight],
|
|
164
|
+
outputRange: [MODAL_RADIUS, 0],
|
|
165
|
+
extrapolate: "clamp",
|
|
166
|
+
})
|
|
167
|
+
: new Animated.Value(0);
|
|
153
168
|
|
|
154
169
|
return (
|
|
155
170
|
<PanGestureHandler
|
|
@@ -164,8 +179,8 @@ export function VideoPlayerModal({
|
|
|
164
179
|
{
|
|
165
180
|
borderTopLeftRadius: borderTopRadiusAnimated,
|
|
166
181
|
borderTopRightRadius: borderTopRadiusAnimated,
|
|
167
|
-
transform: [{ translateY }],
|
|
168
|
-
height:
|
|
182
|
+
transform: [{ translateY: isFullScreenOrPIP ? 0 : translateY }],
|
|
183
|
+
height: height,
|
|
169
184
|
},
|
|
170
185
|
]}
|
|
171
186
|
>
|
|
@@ -177,7 +192,7 @@ export function VideoPlayerModal({
|
|
|
177
192
|
{
|
|
178
193
|
borderTopLeftRadius: borderTopRadiusAnimated,
|
|
179
194
|
borderTopRightRadius: borderTopRadiusAnimated,
|
|
180
|
-
height:
|
|
195
|
+
height: height,
|
|
181
196
|
},
|
|
182
197
|
]}
|
|
183
198
|
>
|
|
@@ -215,21 +230,23 @@ export function VideoPlayerModal({
|
|
|
215
230
|
) : null}
|
|
216
231
|
</Animated.View>
|
|
217
232
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
<Pressable
|
|
226
|
-
testID="collapsedBarWrapper"
|
|
227
|
-
onPress={expand}
|
|
228
|
-
style={styles.collapsedBarWrapper}
|
|
233
|
+
{!isFullScreenOrPIP ? (
|
|
234
|
+
<Animated.View
|
|
235
|
+
pointerEvents={collapsed ? "box-none" : "none"}
|
|
236
|
+
style={[
|
|
237
|
+
styles.collapsedBarContainer,
|
|
238
|
+
{ opacity: collapsedOpacity },
|
|
239
|
+
]}
|
|
229
240
|
>
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
241
|
+
<Pressable
|
|
242
|
+
testID="collapsedBarWrapper"
|
|
243
|
+
onPress={expand}
|
|
244
|
+
style={styles.collapsedBarWrapper}
|
|
245
|
+
>
|
|
246
|
+
{collapsedContent}
|
|
247
|
+
</Pressable>
|
|
248
|
+
</Animated.View>
|
|
249
|
+
) : null}
|
|
233
250
|
</Animated.View>
|
|
234
251
|
</Animated.View>
|
|
235
252
|
</PanGestureHandler>
|
package/src/Player/index.tsx
CHANGED
|
@@ -1036,6 +1036,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
1036
1036
|
isTabletPortrait={isTabletPortrait}
|
|
1037
1037
|
aspectRatio={aspectRatio}
|
|
1038
1038
|
pip={this.state.piped}
|
|
1039
|
+
fullscreen={fullscreen}
|
|
1039
1040
|
style={{
|
|
1040
1041
|
tabletLandscapeWidth: getTabletWidth(
|
|
1041
1042
|
this.getPluginConfiguration().tablet_landscape_sidebar_width,
|