@applicaster/quick-brick-player 15.0.0-alpha.1089439460 → 15.0.0-alpha.1092364530
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-alpha.
|
|
3
|
+
"version": "15.0.0-alpha.1092364530",
|
|
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-
|
|
39
|
-
"@applicaster/quick-brick-tv-transport-controls": "15.0.0-
|
|
40
|
-
"@applicaster/zapp-react-native-tvos-app": "15.0.0-alpha.
|
|
41
|
-
"@applicaster/zapp-react-native-ui-components": "15.0.0-alpha.
|
|
42
|
-
"@applicaster/zapp-react-native-utils": "15.0.0-alpha.
|
|
38
|
+
"@applicaster/quick-brick-mobile-transport-controls": "15.0.0-rc.127",
|
|
39
|
+
"@applicaster/quick-brick-tv-transport-controls": "15.0.0-rc.116",
|
|
40
|
+
"@applicaster/zapp-react-native-tvos-app": "15.0.0-alpha.1092364530",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "15.0.0-alpha.1092364530",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "15.0.0-alpha.1092364530",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"shaka-player": "4.3.5",
|
|
45
45
|
"typeface-montserrat": "^0.0.54",
|
|
@@ -23,7 +23,7 @@ import { usePlayerState } from "@applicaster/zapp-react-native-utils/appUtils/pl
|
|
|
23
23
|
import { useConfiguration } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/utils";
|
|
24
24
|
import { noop } from "@applicaster/zapp-react-native-utils/functionUtils";
|
|
25
25
|
import { PROGRESS_BAR_HEIGHT } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation/utils";
|
|
26
|
-
import {
|
|
26
|
+
import { isBottomTabVisible } from "@applicaster/zapp-react-native-ui-components/Components/Screen/navigationHandler";
|
|
27
27
|
import { usePlugins } from "@applicaster/zapp-react-native-redux";
|
|
28
28
|
import { partial } from "@applicaster/zapp-react-native-utils/utils";
|
|
29
29
|
|
|
@@ -167,7 +167,12 @@ export const DockedControls = (props: Props) => {
|
|
|
167
167
|
const { currentRoute, screenData } = useNavigation();
|
|
168
168
|
|
|
169
169
|
const plugins = usePlugins();
|
|
170
|
-
|
|
170
|
+
|
|
171
|
+
const bottomTabsVisible = isBottomTabVisible(
|
|
172
|
+
currentRoute,
|
|
173
|
+
screenData,
|
|
174
|
+
plugins
|
|
175
|
+
);
|
|
171
176
|
|
|
172
177
|
const { minimised_height: minimisedHeight } = useConfiguration();
|
|
173
178
|
|
|
@@ -248,13 +253,13 @@ export const DockedControls = (props: Props) => {
|
|
|
248
253
|
);
|
|
249
254
|
|
|
250
255
|
const bottomSpacerStyle = React.useMemo(() => {
|
|
251
|
-
const tabBarHeight =
|
|
256
|
+
const tabBarHeight = bottomTabsVisible ? bottomTabBarHeight : 0;
|
|
252
257
|
const safeAreaBottomInset = insets.bottom || 0;
|
|
253
258
|
|
|
254
259
|
return {
|
|
255
260
|
height: safeAreaBottomInset + tabBarHeight,
|
|
256
261
|
};
|
|
257
|
-
}, [
|
|
262
|
+
}, [bottomTabsVisible, insets.bottom]);
|
|
258
263
|
|
|
259
264
|
const contentInfoContent = React.useMemo(
|
|
260
265
|
() => ({ ...entry, title, summary }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as R from "ramda";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { usePlugins } from "@applicaster/zapp-react-native-redux";
|
|
5
5
|
import { PlayNextData } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainer";
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
@@ -32,7 +32,7 @@ export const PlayNextOverlay = ({
|
|
|
32
32
|
playNextData,
|
|
33
33
|
setNextVideoPreloadThresholdPercentage,
|
|
34
34
|
}: Props) => {
|
|
35
|
-
const
|
|
35
|
+
const plugins = usePlugins();
|
|
36
36
|
|
|
37
37
|
const OverlayPlugin = getOverlayPlugin(plugins);
|
|
38
38
|
|
|
@@ -85,15 +85,15 @@ export const useVideoModalState = () => {
|
|
|
85
85
|
// Update gesture state tracking
|
|
86
86
|
gestureStateRef.current = newState;
|
|
87
87
|
|
|
88
|
+
if (newState === State.FAILED) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
88
92
|
if (translationY !== 0) {
|
|
89
93
|
if (newState === State.BEGAN) {
|
|
90
94
|
// clean up gesture translation
|
|
91
95
|
gestureTranslation.setValue(0);
|
|
92
|
-
} else if (
|
|
93
|
-
newState === State.END ||
|
|
94
|
-
newState === State.FAILED ||
|
|
95
|
-
newState === State.CANCELLED
|
|
96
|
-
) {
|
|
96
|
+
} else if (newState === State.END || newState === State.CANCELLED) {
|
|
97
97
|
const newY = getAnimatedValue(gestureTranslation);
|
|
98
98
|
|
|
99
99
|
// clean up gesture translation
|
|
@@ -3,13 +3,13 @@ import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils"
|
|
|
3
3
|
export * from "./Utils";
|
|
4
4
|
|
|
5
5
|
export const getBottomSheetModalIconProps = (theme) => ({
|
|
6
|
-
height: theme
|
|
7
|
-
width: theme
|
|
8
|
-
marginBottom: theme
|
|
9
|
-
marginLeft: theme
|
|
10
|
-
marginRight: theme
|
|
11
|
-
marginTop: theme
|
|
12
|
-
flavour: theme
|
|
6
|
+
height: theme.audio_modal_bottom_sheet_item_icon_height,
|
|
7
|
+
width: theme.audio_modal_bottom_sheet_item_icon_width,
|
|
8
|
+
marginBottom: theme.audio_modal_bottom_sheet_item_icon_margin_bottom,
|
|
9
|
+
marginLeft: theme.audio_modal_bottom_sheet_item_icon_margin_left,
|
|
10
|
+
marginRight: theme.audio_modal_bottom_sheet_item_icon_margin_right,
|
|
11
|
+
marginTop: theme.audio_modal_bottom_sheet_item_icon_margin_top,
|
|
12
|
+
flavour: theme.modal_bottom_sheet_item_icon_flavour,
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export const getBottomSheetModalLabelProps = (theme, width: number) => {
|
|
@@ -112,10 +112,10 @@ export const getBottomSheetModalItemProps = (theme, width: number) => {
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
export const getBottomSheetModalSelectedItemIcon = (theme) =>
|
|
115
|
-
theme
|
|
115
|
+
theme.audio_modal_bottom_sheet_item_selected_icon || null;
|
|
116
116
|
|
|
117
117
|
export const getBottomSheetModalDefaultItemIcon = (theme) =>
|
|
118
|
-
theme
|
|
118
|
+
theme.audio_modal_bottom_sheet_item_default_icon || null;
|
|
119
119
|
|
|
120
120
|
export const selectSleepTitle = (configuration) =>
|
|
121
121
|
configuration.playback_sleep_title;
|
package/src/Player/index.tsx
CHANGED
|
@@ -7,8 +7,12 @@ import * as R from "ramda";
|
|
|
7
7
|
|
|
8
8
|
import { findNodeHandle, StyleSheet, View, ViewStyle } from "react-native";
|
|
9
9
|
|
|
10
|
-
import TransportControlsMobile
|
|
11
|
-
|
|
10
|
+
import TransportControlsMobile, {
|
|
11
|
+
ErrorOverlay,
|
|
12
|
+
} from "@applicaster/quick-brick-mobile-transport-controls";
|
|
13
|
+
import TransportControlsTV, {
|
|
14
|
+
ErrorOverlay as TVErrorOverlay,
|
|
15
|
+
} from "@applicaster/quick-brick-tv-transport-controls";
|
|
12
16
|
|
|
13
17
|
import { AudioPlayer } from "@applicaster/zapp-react-native-ui-components/Components/AudioPlayer";
|
|
14
18
|
import {
|
|
@@ -102,6 +106,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
102
106
|
isLive?: boolean;
|
|
103
107
|
seekableDuration?: number;
|
|
104
108
|
displayOverlay?: boolean;
|
|
109
|
+
error: PlayerError | null;
|
|
105
110
|
}
|
|
106
111
|
> {
|
|
107
112
|
public static propTypes = {};
|
|
@@ -121,6 +126,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
121
126
|
isLive?: boolean;
|
|
122
127
|
seekableDuration?: number;
|
|
123
128
|
displayOverlay?: boolean;
|
|
129
|
+
error: PlayerError | null;
|
|
124
130
|
} = {
|
|
125
131
|
// Base required properties from NativePlayerState
|
|
126
132
|
buffering: false,
|
|
@@ -131,7 +137,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
131
137
|
isTabletPortrait: false,
|
|
132
138
|
muted: false,
|
|
133
139
|
showPoster: false,
|
|
134
|
-
|
|
140
|
+
error: null,
|
|
135
141
|
// Extended properties
|
|
136
142
|
audioTrackId: null,
|
|
137
143
|
textTrackId: null,
|
|
@@ -462,6 +468,8 @@ export default class VideoPlayer extends React.Component<
|
|
|
462
468
|
|
|
463
469
|
const newError = new PlayerError(error, description);
|
|
464
470
|
|
|
471
|
+
this.setState({ error: newError });
|
|
472
|
+
|
|
465
473
|
return this.props?.listener?.onError(newError);
|
|
466
474
|
};
|
|
467
475
|
|
|
@@ -749,7 +757,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
749
757
|
}
|
|
750
758
|
|
|
751
759
|
renderPlayerContent(playerDimensions: ViewStyle) {
|
|
752
|
-
const { entry, docked } = this.props;
|
|
760
|
+
const { entry, docked, fullscreen } = this.props;
|
|
753
761
|
const { isAd, piped } = this.state;
|
|
754
762
|
|
|
755
763
|
const pluginConfiguration = this.getPluginConfiguration();
|
|
@@ -812,6 +820,20 @@ export default class VideoPlayer extends React.Component<
|
|
|
812
820
|
pluginConfiguration
|
|
813
821
|
);
|
|
814
822
|
|
|
823
|
+
if (this.state.error) {
|
|
824
|
+
return (
|
|
825
|
+
<View style={styles.container}>
|
|
826
|
+
<ErrorOverlay
|
|
827
|
+
error={this.state.error}
|
|
828
|
+
onClose={() => playerManager.close()}
|
|
829
|
+
configuration={pluginConfiguration}
|
|
830
|
+
docked={docked}
|
|
831
|
+
fullscreen={fullscreen}
|
|
832
|
+
/>
|
|
833
|
+
</View>
|
|
834
|
+
);
|
|
835
|
+
}
|
|
836
|
+
|
|
815
837
|
return (
|
|
816
838
|
<View style={styles.container}>
|
|
817
839
|
<View style={[playerContainerStyles, playerDimensions]}>
|
|
@@ -1346,6 +1368,18 @@ export default class VideoPlayer extends React.Component<
|
|
|
1346
1368
|
style: { ...styles.audio, ...this.takeParentStyle },
|
|
1347
1369
|
};
|
|
1348
1370
|
|
|
1371
|
+
if (this.state.error) {
|
|
1372
|
+
return (
|
|
1373
|
+
<View style={this.takeParentStyle} testID={"player-view"}>
|
|
1374
|
+
<TVErrorOverlay
|
|
1375
|
+
error={this.state.error}
|
|
1376
|
+
onClose={() => playerManager.close()}
|
|
1377
|
+
configuration={this.getPluginConfiguration()}
|
|
1378
|
+
/>
|
|
1379
|
+
</View>
|
|
1380
|
+
);
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1349
1383
|
return (
|
|
1350
1384
|
<View style={this.takeParentStyle} testID={"player-view"}>
|
|
1351
1385
|
<TVPlayerView
|