@applicaster/quick-brick-player 13.0.0-rc.110 → 13.0.0-rc.112

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": "13.0.0-rc.110",
3
+ "version": "13.0.0-rc.112",
4
4
  "description": "Quick Brick Player",
5
5
  "main": "./src/index.ts",
6
6
  "types": "index.d.ts",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "homepage": "https://github.com/applicaster/quickbrick#readme",
37
37
  "dependencies": {
38
- "@applicaster/quick-brick-mobile-transport-controls": "13.0.0-rc.106",
38
+ "@applicaster/quick-brick-mobile-transport-controls": "13.0.0-rc.112",
39
39
  "@applicaster/quick-brick-tv-transport-controls": "13.0.0-rc.56",
40
- "@applicaster/zapp-react-native-tvos-app": "13.0.0-rc.110",
41
- "@applicaster/zapp-react-native-ui-components": "13.0.0-rc.110",
42
- "@applicaster/zapp-react-native-utils": "13.0.0-rc.110",
40
+ "@applicaster/zapp-react-native-tvos-app": "13.0.0-rc.112",
41
+ "@applicaster/zapp-react-native-ui-components": "13.0.0-rc.112",
42
+ "@applicaster/zapp-react-native-utils": "13.0.0-rc.112",
43
43
  "query-string": "7.1.3",
44
44
  "react-native-web-linear-gradient": "1.1.2",
45
45
  "shaka-player": "4.3.5",
@@ -52,7 +52,6 @@
52
52
  "@applicaster/applicaster-types": "*",
53
53
  "@applicaster/blur": "*",
54
54
  "@applicaster/quick-brick-xray": "*",
55
- "@applicaster/react-native-color-thief": "*",
56
55
  "@applicaster/zapp-pipes-v2-client": "*",
57
56
  "@applicaster/zapp-react-dom-ui-components": "*",
58
57
  "@applicaster/zapp-react-native-redux": "*",
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Text, TextStyle } from "react-native";
2
+ import { StyleSheet, Text, TextStyle, View } from "react-native";
3
3
  import { platformSelect } from "@applicaster/zapp-react-native-utils/reactUtils";
4
4
 
5
5
  type AudioDescriptionProps = {
@@ -10,84 +10,125 @@ type AudioDescriptionProps = {
10
10
  docked: boolean;
11
11
  isModal: boolean;
12
12
  };
13
+ maxWidth?: number;
13
14
  value: GetValue;
14
15
  };
15
16
 
16
- const titleStyles = (value: GetValue, prefix: string): TextStyle => ({
17
- textAlign: "left",
18
- color: value(`${prefix}title_color`),
19
- alignSelf: "center",
20
- paddingBottom: 5,
21
- lineHeight:
22
- Number(
23
- platformSelect({
24
- ios: value(`${prefix}title_lineheight_ios`),
25
- android: value(`${prefix}title_lineheight_android`),
26
- })
27
- ) || 18,
28
- letterSpacing:
29
- Number(
30
- platformSelect({
31
- ios: value(`${prefix}title_letterspacing_ios`),
32
- android: value(`${prefix}title_letterspacing_android`),
33
- })
34
- ) || 0,
35
- fontSize:
36
- Number(
37
- platformSelect({
38
- ios: value(`${prefix}title_fontsize_ios`),
39
- android: value(`${prefix}title_fontsize_android`),
40
- })
41
- ) || 16,
42
- fontFamily: platformSelect({
43
- ios: value(`${prefix}title_font_ios`),
44
- android: value(`${prefix}title_font_android`),
45
- }),
46
- });
17
+ const TITLE_PADDING_BOTTOM = 5;
18
+ const TITLE_LINES = 2;
19
+ const SUBTITLE_LINES = 1;
47
20
 
