@applicaster/quick-brick-player 11.0.0-rc.99 → 12.0.0-rc.1
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": "
|
|
3
|
+
"version": "12.0.0-rc.1",
|
|
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": "11.0.0-rc.
|
|
40
|
-
"@applicaster/quick-brick-tv-transport-controls": "11.0.0-rc.
|
|
41
|
-
"@applicaster/zapp-react-native-tvos-app": "
|
|
42
|
-
"@applicaster/zapp-react-native-ui-components": "
|
|
43
|
-
"@applicaster/zapp-react-native-utils": "
|
|
39
|
+
"@applicaster/quick-brick-mobile-transport-controls": "11.0.0-rc.108",
|
|
40
|
+
"@applicaster/quick-brick-tv-transport-controls": "11.0.0-rc.133",
|
|
41
|
+
"@applicaster/zapp-react-native-tvos-app": "12.0.0-rc.1",
|
|
42
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-rc.1",
|
|
43
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-rc.1",
|
|
44
44
|
"keymirror": "^0.1.1",
|
|
45
45
|
"react-native-web-linear-gradient": "1.1.2",
|
|
46
46
|
"shaka-player": "4.3.5",
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ViewStyle, View, ScrollView } from "react-native";
|
|
3
3
|
|
|
4
|
-
import { SafeAreaView } from "react-native-safe-area-context";
|
|
4
|
+
import { SafeAreaView, Edge } from "react-native-safe-area-context";
|
|
5
5
|
import { usePlayerState } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayerState";
|
|
6
6
|
import { usePlayer } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayer";
|
|
7
7
|
import * as R from "ramda";
|
|
8
8
|
import { playerManager } from "@applicaster/zapp-react-native-utils/appUtils";
|
|
9
9
|
import Layout from "./Layout";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
useIsTablet,
|
|
12
|
+
useNavigation,
|
|
13
|
+
} from "@applicaster/zapp-react-native-utils/reactHooks";
|
|
11
14
|
import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
12
15
|
import { PlayNextData } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainer";
|
|
13
16
|
import { PlayerDetails } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/PlayerDetails";
|
|
@@ -86,7 +89,7 @@ const Styles = {
|
|
|
86
89
|
height: 96,
|
|
87
90
|
marginHorizontal: 24,
|
|
88
91
|
},
|
|
89
|
-
playerDetails: { marginTop:
|
|
92
|
+
playerDetails: { marginTop: 60 },
|
|
90
93
|
|
|
91
94
|
linearGradient: {
|
|
92
95
|
flex: 1,
|
|
@@ -105,7 +108,7 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
105
108
|
children,
|
|
106
109
|
layoutState,
|
|
107
110
|
playNextData = null,
|
|
108
|
-
isTabletPortrait
|
|
111
|
+
isTabletPortrait,
|
|
109
112
|
} = props;
|
|
110
113
|
|
|
111
114
|
const isTablet = useIsTablet();
|
|
@@ -186,12 +189,20 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
186
189
|
player?.seekTo(0);
|
|
187
190
|
}, [player]);
|
|
188
191
|
|
|
192
|
+
const edges = React.useMemo<Edge[]>(
|
|
193
|
+
() => (docked ? [] : ["right", "left", "top"]),
|
|
194
|
+
[docked]
|
|
195
|
+
);
|
|
196
|
+
|
|
189
197
|
const ContainerView = docked ? View : SafeAreaView;
|
|
190
198
|
|
|
191
199
|
const MainContent = React.useMemo(() => {
|
|
192
200
|
return (
|
|
193
|
-
<ContainerView style={Styles.mainContainer(docked, style)}>
|
|
194
|
-
<ScrollView
|
|
201
|
+
<ContainerView style={Styles.mainContainer(docked, style)} edges={edges}>
|
|
202
|
+
<ScrollView
|
|
203
|
+
style={Styles.playerContainer(docked, style)}
|
|
204
|
+
onLayout={onLayout}
|
|
205
|
+
>
|
|
195
206
|
<Layout
|
|
196
207
|
entry={entry}
|
|
197
208
|
playerState={playerState}
|
|
@@ -210,14 +221,15 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
210
221
|
playNextData={playNextData}
|
|
211
222
|
/>
|
|
212
223
|
{children}
|
|
213
|
-
{!docked &&
|
|
224
|
+
{!docked && (
|
|
214
225
|
<PlayerDetails
|
|
215
226
|
configuration={configuration}
|
|
216
227
|
style={Styles.playerDetails}
|
|
217
228
|
entry={entry}
|
|
218
229
|
isTabletLandscape={isTabletLandscape}
|
|
219
230
|
isAudioPlayer={true}
|
|
220
|
-
/>
|
|
231
|
+
/>
|
|
232
|
+
)}
|
|
221
233
|
</ScrollView>
|
|
222
234
|
</ContainerView>
|
|
223
235
|
);
|
package/src/Player/index.tsx
CHANGED
|
@@ -816,14 +816,9 @@ export default class VideoPlayer extends React.Component<
|
|
|
816
816
|
? { controls: !this.getPlayNextData() }
|
|
817
817
|
: {};
|
|
818
818
|
|
|
819
|
-
const pluginConfiguration = isTV()
|
|
820
|
-
? { configuration: this.props.pluginConfiguration }
|
|
821
|
-
: {};
|
|
822
|
-
|
|
823
819
|
const platformSpecificProps = isApplePlatform()
|
|
824
820
|
? {
|
|
825
821
|
...hideNativeControls,
|
|
826
|
-
...pluginConfiguration,
|
|
827
822
|
resizeMode: nativeResizeMode,
|
|
828
823
|
}
|
|
829
824
|
: {};
|