@applicaster/quick-brick-player 12.0.0-alpha.4840257570 → 12.0.0-alpha.4885205607
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 +6 -6
- package/src/CellPlayer/Assets/AssetsComponent.tsx +59 -49
- package/src/CellPlayer/ContextProvider.tsx +50 -1
- package/src/Player/AudioLayer/AudioPlayerWrapper.tsx +1 -0
- package/src/Player/AudioLayer/Layout/DefaultLayout.tsx +1 -0
- package/src/Player/AudioLayer/Layout/DockedLayout.tsx +13 -12
- package/src/Player/AudioLayer/MagicBG/index.tsx +46 -14
- package/src/Player/Utils/Utils.ts +6 -2
- package/src/Player/index.tsx +17 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-player",
|
|
3
|
-
"version": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.4885205607",
|
|
4
4
|
"description": "Quick Brick Player",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@applicaster/quick-brick-mobile-transport-controls": "12.0.0-rc.
|
|
40
|
-
"@applicaster/quick-brick-tv-transport-controls": "12.0.0-
|
|
41
|
-
"@applicaster/zapp-react-native-tvos-app": "12.0.0-alpha.
|
|
42
|
-
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.
|
|
43
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.
|
|
39
|
+
"@applicaster/quick-brick-mobile-transport-controls": "12.0.0-rc.96",
|
|
40
|
+
"@applicaster/quick-brick-tv-transport-controls": "12.0.0-rc.100",
|
|
41
|
+
"@applicaster/zapp-react-native-tvos-app": "12.0.0-alpha.4885205607",
|
|
42
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.4885205607",
|
|
43
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.4885205607",
|
|
44
44
|
"keymirror": "^0.1.1",
|
|
45
45
|
"query-string": "7.1.3",
|
|
46
46
|
"react-native-web-linear-gradient": "1.1.2",
|
|
@@ -10,66 +10,76 @@ type Asset = string | undefined;
|
|
|
10
10
|
const isCurrentPlayer = (playerId) =>
|
|
11
11
|
LiveImageManager.instance.getCurrentlyPlaying()?.playerId === playerId;
|
|
12
12
|
|
|
13
|
+
const liveImageButtonsListenerKey = "live-image-buttons";
|
|
14
|
+
|
|
13
15
|
const usePlayPauseListeners = (playerId, player, asset, setImageUri) =>
|
|
14
16
|
useEffect(() => {
|
|
15
17
|
if (playerId && player) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
setImageUri(null);
|
|
19
|
+
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (player.playerState.isReadyToPlay) {
|
|
24
|
+
if (player.playerState.isPaused) {
|
|
25
|
+
setImageUri(asset.active);
|
|
26
|
+
} else {
|
|
27
|
+
setImageUri(asset.inactive);
|
|
22
28
|
}
|
|
29
|
+
}
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
onPlayerPause: () => {
|
|
31
|
-
setImageUri(asset.active);
|
|
32
|
-
},
|
|
33
|
-
onPlayerClose: () => {
|
|
34
|
-
setImageUri(null);
|
|
35
|
-
},
|
|
36
|
-
onLoad() {
|
|
37
|
-
setImageUri(asset.inactive);
|
|
38
|
-
},
|
|
31
|
+
return player.addListener({
|
|
32
|
+
id: liveImageButtonsListenerKey,
|
|
33
|
+
listener: {
|
|
34
|
+
onPlayerResume: () => {
|
|
35
|
+
setImageUri(asset.inactive);
|
|
39
36
|
},
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
onPlayerPause: () => {
|
|
38
|
+
setImageUri(asset.active);
|
|
39
|
+
},
|
|
40
|
+
onPlayerClose: () => {
|
|
41
|
+
setImageUri(null);
|
|
42
|
+
},
|
|
43
|
+
onLoad() {
|
|
44
|
+
setImageUri(asset.inactive);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
42
48
|
}, [player, playerId, asset]);
|
|
43
49
|
|
|
44
50
|
const useMuteUnmuteListeners = (playerId, player, asset, setImageUri) =>
|
|
45
51
|
useEffect(() => {
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
listener: {
|
|
51
|
-
onPlayerMute: () => {
|
|
52
|
-
if (isCurrentPlayer(playerId)) {
|
|
53
|
-
setImageUri(asset.active);
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
onPlayerUnmute: () => {
|
|
57
|
-
if (isCurrentPlayer(playerId)) {
|
|
58
|
-
setImageUri(asset.inactive);
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
onLoad() {
|
|
62
|
-
setImageUri(player?.getIsMuted() ? asset.active : asset.inactive);
|
|
63
|
-
},
|
|
64
|
-
onPlayerClose: () => {
|
|
65
|
-
setImageUri(null);
|
|
66
|
-
},
|
|
67
|
-
onVideoEnd: () => {
|
|
68
|
-
setImageUri(null);
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
});
|
|
52
|
+
if (!player || !playerId) {
|
|
53
|
+
setImageUri(null);
|
|
54
|
+
|
|
55
|
+
return;
|
|
72
56
|
}
|
|
57
|
+
|
|
58
|
+
// active action = muted, inactive = unmuted
|
|
59
|
+
return player.addListener({
|
|
60
|
+
id: liveImageButtonsListenerKey,
|
|
61
|
+
listener: {
|
|
62
|
+
onPlayerMute: () => {
|
|
63
|
+
if (isCurrentPlayer(playerId)) {
|
|
64
|
+
setImageUri(asset.active);
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
onPlayerUnmute: () => {
|
|
68
|
+
if (isCurrentPlayer(playerId)) {
|
|
69
|
+
setImageUri(asset.inactive);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
onLoad() {
|
|
73
|
+
setImageUri(player?.getIsMuted() ? asset.active : asset.inactive);
|
|
74
|
+
},
|
|
75
|
+
onPlayerClose: () => {
|
|
76
|
+
setImageUri(null);
|
|
77
|
+
},
|
|
78
|
+
onVideoEnd: () => {
|
|
79
|
+
setImageUri(null);
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
});
|
|
73
83
|
}, [player, playerId, asset]);
|
|
74
84
|
|
|
75
85
|
const useListeners = MUTED_USAGE
|
|
@@ -21,7 +21,7 @@ const playActionCallback = (player) => {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
const invokeAction = () => {
|
|
24
|
+
const invokeAction = (_item: ZappEntry, _object) => {
|
|
25
25
|
const actionCallback = MUTED_USAGE ? muteActionCallback : playActionCallback;
|
|
26
26
|
// We only allow one player to be present at a time
|
|
27
27
|
const player = LiveImageManager.instance.getCurrentlyPlaying()?.player;
|
|
@@ -29,6 +29,54 @@ const invokeAction = () => {
|
|
|
29
29
|
actionCallback(player);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
// Not exported because currently the is no way
|
|
33
|
+
// to subscribe to the action availability change.
|
|
34
|
+
// We currently return a null state to disable the action.
|
|
35
|
+
// eslint-disable-next-line unused-imports/no-unused-vars
|
|
36
|
+
const isActionAvailable = (item: ZappEntry) => {
|
|
37
|
+
return (
|
|
38
|
+
LiveImageManager.instance.getCurrentlyPlaying()?.getPlayer().entry.id ===
|
|
39
|
+
item.id
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const addListener = (
|
|
44
|
+
entryId: string,
|
|
45
|
+
listener: CellActionStateListenerFunction
|
|
46
|
+
) => {
|
|
47
|
+
const callback = (event: Record<string, any>) => {
|
|
48
|
+
if (event.entry?.id !== entryId) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const player = LiveImageManager.instance.getCurrentlyPlaying()?.getPlayer();
|
|
53
|
+
|
|
54
|
+
if (!player || player.entry?.id !== entryId) {
|
|
55
|
+
listener(null);
|
|
56
|
+
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const actionState = MUTED_USAGE ? player.getIsMuted() : player.isPaused();
|
|
61
|
+
|
|
62
|
+
listener({
|
|
63
|
+
state: actionState ? 1 : 0,
|
|
64
|
+
label: "",
|
|
65
|
+
asset: AssetComponent,
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return LiveImageManager.instance.addListener({
|
|
70
|
+
id: `cell-player-${entryId}`,
|
|
71
|
+
listener: {
|
|
72
|
+
onEnd: callback,
|
|
73
|
+
onStart: callback,
|
|
74
|
+
onError: callback,
|
|
75
|
+
onDestroy: callback,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
32
80
|
const emptyState = [];
|
|
33
81
|
|
|
34
82
|
const initialEntryState = () => ({
|
|
@@ -46,6 +94,7 @@ export function ContextProvider(Component: ReactComponent<any>) {
|
|
|
46
94
|
state: emptyState,
|
|
47
95
|
invokeAction,
|
|
48
96
|
initialEntryState,
|
|
97
|
+
addListener,
|
|
49
98
|
}),
|
|
50
99
|
[invokeAction, initialEntryState]
|
|
51
100
|
);
|
|
@@ -388,6 +388,7 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
388
388
|
<AnimationComponent
|
|
389
389
|
animationType={ComponentAnimationType.moveUpComponent}
|
|
390
390
|
additionalData={{ saveArea: true }}
|
|
391
|
+
style={Styles.playerContainer}
|
|
391
392
|
>
|
|
392
393
|
<AnimatedScrollModal>
|
|
393
394
|
<View style={Styles.playerContainer} onLayout={onLayout}>
|
|
@@ -419,6 +419,7 @@ export default function DefaultLayout(props: LayoutProps) {
|
|
|
419
419
|
startTimestamp={startTimestamp}
|
|
420
420
|
endTimestamp={endTimestamp}
|
|
421
421
|
isDateBasedLiveContent={isDateBasedLiveContent}
|
|
422
|
+
onSkipLive={onSkipLive}
|
|
422
423
|
/>
|
|
423
424
|
|
|
424
425
|
{showCounter && timeLeft >= 0 && (
|
|
@@ -117,7 +117,6 @@ const playerDimensionsStyle = (
|
|
|
117
117
|
});
|
|
118
118
|
|
|
119
119
|
const animatedContainerStyle = (docked: boolean): ViewStyle => ({
|
|
120
|
-
top: docked ? 2 : null,
|
|
121
120
|
position: "absolute",
|
|
122
121
|
width: "100%",
|
|
123
122
|
zIndex: docked ? 1 : -1,
|
|
@@ -245,17 +244,19 @@ export default function DockedLayout(props: LayoutProps) {
|
|
|
245
244
|
animatedContainerStyle(isActiveGesture || layoutState.docked),
|
|
246
245
|
]}
|
|
247
246
|
>
|
|
248
|
-
{!playerState.isLive &&
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
247
|
+
{!playerState.isLive &&
|
|
248
|
+
(layoutState.docked || startComponentsAnimation) && (
|
|
249
|
+
<ProgressBar
|
|
250
|
+
content={entry}
|
|
251
|
+
value={value}
|
|
252
|
+
visible={visible}
|
|
253
|
+
layoutState={layoutState}
|
|
254
|
+
onPlayerSeek={onPlayerSeek}
|
|
255
|
+
playerState={playerState}
|
|
256
|
+
startComponentsAnimation={startComponentsAnimation}
|
|
257
|
+
docked
|
|
258
|
+
/>
|
|
259
|
+
)}
|
|
259
260
|
|
|
260
261
|
<View style={styles.content}>
|
|
261
262
|
<View
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
// Disabling for now as lint can't recognise typescript definition here
|
|
2
1
|
/* eslint-disable react/prop-types */
|
|
3
2
|
import * as React from "react";
|
|
4
|
-
import { StyleSheet, View } from "react-native";
|
|
3
|
+
import { Animated, StyleSheet, View } from "react-native";
|
|
5
4
|
import LinearGradient from "../LinearGradient";
|
|
6
5
|
import { getDominantColor, getPalettes } from "../../../utils/utils";
|
|
7
6
|
import { useEffect } from "react";
|
|
@@ -11,7 +10,7 @@ type MagicBGProps = {
|
|
|
11
10
|
image: string;
|
|
12
11
|
fallbackUrl?: string;
|
|
13
12
|
defaultColor: string;
|
|
14
|
-
colors: string[];
|
|
13
|
+
colors: string[];
|
|
15
14
|
};
|
|
16
15
|
|
|
17
16
|
const defaultColors = {
|
|
@@ -66,31 +65,46 @@ export const MagicBG: React.FC<MagicBGProps> = ({
|
|
|
66
65
|
defaultColors.defaultGradientEnd,
|
|
67
66
|
]);
|
|
68
67
|
|
|
68
|
+
const [backgroundColorAnim] = React.useState(new Animated.Value(0)); // from 0 to 1
|
|
69
|
+
const [gradientOpacityAnim] = React.useState(new Animated.Value(0)); // from 0 to 1
|
|
70
|
+
|
|
69
71
|
useEffect(() => {
|
|
72
|
+
const animateColors = () => {
|
|
73
|
+
Animated.timing(backgroundColorAnim, {
|
|
74
|
+
toValue: 1,
|
|
75
|
+
duration: 500,
|
|
76
|
+
useNativeDriver: false,
|
|
77
|
+
}).start();
|
|
78
|
+
|
|
79
|
+
Animated.timing(gradientOpacityAnim, {
|
|
80
|
+
toValue: 1,
|
|
81
|
+
duration: 500,
|
|
82
|
+
useNativeDriver: false,
|
|
83
|
+
}).start();
|
|
84
|
+
};
|
|
85
|
+
|
|
70
86
|
const fetchColors = async () => {
|
|
71
|
-
// Check if colors are provided and not empty
|
|
72
87
|
if (colors && colors.length > 0) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
setGradientColors(colors.slice(0, 2));
|
|
89
|
+
setDominantColor(colors[0]);
|
|
90
|
+
animateColors();
|
|
76
91
|
} else if (image) {
|
|
77
|
-
// If no colors, try fetching from image
|
|
78
92
|
try {
|
|
79
93
|
const { gradientColors, dominantColor } =
|
|
80
94
|
await fetchPaletteAndDominantColor(image);
|
|
81
95
|
|
|
82
96
|
setGradientColors(gradientColors);
|
|
83
97
|
setDominantColor(dominantColor);
|
|
98
|
+
animateColors();
|
|
84
99
|
} catch (error) {
|
|
85
|
-
// If image fetch fails, try fallback URL
|
|
86
100
|
try {
|
|
87
101
|
const { gradientColors, dominantColor } =
|
|
88
102
|
await fetchPaletteAndDominantColor(fallbackUrl);
|
|
89
103
|
|
|
90
104
|
setGradientColors(gradientColors);
|
|
91
105
|
setDominantColor(dominantColor);
|
|
106
|
+
animateColors();
|
|
92
107
|
} catch {
|
|
93
|
-
// If everything fails, use default color
|
|
94
108
|
setGradientColors([
|
|
95
109
|
defaultColors.defaultGradientStart,
|
|
96
110
|
defaultColors.defaultGradientEnd,
|
|
@@ -100,7 +114,6 @@ export const MagicBG: React.FC<MagicBGProps> = ({
|
|
|
100
114
|
}
|
|
101
115
|
}
|
|
102
116
|
} else {
|
|
103
|
-
// If no image or colors, use default color
|
|
104
117
|
setGradientColors([
|
|
105
118
|
defaultColors.defaultGradientStart,
|
|
106
119
|
defaultColors.defaultGradientEnd,
|
|
@@ -113,11 +126,30 @@ export const MagicBG: React.FC<MagicBGProps> = ({
|
|
|
113
126
|
fetchColors();
|
|
114
127
|
}, []);
|
|
115
128
|
|
|
129
|
+
const interpolatedBackgroundColor = backgroundColorAnim.interpolate({
|
|
130
|
+
inputRange: [0, 1],
|
|
131
|
+
outputRange: ["black", dominantColor],
|
|
132
|
+
});
|
|
133
|
+
|
|
116
134
|
return (
|
|
117
|
-
<View
|
|
135
|
+
<Animated.View
|
|
136
|
+
style={[
|
|
137
|
+
styles.container,
|
|
138
|
+
{ backgroundColor: interpolatedBackgroundColor },
|
|
139
|
+
]}
|
|
140
|
+
>
|
|
118
141
|
<View style={styles.fullScreenOverlay} />
|
|
119
|
-
|
|
142
|
+
|
|
143
|
+
<Animated.View
|
|
144
|
+
style={[styles.gradientOverlay, { opacity: gradientOpacityAnim }]}
|
|
145
|
+
>
|
|
146
|
+
<LinearGradient
|
|
147
|
+
colors={gradientColors}
|
|
148
|
+
style={StyleSheet.absoluteFill}
|
|
149
|
+
/>
|
|
150
|
+
</Animated.View>
|
|
151
|
+
|
|
120
152
|
{children}
|
|
121
|
-
</View>
|
|
153
|
+
</Animated.View>
|
|
122
154
|
);
|
|
123
155
|
};
|
|
@@ -22,6 +22,10 @@ export const addQueryParam = (
|
|
|
22
22
|
return `${urlWithoutQuery}?${updatedQueryString}`;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export const isValidDate = (dateString: string): boolean => {
|
|
26
|
-
return
|
|
25
|
+
export const isValidDate = (dateString: string | undefined): boolean => {
|
|
26
|
+
return (
|
|
27
|
+
typeof dateString === "string" &&
|
|
28
|
+
dateString.trim() !== "" &&
|
|
29
|
+
dayjs.utc(dateString).isValid()
|
|
30
|
+
);
|
|
27
31
|
};
|
package/src/Player/index.tsx
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
import * as R from "ramda";
|
|
6
6
|
|
|
7
|
-
import { findNodeHandle,
|
|
7
|
+
import { findNodeHandle, StyleSheet, View } from "react-native";
|
|
8
8
|
import TransportControlsMobile from "@applicaster/quick-brick-mobile-transport-controls";
|
|
9
9
|
import TransportControlsTV from "@applicaster/quick-brick-tv-transport-controls";
|
|
10
10
|
|
|
@@ -42,15 +42,7 @@ import {
|
|
|
42
42
|
AnimationComponent,
|
|
43
43
|
ComponentAnimationType,
|
|
44
44
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
45
|
-
|
|
46
|
-
const RNPlayerManager = {
|
|
47
|
-
QuickBrickPlayerPlugin: isApplePlatform()
|
|
48
|
-
? NativeModules.PlayerModule
|
|
49
|
-
: NativeModules.QuickBrickDefaultPlayerModule,
|
|
50
|
-
KalturaPlayerPlugin: isApplePlatform()
|
|
51
|
-
? NativeModules.KalturaPlayerModule
|
|
52
|
-
: NativeModules.QBKalturaPlayerModule,
|
|
53
|
-
};
|
|
45
|
+
import { RNPlayerManager } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/nativePlayerManager";
|
|
54
46
|
|
|
55
47
|
const styles = StyleSheet.create({
|
|
56
48
|
container: { flex: 1 },
|
|
@@ -120,8 +112,6 @@ export default class VideoPlayer extends React.Component<
|
|
|
120
112
|
}
|
|
121
113
|
|
|
122
114
|
componentWillUnmount() {
|
|
123
|
-
this.stopBackgroundPlayback();
|
|
124
|
-
|
|
125
115
|
this.playbackStarted = false;
|
|
126
116
|
this.handleAnalyticEvent(GENERAL_EVENT.session_end);
|
|
127
117
|
this.onPlayerClosed();
|
|
@@ -166,6 +156,11 @@ export default class VideoPlayer extends React.Component<
|
|
|
166
156
|
}
|
|
167
157
|
}
|
|
168
158
|
|
|
159
|
+
// For close button
|
|
160
|
+
public closeNativePlayer = () => {
|
|
161
|
+
this.stopBackgroundPlayback();
|
|
162
|
+
};
|
|
163
|
+
|
|
169
164
|
getPlayNextData = () => this.props.playNextData as PlayNextData;
|
|
170
165
|
|
|
171
166
|
/**
|
|
@@ -340,11 +335,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
340
335
|
}
|
|
341
336
|
};
|
|
342
337
|
|
|
343
|
-
|
|
344
|
-
* Sets either subtitle language, or audio language if we have a selected a new locale.
|
|
345
|
-
* If no locale is set it defaults to system language for audio, and leaves subtitles unaltered.
|
|
346
|
-
*/
|
|
347
|
-
setLanguage = (selected = null) => {
|
|
338
|
+
selectTrack = (selected) => {
|
|
348
339
|
const { trackType, id, language } = selected || {};
|
|
349
340
|
|
|
350
341
|
const isOff = language === "Off";
|
|
@@ -862,7 +853,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
862
853
|
!!this.props.controller?.supportsNativeControls?.();
|
|
863
854
|
|
|
864
855
|
const controls = isAppleTV()
|
|
865
|
-
? supportsNativeControls && !isInlineTV
|
|
856
|
+
? (supportsNativeControls && !isInlineTV) || !!this.getPlayNextData()
|
|
866
857
|
: supportsNativeControls && !this.getPlayNextData();
|
|
867
858
|
|
|
868
859
|
const shouldUseNativeControls =
|
|
@@ -998,7 +989,13 @@ export default class VideoPlayer extends React.Component<
|
|
|
998
989
|
...androidLifecyclePiPEvents,
|
|
999
990
|
};
|
|
1000
991
|
|
|
1001
|
-
const needToShowPlayNextOverlay =
|
|
992
|
+
const needToShowPlayNextOverlay =
|
|
993
|
+
isTV() && this.getPlayNextData() && !docked;
|
|
994
|
+
|
|
995
|
+
const needToShowDefaultControls = !(
|
|
996
|
+
(controls && !castAction?.state?.connected) ||
|
|
997
|
+
this.getPlayNextData()
|
|
998
|
+
);
|
|
1002
999
|
|
|
1003
1000
|
const playerContainerStyles = isApplePlatform()
|
|
1004
1001
|
? styles.playerContainerBlack
|
|
@@ -1040,7 +1037,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
1040
1037
|
extraInfoText={castAction?.state?.friendlyStatus}
|
|
1041
1038
|
controlsAlwaysVisible={castAction?.state?.connected}
|
|
1042
1039
|
playNextData={this.getPlayNextData()}
|
|
1043
|
-
|
|
1040
|
+
needToShowDefaultControls={needToShowDefaultControls}
|
|
1044
1041
|
/>
|
|
1045
1042
|
) : null;
|
|
1046
1043
|
};
|