@applicaster/quick-brick-player 14.0.0-alpha.1661204539 → 14.0.0-alpha.2332850672

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": "14.0.0-alpha.1661204539",
3
+ "version": "14.0.0-alpha.2332850672",
4
4
  "description": "Quick Brick Player",
5
5
  "main": "./src/index.ts",
6
6
  "types": "index.d.ts",
@@ -36,10 +36,10 @@
36
36
  "homepage": "https://github.com/applicaster/quickbrick#readme",
37
37
  "dependencies": {
38
38
  "@applicaster/quick-brick-mobile-transport-controls": "13.0.0-rc.124",
39
- "@applicaster/quick-brick-tv-transport-controls": "13.0.0-rc.56",
40
- "@applicaster/zapp-react-native-tvos-app": "14.0.0-alpha.1661204539",
41
- "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.1661204539",
42
- "@applicaster/zapp-react-native-utils": "14.0.0-alpha.1661204539",
39
+ "@applicaster/quick-brick-tv-transport-controls": "14.0.0-rc.7",
40
+ "@applicaster/zapp-react-native-tvos-app": "14.0.0-alpha.2332850672",
41
+ "@applicaster/zapp-react-native-ui-components": "14.0.0-alpha.2332850672",
42
+ "@applicaster/zapp-react-native-utils": "14.0.0-alpha.2332850672",
43
43
  "query-string": "7.1.3",
44
44
  "react-native-web-linear-gradient": "1.1.2",
45
45
  "shaka-player": "4.3.5",
@@ -1,7 +1,7 @@
1
1
  import React, { PropsWithChildren } from "react";
2
2
  import { Image, Animated, StyleSheet, ImageStyle } from "react-native";
3
3
 
4
- import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
4
+ import { getBackgroundImage } from "@applicaster/zapp-react-native-utils/audioPlayerUtils";
5
5
  import {
6
6
  useModalAnimationContext,
7
7
  PlayerAnimationStateEnum,
@@ -25,14 +25,23 @@ type Props = PropsWithChildren<{
25
25
  style?: ImageStyle | ImageStyle[];
26
26
  imageWidth: number;
27
27
  docked: boolean;
28
+ configuration: QuickBrickPlayer.AudioPlayerProps["configuration"];
28
29
  }>;
29
30
 
30
- export const AnimatedImage = ({ entry, style, imageWidth, docked }: Props) => {
31
+ export const AnimatedImage = ({
32
+ entry,
33
+ style,
34
+ imageWidth,
35
+ docked,
36
+ configuration,
37
+ }: Props) => {
31
38
  const heightAnim = React.useRef(new Animated.Value(imageWidth)).current;
32
39
 
33
40
  const source = React.useMemo(
34
- () => ({ uri: imageSrcFromMediaItem(entry, undefined) }),
35
- [entry]
41
+ () => ({
42
+ uri: getBackgroundImage({ entry, plugin_configuration: configuration }),
43
+ }),
44
+ [entry, configuration]
36
45
  );
37
46
 
38
47
  const { minimisedHeight } = useModalAnimationContext();
@@ -1,17 +1,19 @@
1
1
  import * as React from "react";
2
2
  import { Image, ImageStyle } from "react-native";
3
-
4
- import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
3
+ import { getBackgroundImage } from "@applicaster/zapp-react-native-utils/audioPlayerUtils";
5
4
 
6
5
  type Props = {
7
6
  entry: ZappEntry;
8
7
  style?: ImageStyle;
8
+ configuration: QuickBrickPlayer.AudioPlayerProps["configuration"];
9
9
  };
10
10
 
11
- export const FlexImage = ({ entry, style }: Props) => {
11
+ export const FlexImage = ({ entry, style, configuration }: Props) => {
12
12
  const source = React.useMemo(
13
- () => ({ uri: imageSrcFromMediaItem(entry, undefined) }),
14
- [entry]
13
+ () => ({
14
+ uri: getBackgroundImage({ entry, plugin_configuration: configuration }),
15
+ }),
16
+ [entry, configuration]
15
17
  );
16
18
 
17
19
  if (!source) return null;
@@ -94,6 +94,7 @@ export const PlayerImage = (props: Props) => {
94
94
  <FlexImage
95
95
  entry={entry}
96
96
  style={styles.backgroundImageContainer}
97
+ configuration={configuration}
97
98
  />
98
99
  </View>
99
100
  ) : (
@@ -103,6 +104,7 @@ export const PlayerImage = (props: Props) => {
103
104
  style={[styles.backgroundImageContainer, { borderRadius }]}
104
105
  imageWidth={imageWidth}
105
106
  docked={docked}
107
+ configuration={configuration}
106
108
  />
107
109
  )}
108
110
  </View>
@@ -33,7 +33,6 @@ import { playerManager } from "@applicaster/zapp-react-native-utils/appUtils";
33
33
  import { getAllAccessibilityProps } from "@applicaster/zapp-react-native-utils/configurationUtils";
34
34
  import { PlayNextData } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainer";
35
35
  import { getTargetScreenDataFromEntry } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useTargetScreenData";
36
- import { isAppleTV } from "@applicaster/zapp-react-native-ui-components/Helpers/Platform";
37
36
  import {
38
37
  AnimationComponent,
39
38
  ComponentAnimationType,
@@ -42,7 +41,10 @@ import { PlayerAnalyticsManager } from "@applicaster/zapp-react-native-utils/ana
42
41
  import { PlayerAnalyticsTrackerI } from "@applicaster/zapp-react-native-utils/analyticsUtils/playerAnalyticsTracker";
43
42
 
44
43
  import { RNPlayerManager } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/nativePlayerManager";
45
- import { isAudioItem as isAudioItemUtil } from "@applicaster/zapp-react-native-utils/playerUtils";
44
+ import {
45
+ isAudioItem as isAudioItemUtil,
46
+ isInlineTV as isInlineTVUtil,
47
+ } from "@applicaster/zapp-react-native-utils/playerUtils";
46
48
 
47
49
  const styles = StyleSheet.create({
48
50
  container: { flex: 1 },
@@ -799,7 +801,7 @@ export default class VideoPlayer extends React.Component<
799
801
  // TODO: Get screen data more reliable way useCurrentScreenData
800
802
  const screenData = getTargetScreenDataFromEntry(this.props.playableItem);
801
803
 
802
- const isInlineTV = screenData?.ui_components?.length > 0 && isTV();
804
+ const isInlineTV = isInlineTVUtil(screenData);
803
805
 
804
806
  let platformSpecificProps: any = isApplePlatform()
805
807
  ? {
@@ -810,7 +812,7 @@ export default class VideoPlayer extends React.Component<
810
812
  const supportsNativeControls =
811
813
  !!this.props.controller?.supportsNativeControls?.();
812
814
 
813
- const controls = isAppleTV()
815
+ const controls = isTvOS
814
816
  ? (supportsNativeControls && !isInlineTV) || !!this.getPlayNextData()
815
817
  : supportsNativeControls && !this.getPlayNextData();
816
818
 
@@ -857,7 +859,7 @@ export default class VideoPlayer extends React.Component<
857
859
  ),
858
860
  };
859
861
 
860
- if (!isAppleTV()) {
862
+ if (!isTvOS) {
861
863
  // TODO: Move to RN method and remove from props.
862
864
  // Causes tvOS bug: native player passes rate on fast seek,
863
865
  // RN returns it and it breaks playback.
@@ -1139,7 +1141,7 @@ export default class VideoPlayer extends React.Component<
1139
1141
  const renderTVPlayer = () => {
1140
1142
  return (
1141
1143
  <View style={this.takeParentStyle} testID={"player-view"}>
1142
- {!isTvOS && isAudioItem ? (
1144
+ {isAudioItem && (isInlineTV || !isTvOS) ? (
1143
1145
  <AudioPlayer
1144
1146
  style={getStyle(styles.audioPlayerSize)}
1145
1147
  audio_item={entry}
@@ -1156,7 +1158,7 @@ export default class VideoPlayer extends React.Component<
1156
1158
  pluginConfiguration={this.getPluginConfiguration()}
1157
1159
  controller={this.props.controller}
1158
1160
  >
1159
- {this.childrenWithExtensions()}
1161
+ {!isInlineTV && this.childrenWithExtensions()}
1160
1162
  </this.props.PlayerComponent>
1161
1163
 
1162
1164
  {renderTransportControls(this.takeParentStyle)}