48
- const summaryStyles = (value: GetValue, prefix: string): TextStyle => ({
49
- textAlign: "left",
50
- color: value(`${prefix}subtitle_color`),
51
- alignSelf: "center",
52
- lineHeight:
53
- Number(
54
- platformSelect({
55
- ios: value(`${prefix}subtitle_lineheight_ios`),
56
- android: value(`${prefix}subtitle_lineheight_android`),
57
- })
58
- ) || 18,
59
- letterSpacing:
60
- Number(
61
- platformSelect({
62
- ios: value(`${prefix}subtitle_letterspacing_ios`),
63
- android: value(`${prefix}subtitle_letterspacing_android`),
64
- })
65
- ) || 0,
66
- fontSize:
67
- Number(
68
- platformSelect({
69
- ios: value(`${prefix}subtitle_fontsize_ios`),
70
- android: value(`${prefix}subtitle_fontsize_android`),
71
- })
72
- ) || 13,
73
- fontFamily: platformSelect({
74
- ios: value(`${prefix}subtitle_font_ios`),
75
- android: value(`${prefix}subtitle_font_android`),
76
- }),
21
+ const styles = StyleSheet.create({
22
+ wrapper: {
23
+ width: "100%",
24
+ alignSelf: "center",
25
+ alignItems: "center",
26
+ justifyContent: "center",
27
+ },
28
+ titleText: {
29
+ textAlign: "center",
30
+ alignSelf: "center",
31
+ paddingBottom: TITLE_PADDING_BOTTOM,
32
+ },
33
+ summaryText: {
34
+ textAlign: "left",
35
+ alignSelf: "center",
36
+ },
77
37
  });
78
38
 
39
+ const getTitleStyles = (value: GetValue, prefix: string) =>
40
+ ({
41
+ color: value(`${prefix}title_color`),
42
+ lineHeight:
43
+ Number(
44
+ platformSelect({
45
+ ios: value(`${prefix}title_lineheight_ios`),
46
+ android: value(`${prefix}title_lineheight_android`),
47
+ })
48
+ ) || 18,
49
+ letterSpacing:
50
+ Number(
51
+ platformSelect({
52
+ ios: value(`${prefix}title_letterspacing_ios`),
53
+ android: value(`${prefix}title_letterspacing_android`),
54
+ })
55
+ ) || 0,
56
+ fontSize:
57
+ Number(
58
+ platformSelect({
59
+ ios: value(`${prefix}title_fontsize_ios`),
60
+ android: value(`${prefix}title_fontsize_android`),
61
+ })
62
+ ) || 16,
63
+ fontFamily: platformSelect({
64
+ ios: value(`${prefix}title_font_ios`),
65
+ android: value(`${prefix}title_font_android`),
66
+ }),
67
+ }) as const;
68
+
69
+ const getSummaryStyles = (value: GetValue, prefix: string): TextStyle =>
70
+ ({
71
+ color: value(`${prefix}subtitle_color`),
72
+ lineHeight:
73
+ Number(
74
+ platformSelect({
75
+ ios: value(`${prefix}subtitle_lineheight_ios`),
76
+ android: value(`${prefix}subtitle_lineheight_android`),
77
+ })
78
+ ) || 18,
79
+ letterSpacing:
80
+ Number(
81
+ platformSelect({
82
+ ios: value(`${prefix}subtitle_letterspacing_ios`),
83
+ android: value(`${prefix}subtitle_letterspacing_android`),
84
+ })
85
+ ) || 0,
86
+ fontSize:
87
+ Number(
88
+ platformSelect({
89
+ ios: value(`${prefix}subtitle_fontsize_ios`),
90
+ android: value(`${prefix}subtitle_fontsize_android`),
91
+ })
92
+ ) || 13,
93
+ fontFamily: platformSelect({
94
+ ios: value(`${prefix}subtitle_font_ios`),
95
+ android: value(`${prefix}subtitle_font_android`),
96
+ }),
97
+ }) as const;
98
+
99
+ const getHeight = (titleLineHeight: number, subtitleLineHeight) =>
100
+ titleLineHeight * TITLE_LINES + subtitleLineHeight + TITLE_PADDING_BOTTOM;
101
+
79
102
  export const AudioDescription = (props: AudioDescriptionProps) => {
80
- const { title, summary, layoutState, value } = props;
103
+ const { title, summary, layoutState, value, maxWidth } = props;
81
104
  const prefix = layoutState.docked ? "docked_player_" : "";
82
105
 
106
+ const summaryStyles = getSummaryStyles(value, prefix);
107
+ const titleStyles = getTitleStyles(value, prefix);
108
+
109
+ const height = getHeight(titleStyles.lineHeight, summaryStyles.lineHeight);
110
+
83
111
  return (
84
- <>
85
- <Text style={titleStyles(value, prefix)} numberOfLines={2}>
112
+ <View
113
+ style={[
114
+ styles.wrapper,
115
+ {
116
+ maxWidth,
117
+ height,
118
+ },
119
+ ]}
120
+ >
121
+ <Text style={[styles.titleText, titleStyles]} numberOfLines={TITLE_LINES}>
86
122
  {title}
87
123
  </Text>
88
- <Text style={summaryStyles(value, prefix)} numberOfLines={1}>
89
- {summary}
90
- </Text>
91
- </>
124
+ {summary ? (
125
+ <Text
126
+ style={[styles.summaryText, summaryStyles]}
127
+ numberOfLines={SUBTITLE_LINES}
128
+ >
129
+ {summary}
130
+ </Text>
131
+ ) : null}
132
+ </View>
92
133
  );
93
134
  };
@@ -1,12 +1,13 @@
1
1
  import * as React from "react";
2
+ import { useEffect, useState } from "react";
2
3
  import {
4
+ Dimensions as ScreenDimensions,
3
5
  StyleSheet,
4
- ViewStyle,
5
6
  View,
6
- Dimensions as ScreenDimensions,
7
+ ViewStyle,
7
8
  } from "react-native";
8
9
 
9
- import { SafeAreaView, Edge } from "react-native-safe-area-context";
10
+ import { Edge, SafeAreaView } from "react-native-safe-area-context";
10
11
  import { usePlayerState } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayerState";
11
12
  import { usePlayer } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayer";
12
13
  import * as R from "ramda";
@@ -20,11 +21,8 @@ import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
20
21
  import { PlayNextData } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainer";
21
22
  import { PlayerDetails } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/PlayerDetails";
22
23
  import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
23
- import { useEffect, useState } from "react";
24
- import { MagicBG } from "./MagicBG";
25
24
  import { formatSpeed } from "./utils";
26
25
  import {
27
- addQueryParam,
28
26
  getBottomSheetModalDefaultItemIcon,
29
27
  getBottomSheetModalIconProps,
30
28
  getBottomSheetModalItemProps,
@@ -33,20 +31,18 @@ import {
33
31
  } from "../Utils";
34
32
  import { useTitleSummaryOverlay } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayerTitleSummaryOverlay";
35
33
  import {
34
+ AnimatedScrollModal,
36
35
  AnimationComponent,
37
36
  ComponentAnimationType,
38
- AnimatedScrollModal,
39
37
  } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
40
38
  import { PADDING_HORIZONTAL } from "./Layout/const";
41
39
  import { toNumberWithDefault } from "@applicaster/zapp-react-native-utils/numberUtils";
42
40
  import {
41
+ SLEEP_TIMER_OFF,
43
42
  SleepTimerController,
44
43
  SleepTimerState,
45
- SLEEP_TIMER_OFF,
46
44
  } from "./SleepTimerManager";
47
- import { SpeedController, PlaybackSpeed, DEFAULT_SPEED } from "./SpeedManager";
48
- import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
49
- import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
45
+ import { DEFAULT_SPEED, PlaybackSpeed, SpeedController } from "./SpeedManager";
50
46
  import { openBottomSheetModal } from "@applicaster/zapp-react-native-utils/modalState";
51
47
  import { getSleepTimerOptions } from "../Const/sleepTimerOptions";
52
48
  import { speedOptions } from "../Const/speedOptions";
@@ -65,7 +61,6 @@ type Dimensions = {
65
61
 
66
62
  type Configuration = {
67
63
  [key: string]: any;
68
- magic_background?: boolean;
69
64
  audio_player_background_image_query?: string;
70
65
  audio_player_background_image_default_color?: string;
71
66
  tablet_landscape_sidebar_width?: string;
@@ -75,7 +70,6 @@ type Configuration = {
75
70
  type Props = {
76
71
  children: React.ReactNode;
77
72
  inline?: boolean;
78
- docked?: boolean;
79
73
  configuration: Configuration;
80
74
  style: ViewStyle & Dimensions;
81
75
  entry: ZappEntry;
@@ -108,10 +102,8 @@ const edges: Edge[] = ["right", "left", "top"];
108
102
  export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
109
103
  const player = usePlayer();
110
104
  const playerState = usePlayerState("audio-player-wrapper");
111
- const theme = useTheme();
112
105
 
113
106
  const {
114
- docked,
115
107
  configuration,
116
108
  style,
117
109
  entry,
@@ -330,114 +322,61 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
330
322
  player?.seekTo(0);
331
323
  }, [player]);
332
324
 
333
- const MainContent = React.useMemo(() => {
334
- return (
335
- <SafeAreaView style={[style, Styles.playerContainer]} edges={edges}>
336
- <AnimationComponent
337
- animationType={ComponentAnimationType.moveUpComponent}
338
- additionalData={{ saveArea: true }}
339
- style={Styles.playerContainer}
340
- >
341
- <AnimatedScrollModal>
342
- <View style={Styles.playerContainer} onLayout={onLayout}>
343
- <Layout
344
- entry={entry}
345
- playerState={playerState}
346
- layoutState={layoutState}
347
- value={value}
348
- onPlaybackButtonPress={onPlaybackButtonPress}
349
- onRewindButtonPress={onRewindButtonPress}
350
- onForwardButtonPress={onForwardButtonPress}
351
- onPlayerSeek={onPlayerSeek}
352
- onSkipStart={onSkipStart}
353
- onSpeedButtonPress={onSpeedButtonPress}
354
- onSleepButtonPress={onSleepButtonPress}
355
- playbackSpeedName={formatSpeed(playbackSpeed.value)}
356
- playbackSleepName={
357
- sleepTimerState.timer.value === 0
358
- ? "sleep_timer"
359
- : "sleep_timer_active"
360
- }
361
- sleepTimerDate={sleepTimerState.timerDate}
362
- cancelSleepTimer={cancelSleepTimer}
363
- onSkipLive={onSkipLive}
364
- onCloseVideoModal={onCloseVideoModal}
365
- maximiseVideoModal={maximiseVideoModal}
366
- configuration={configuration}
367
- dimensions={dimensions}
368
- playNextData={playNextData}
369
- title={title}
370
- summary={summary}
371
- defaultDimensions={defaultDimensions}
372
- />
373
- <View style={Styles.paddingHorizontal}>
374
- {children}
375
- <AnimationComponent
376
- animationType={ComponentAnimationType.componentFade}
377
- >
378
- <PlayerDetails
379
- isAudioPlayer
380
- configuration={configuration}
381
- style={Styles.playerDetails}
382
- entry={entry}
383
- isTabletLandscape={isTabletLandscape}
384
- />
385
- </AnimationComponent>
386
- </View>
387
- </View>
388
- </AnimatedScrollModal>
389
- </AnimationComponent>
390
- </SafeAreaView>
391
- );
392
- }, [
393
- docked,
394
- style,
395
- entry,
396
- playerState,
397
- layoutState,
398
- value,
399
- onPlaybackButtonPress,
400
- onRewindButtonPress,
401
- onForwardButtonPress,
402
- onPlayerSeek,
403
- onCloseVideoModal,
404
- maximiseVideoModal,
405
- configuration,
406
- dimensions,
407
- children,
408
- playNextData,
409
- onSkipStart,
410
- onSkipLive,
411
- sleepTimerState.timer.value,
412
- sleepTimerState.timerDate,
413
- ]);
414
-
415
- if (configuration.magic_background) {
416
- const baseUrl = imageSrcFromMediaItem(entry, null);
417
-
418
- const queryParamName =
419
- configuration.audio_player_background_image_query || "width";
420
-
421
- const defaultBackgroundColor =
422
- configuration.audio_player_background_image_default_color ||
423
- theme?.app_background_color;
424
-
425
- const queryParamValue = 15;
426
-
427
- const url =
428
- baseUrl && addQueryParam(baseUrl, queryParamName, queryParamValue);
429
-
430
- return (
431
- <MagicBG
432
- image={url}
433
- fallbackUrl={baseUrl}
434
- colors={entry?.extensions?.backgroundColors}
435
- defaultColor={defaultBackgroundColor}
325
+ return (
326
+ <SafeAreaView style={[style, Styles.playerContainer]} edges={edges}>
327
+ <AnimationComponent
328
+ animationType={ComponentAnimationType.moveUpComponent}
329
+ additionalData={{ saveArea: true }}
330
+ style={Styles.playerContainer}
436
331
  >
437
- {MainContent}
438
- </MagicBG>
439
- );
440
- }
441
-
442
- return MainContent;
332
+ <AnimatedScrollModal>
333
+ <View style={Styles.playerContainer} onLayout={onLayout}>
334
+ <Layout
335
+ entry={entry}
336
+ playerState={playerState}
337
+ layoutState={layoutState}
338
+ value={value}
339
+ onPlaybackButtonPress={onPlaybackButtonPress}
340
+ onRewindButtonPress={onRewindButtonPress}
341
+ onForwardButtonPress={onForwardButtonPress}
342
+ onPlayerSeek={onPlayerSeek}
343
+ onSkipStart={onSkipStart}
344
+ onSpeedButtonPress={onSpeedButtonPress}
345
+ onSleepButtonPress={onSleepButtonPress}
346
+ playbackSpeedName={formatSpeed(playbackSpeed.value)}
347
+ playbackSleepName={
348
+ sleepTimerState.timer.value === 0
349
+ ? "sleep_timer"
350
+ : "sleep_timer_active"
351
+ }
352
+ sleepTimerDate={sleepTimerState.timerDate}
353
+ cancelSleepTimer={cancelSleepTimer}
354
+ onSkipLive={onSkipLive}
355
+ onCloseVideoModal={onCloseVideoModal}
356
+ maximiseVideoModal={maximiseVideoModal}
357
+ configuration={configuration}
358
+ dimensions={dimensions}
359
+ playNextData={playNextData}
360
+ title={title}
361
+ summary={summary}
362
+ />
363
+ <View style={Styles.paddingHorizontal}>
364
+ {children}
365
+ <AnimationComponent
366
+ animationType={ComponentAnimationType.componentFade}
367
+ >
368
+ <PlayerDetails
369
+ isAudioPlayer
370
+ configuration={configuration}
371
+ style={Styles.playerDetails}
372
+ entry={entry}
373
+ isTabletLandscape={isTabletLandscape}
374
+ />
375
+ </AnimationComponent>
376
+ </View>
377
+ </View>
378
+ </AnimatedScrollModal>
379
+ </AnimationComponent>
380
+ </SafeAreaView>
381
+ );
443
382
  };
@@ -3,25 +3,43 @@ import { View, StyleSheet } from "react-native";
3
3
 
4
4
  import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
5
5
 
6
- import { TABLET_VERTICAL_SEPARATOR_HEIGHT } from "../const";
6
+ import {
7
+ TABLET_VERTICAL_SEPARATOR_HEIGHT,
8
+ TABLET_VERTICAL_SEPARATOR_HEIGHT_S,
9
+ } from "../const";
7
10
 
8
11
  import { withDebug } from "../debug";
12
+ import { useSafeAreaFrame } from "react-native-safe-area-context";
13
+ import { isSmallTabletHeight } from "../utils";
9
14
 
10
15
  const styles = StyleSheet.create({
11
16
  flexingHeight: {
12
17
  flex: 1,
13
-
14
18
  ...withDebug({ backgroundColor: "red" }),
15
19
  },
16
20
  fixedHeight: {
17
21
  height: TABLET_VERTICAL_SEPARATOR_HEIGHT,
18
-
22
+ ...withDebug({ backgroundColor: "red" }),
23
+ },
24
+ fixedHeightSmall: {
25
+ height: TABLET_VERTICAL_SEPARATOR_HEIGHT_S,
19
26
  ...withDebug({ backgroundColor: "red" }),
20
27
  },
21
28
  });
22
29
 
23
30
  export const VerticalGutter = () => {
24
31
  const isTablet = useIsTablet();
25
-
26
- return <View style={isTablet ? styles.fixedHeight : styles.flexingHeight} />;
32
+ const { height } = useSafeAreaFrame();
33
+
34
+ return (
35
+ <View
36
+ style={
37
+ isTablet
38
+ ? isSmallTabletHeight(height)
39
+ ? styles.fixedHeightSmall
40
+ : styles.fixedHeight
41
+ : styles.flexingHeight
42
+ }
43
+ />
44
+ );
27
45
  };
@@ -79,6 +79,8 @@ type Props = {
79
79
  onSpeedButtonPress: Callback;
80
80
  onSleepButtonPress: Callback;
81
81
 
82
+ maxWidth?: number;
83
+
82
84
  docked: boolean;
83
85
  };
84
86
 
@@ -104,6 +106,7 @@ export const Controls = (props: Props) => {
104
106
  onSkipLive,
105
107
  onSpeedButtonPress,
106
108
  onSleepButtonPress,
109
+ maxWidth = 320,
107
110
 
108
111
  docked,
109
112
  } = props;
@@ -270,6 +273,7 @@ export const Controls = (props: Props) => {
270
273
  summary={summary}
271
274
  value={value}
272
275
  layoutState={layoutState}
276
+ maxWidth={maxWidth}
273
277
  />
274
278
 
275
279
  <VerticalGutter />
@@ -30,13 +30,13 @@ type Props = {
30
30
  layoutState: QuickBrickPlayer.LayoutState;
31
31
  playerState: QuickBrickPlayer.PlayerState;
32
32
  value: GetValue;
33
- configuration: QuickBrickPlayer.AudioPlayerProps["configuration"];
34
33
  dimensions: QuickBrickPlayer.AudioPlayerProps["dimensions"];
35
34
  onCloseVideoModal: () => void;
36
35
  onPlayerSeek: (targetTime: number) => void;
37
36
  playNextData: PlayNextData;
38
37
  title: string | number;
39
38
  summary: string | number;
39
+ ImageComponent?: React.ReactNode;
40
40
  };
41
41
 
42
42
  const styles = StyleSheet.create({
@@ -53,6 +53,7 @@ const styles = StyleSheet.create({
53
53
  touchableArea: {
54
54
  flexShrink: 1,
55
55
  flex: 1,
56
+ flexDirection: "row",
56
57
  alignSelf: "stretch",
57
58
  },
58
59
  contentInfo: {
@@ -95,7 +96,7 @@ const playerDimensionsStyle = (
95
96
  minimisedHeight: number,
96
97
  addPadding: boolean
97
98
  ): ViewStyle => ({
98
- paddingLeft: addPadding ? toNumberWithDefault(100, minimisedHeight) : 0,
99
+ width: addPadding ? toNumberWithDefault(100, minimisedHeight) : 0,
99
100
  });
100
101
 
101
102
  const animatedContainerStyle = (
@@ -181,13 +182,13 @@ export const DockedControls = (props: Props) => {
181
182
  layoutState,
182
183
  playerState,
183
184
  value,
184
- configuration,
185
185
  dimensions,
186
186
  onCloseVideoModal,
187
187
  onPlayerSeek,
188
188
  playNextData,
189
189
  title,
190
190
  summary,
191
+ ImageComponent,
191
192
  } = props;
192
193
 
193
194
  const isTablet = useIsTablet();
@@ -245,21 +246,22 @@ export const DockedControls = (props: Props) => {
245
246
  )}
246
247
  />
247
248
  <TouchableWithoutFeedback onPress={maximazeVideoModal}>
248
- <View
249
- style={[
250
- styles.touchableArea,
251
- playerDimensionsStyle(
252
- minimisedHeight,
253
- isActiveGesture || layoutState.docked
254
- ),
255
- ]}
256
- >
257
- <View
258
- style={[
259
- styles.contentInfo,
260
- !configuration.magic_background && backgroundColorStyle(value),
261
- ]}
262
- >
249
+ <View style={styles.touchableArea}>
250
+ {isActiveGesture || layoutState.docked ? (
251
+ <View
252
+ style={{ width: toNumberWithDefault(100, minimisedHeight) }}
253
+ >
254
+ {ImageComponent || null}
255
+ </View>
256
+ ) : (
257
+ <View
258
+ style={playerDimensionsStyle(
259
+ minimisedHeight,
260
+ isActiveGesture || layoutState.docked
261
+ )}
262
+ />
263
+ )}
264
+ <View style={[styles.contentInfo, backgroundColorStyle(value)]}>
263
265
  <ContentInfo
264
266
  content={{ ...entry, title, summary }}
265
267
  value={value}
@@ -273,7 +275,7 @@ export const DockedControls = (props: Props) => {
273
275
  isTablet
274
276
  ? styles.controlsContainerForTablet
275
277
  : styles.controlsContainerForMobile,
276
- !configuration.magic_background && backgroundColorStyle(value),
278
+ backgroundColorStyle(value),
277
279
  ]}
278
280
  >
279
281
  <Controls
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
- import { View, ViewStyle, StyleSheet } from "react-native";
2
+ import { StyleSheet, View, ViewStyle } from "react-native";
3
3
  import {
4
- useSafeAreaInsets,
5
4
  useSafeAreaFrame,
5
+ useSafeAreaInsets,
6
6
  } from "react-native-safe-area-context";
7
7
  import { useModalAnimationContext } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
8
8
 
@@ -13,11 +13,11 @@ import { Controls } from "./Controls";
13
13
 
14
14
  import { useMobileLayoutImageSize, useTransportInfoHeight } from "./hooks";
15
15
  import { DockedControls } from "./DockedControls";
16
- import { withDebug, DEBUG } from "./debug";
16
+ import { DEBUG, withDebug } from "./debug";
17
17
  import {
18
+ BottomDebugSquare,
18
19
  LeftDebugSquare,
19
20
  RightDebugSquare,
20
- BottomDebugSquare,
21
21
  } from "./Debug/index";
22
22
 
23
23
  import { Props } from "./types";
@@ -218,7 +218,6 @@ export function MobileLayout({
218
218
  layoutState={layoutState}
219
219
  playerState={playerState}
220
220
  value={value}
221
- configuration={configuration}
222
221
  dimensions={dimensions}
223
222
  onCloseVideoModal={onCloseVideoModal}
224
223
  onPlayerSeek={onPlayerSeek}