@applicaster/quick-brick-player 12.0.9-rc.0 → 12.0.9-rc.2

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.9-rc.0",
3
+ "version": "12.0.9-rc.2",
4
4
  "description": "Quick Brick Player",
5
5
  "main": "./src/index.ts",
6
6
  "types": "index.d.ts",
@@ -38,9 +38,9 @@
38
38
  "dependencies": {
39
39
  "@applicaster/quick-brick-mobile-transport-controls": "12.0.7",
40
40
  "@applicaster/quick-brick-tv-transport-controls": "12.0.4",
41
- "@applicaster/zapp-react-native-tvos-app": "12.0.9-rc.0",
42
- "@applicaster/zapp-react-native-ui-components": "12.0.9-rc.0",
43
- "@applicaster/zapp-react-native-utils": "12.0.9-rc.0",
41
+ "@applicaster/zapp-react-native-tvos-app": "12.0.9-rc.2",
42
+ "@applicaster/zapp-react-native-ui-components": "12.0.9-rc.2",
43
+ "@applicaster/zapp-react-native-utils": "12.0.9-rc.2",
44
44
  "keymirror": "^0.1.1",
45
45
  "query-string": "7.1.3",
46
46
  "react-native-web-linear-gradient": "1.1.2",
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import {
3
+ AnimationComponent,
4
+ ComponentAnimationType,
5
+ } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
6
+
7
+ type AnimationPlayerWrapperProps = {
8
+ isAudioItem: number;
9
+ children: React.ReactNode;
10
+ playerDimensions: PlayerDimensionsProp;
11
+ style?: { [K: string]: any };
12
+ };
13
+
14
+ export const AnimationPlayerWrapper = ({
15
+ isAudioItem,
16
+ children,
17
+ playerDimensions,
18
+ style,
19
+ }: AnimationPlayerWrapperProps) => {
20
+ if (!isAudioItem) {
21
+ return (
22
+ <AnimationComponent
23
+ animationType={ComponentAnimationType.player}
24
+ additionalData={playerDimensions}
25
+ style={style}
26
+ >
27
+ {children}
28
+ </AnimationComponent>
29
+ );
30
+ }
31
+
32
+ return <>{children}</>;
33
+ };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ViewStyle, View } from "react-native";
2
+ import { ViewStyle, View, Dimensions as ScreenDimensions } from "react-native";
3
3
 
4
4
  import { SafeAreaView, Edge } from "react-native-safe-area-context";
5
5
  import { usePlayerState } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayerState";
@@ -40,6 +40,7 @@ import {
40
40
  SLEEP_TIMER_OFF,
41
41
  } from "./SleepTimerManager";
42
42
  import { SpeedController, PlaybackSpeed, DEFAULT_SPEED } from "./SpeedManager";
43
+ import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
43
44
 
44
45
  const { log_debug } = createLogger({
45
46
  subsystem: "UIComponent",
@@ -78,8 +79,7 @@ type Props = {
78
79
  isTabletPortrait?: boolean;
79
80
  };
80
81
 
81
- export const defaultAspectRatioWidth = (height: number): number =>
82
- (height / 9) * 16;
82
+ const { width: SCREEN_WIDTH } = ScreenDimensions.get("screen");
83
83
 
84
84
  const Styles = {
85
85
  mainContainer: (style: ViewStyle) => {
@@ -105,7 +105,11 @@ const Styles = {
105
105
  height: 96,
106
106
  marginHorizontal: 24,
107
107
  },
108
- playerDetails: { marginTop: 60 },
108
+ playerDetails: {
109
+ marginTop: 60,
110
+ alignSelf: "center",
111
+ width: SCREEN_WIDTH - PADDING_HORIZONTAL * 2,
112
+ },
109
113
 
110
114
  linearGradient: {
111
115
  flex: 1,
@@ -442,7 +446,7 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
442
446
  ]);
443
447
 
444
448
  if (configuration.magic_background) {
445
- const baseUrl = entry?.extensions?.audio_player_background_image ?? "";
449
+ const baseUrl = imageSrcFromMediaItem(entry, null);
446
450
 
447
451
  const queryParamName =
448
452
  configuration.audio_player_background_image_query || "width";
@@ -375,6 +375,7 @@ export default function DefaultLayout(props: LayoutProps) {
375
375
  >
376
376
  <PlayerImageBackground
377
377
  entry={entry}
378
+ docked={docked}
378
379
  style={Styles.backgroundImageContainer(dimensions, isTablet)}
379
380
  imageStyle={Styles.backgroundImageContainerImageStyle(
380
381
  isTablet,
@@ -40,6 +40,7 @@ import { PlayerAnalyticsManager } from "@applicaster/zapp-react-native-utils/ana
40
40
  import { PlayerAnalyticsTrackerI } from "@applicaster/zapp-react-native-utils/analyticsUtils/playerAnalyticsTracker";
41
41
 
42
42
  import { RNPlayerManager } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/nativePlayerManager";
43
+ import { AnimationPlayerWrapper } from "./AnimationPlayerWrapper";
43
44
 
44
45
  const styles = StyleSheet.create({
45
46
  container: { flex: 1 },
@@ -1049,9 +1050,9 @@ export default class VideoPlayer extends React.Component<
1049
1050
  )}
1050
1051
 
1051
1052
  {(!castAction?.state?.connected || supportNativeCast) && (
1052
- <AnimationComponent
1053
- animationType={ComponentAnimationType.player}
1054
- additionalData={playerDimensions}
1053
+ <AnimationPlayerWrapper
1054
+ playerDimensions={playerDimensions}
1055
+ isAudioItem={isAudioItem}
1055
1056
  style={getStyle(playerDimensions)}
1056
1057
  >
1057
1058
  <this.props.PlayerComponent
@@ -1069,7 +1070,7 @@ export default class VideoPlayer extends React.Component<
1069
1070
  >
1070
1071
  {this.childrenWithPlayNext()}
1071
1072
  </this.props.PlayerComponent>
1072
- </AnimationComponent>
1073
+ </AnimationPlayerWrapper>
1073
1074
  )}
1074
1075
  </View>
1075
1076