@applicaster/quick-brick-player 12.0.0-alpha.4342066143 → 12.0.0-alpha.4354608902
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": "12.0.0-alpha.
|
|
3
|
+
"version": "12.0.0-alpha.4354608902",
|
|
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-alpha.4354608902",
|
|
41
|
+
"@applicaster/zapp-react-native-tvos-app": "12.0.0-alpha.4354608902",
|
|
42
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.4354608902",
|
|
43
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-alpha.4354608902",
|
|
44
44
|
"keymirror": "^0.1.1",
|
|
45
45
|
"query-string": "7.1.3",
|
|
46
46
|
"react-native-web-linear-gradient": "1.1.2",
|
|
@@ -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}>
|
|
@@ -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
|
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
|
};
|