@applicaster/quick-brick-player 15.0.0-rc.1 → 15.0.0-rc.11
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.11",
|
|
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": "
|
|
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.
|
|
38
|
+
"@applicaster/quick-brick-mobile-transport-controls": "15.0.0-rc.8",
|
|
39
|
+
"@applicaster/quick-brick-tv-transport-controls": "15.0.0-rc.11",
|
|
40
|
+
"@applicaster/zapp-react-native-tvos-app": "15.0.0-rc.11",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "15.0.0-rc.11",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "15.0.0-rc.11",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"shaka-player": "4.3.5",
|
|
45
45
|
"typeface-montserrat": "^0.0.54",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactElement, useRef } from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Animated, Pressable, StyleSheet, ViewStyle } from "react-native";
|
|
4
4
|
import { PanGestureHandler } from "react-native-gesture-handler";
|
|
5
5
|
import { useStyles } from "./styles";
|
|
6
6
|
import { useConfiguration } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/utils";
|
|
@@ -19,6 +19,7 @@ import { useModalAnimationContext } from "@applicaster/zapp-react-native-ui-comp
|
|
|
19
19
|
import { PROGRESS_BAR_HEIGHT } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation/utils";
|
|
20
20
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
21
21
|
import { GestureAnimatedScrollView } from "./GestureAnimatedScrollView";
|
|
22
|
+
import { PlayerDetailsWrapperHeightContext } from "./context";
|
|
22
23
|
|
|
23
24
|
const orientationStyles = StyleSheet.create({
|
|
24
25
|
landscape: { flexDirection: "row" },
|
|
@@ -163,6 +164,20 @@ export function VideoPlayerModal({
|
|
|
163
164
|
})
|
|
164
165
|
: new Animated.Value(0);
|
|
165
166
|
|
|
167
|
+
const [playerDetailsWrapperHeight, setPlayerDetailsWrapperHeight] =
|
|
168
|
+
React.useState(0);
|
|
169
|
+
|
|
170
|
+
const onScrollViewLayout = React.useCallback(
|
|
171
|
+
({
|
|
172
|
+
nativeEvent: {
|
|
173
|
+
layout: { height },
|
|
174
|
+
},
|
|
175
|
+
}) => {
|
|
176
|
+
setPlayerDetailsWrapperHeight(height);
|
|
177
|
+
},
|
|
178
|
+
[]
|
|
179
|
+
);
|
|
180
|
+
|
|
166
181
|
return (
|
|
167
182
|
<PanGestureHandler
|
|
168
183
|
enabled={enabled}
|
|
@@ -217,12 +232,17 @@ export function VideoPlayerModal({
|
|
|
217
232
|
contentContainerStyle={{
|
|
218
233
|
paddingBottom: insets.bottom,
|
|
219
234
|
}}
|
|
235
|
+
onLayout={onScrollViewLayout}
|
|
220
236
|
style={[
|
|
221
237
|
styles.extraContentScrollView,
|
|
222
238
|
{ opacity: expandedOpacity },
|
|
223
239
|
]}
|
|
224
240
|
>
|
|
225
|
-
|
|
241
|
+
<PlayerDetailsWrapperHeightContext.Provider
|
|
242
|
+
value={playerDetailsWrapperHeight}
|
|
243
|
+
>
|
|
244
|
+
{extraContent}
|
|
245
|
+
</PlayerDetailsWrapperHeightContext.Provider>
|
|
226
246
|
</GestureAnimatedScrollView>
|
|
227
247
|
) : null}
|
|
228
248
|
</Animated.View>
|
package/src/Player/index.tsx
CHANGED
|
@@ -50,6 +50,7 @@ import { TVPlayerView } from "./PlayerView/TVPlayerView";
|
|
|
50
50
|
import PlayerModal, { VideoPlayerModal } from "./PlayerModal";
|
|
51
51
|
import { DockedControls } from "./AudioLayer/Layout/DockedControls";
|
|
52
52
|
import { FlexImage } from "./AudioLayer/Layout/PlayerImage/FlexImage";
|
|
53
|
+
import { PlayerError } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/conts";
|
|
53
54
|
|
|
54
55
|
const styles = StyleSheet.create({
|
|
55
56
|
container: { flex: 1 },
|
|
@@ -416,9 +417,12 @@ export default class VideoPlayer extends React.Component<
|
|
|
416
417
|
|
|
417
418
|
// TODO: Should be unified on both platform
|
|
418
419
|
onVideoError = ({ nativeEvent }) => {
|
|
419
|
-
const
|
|
420
|
+
const description = nativeEvent.message;
|
|
421
|
+
const error = nativeEvent.error || nativeEvent.exception || "Unknown error"; // Android only fallback
|
|
420
422
|
|
|
421
|
-
|
|
423
|
+
const newError = new PlayerError(error, description);
|
|
424
|
+
|
|
425
|
+
return this.props?.listener?.onError(newError);
|
|
422
426
|
};
|
|
423
427
|
|
|
424
428
|
onPlayerPause = ({ nativeEvent = null }) => {
|