@applicaster/quick-brick-player 13.0.0-alpha.2957047383 → 13.0.0-alpha.3013095924

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.
Files changed (32) hide show
  1. package/package.json +5 -6
  2. package/src/Player/AudioLayer/AudioDescription.tsx +109 -68
  3. package/src/Player/AudioLayer/AudioPlayerWrapper.tsx +97 -133
  4. package/src/Player/AudioLayer/Layout/Controls/VerticalGutter.tsx +23 -5
  5. package/src/Player/AudioLayer/Layout/Controls/index.tsx +34 -19
  6. package/src/Player/AudioLayer/Layout/Controls/utils.ts +3 -11
  7. package/src/Player/AudioLayer/Layout/Debug/index.tsx +55 -0
  8. package/src/Player/AudioLayer/Layout/DockedControls/index.tsx +21 -19
  9. package/src/Player/AudioLayer/Layout/MobileLayout.tsx +35 -17
  10. package/src/Player/AudioLayer/Layout/PlayerImage/AnimatedImage.tsx +12 -12
  11. package/src/Player/AudioLayer/Layout/PlayerImage/FlexImage.tsx +4 -16
  12. package/src/Player/AudioLayer/Layout/PlayerImage/index.tsx +33 -20
  13. package/src/Player/AudioLayer/Layout/PlayerImage/styles.ts +15 -0
  14. package/src/Player/AudioLayer/Layout/TabletLandscapeLayout.tsx +105 -99
  15. package/src/Player/AudioLayer/Layout/TabletPortraitLayout.tsx +5 -6
  16. package/src/Player/AudioLayer/Layout/TransportInfo/index.tsx +39 -13
  17. package/src/Player/AudioLayer/Layout/const.ts +6 -0
  18. package/src/Player/AudioLayer/Layout/debug.ts +1 -1
  19. package/src/Player/AudioLayer/Layout/hooks/index.ts +3 -1
  20. package/src/Player/AudioLayer/Layout/hooks/useMobileLayoutImageSize.ts +14 -0
  21. package/src/Player/AudioLayer/Layout/hooks/{useImageSize.ts → useTabletLayoutImageSize.ts} +10 -5
  22. package/src/Player/AudioLayer/Layout/hooks/useTransportInfoHeight.ts +1 -1
  23. package/src/Player/AudioLayer/Layout/utils.ts +7 -0
  24. package/src/Player/Const/sleepTimerOptions.ts +39 -10
  25. package/src/Player/hooks/useIsCasting.tsx +57 -0
  26. package/src/Player/index.tsx +10 -5
  27. package/src/QuickBrickPlayer.tsx +3 -0
  28. package/src/Player/AudioLayer/LinearGradient/LinearGradientProxy.ts +0 -3
  29. package/src/Player/AudioLayer/LinearGradient/LinearGradientProxy.web.ts +0 -3
  30. package/src/Player/AudioLayer/LinearGradient/index.ts +0 -1
  31. package/src/Player/AudioLayer/MagicBG/index.tsx +0 -155
  32. package/src/utils/utils.ts +0 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-player",
3
- "version": "13.0.0-alpha.2957047383",
3
+ "version": "13.0.0-alpha.3013095924",
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.95",
38
+ "@applicaster/quick-brick-mobile-transport-controls": "13.0.0-alpha.3013095924",
39
39
  "@applicaster/quick-brick-tv-transport-controls": "13.0.0-rc.56",
40
- "@applicaster/zapp-react-native-tvos-app": "13.0.0-alpha.2957047383",
41
- "@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.2957047383",
42
- "@applicaster/zapp-react-native-utils": "13.0.0-alpha.2957047383",
40
+ "@applicaster/zapp-react-native-tvos-app": "13.0.0-alpha.3013095924",
41
+ "@applicaster/zapp-react-native-ui-components": "13.0.0-alpha.3013095924",
42
+ "@applicaster/zapp-react-native-utils": "13.0.0-alpha.3013095924",
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={1}>
112
+ <View
113
+ style={[
114
+ styles.wrapper,
115
+ {
116
+ maxWidth: Math.max(maxWidth, 320),
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,22 +31,24 @@ 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";
50
- import { openBottomSheetModal } from "@applicaster/zapp-react-native-utils/modalState";
51
- import { sleepTimerOptions } from "../Const/sleepTimerOptions";
45
+ import { DEFAULT_SPEED, PlaybackSpeed, SpeedController } from "./SpeedManager";
46
+ import {
47
+ dismissModal as dismissBottomSheetModal,
48
+ openBottomSheetModal,
49
+ useModalStoreState,
50
+ } from "@applicaster/zapp-react-native-utils/modalState";
51
+ import { getSleepTimerOptions } from "../Const/sleepTimerOptions";
52
52
  import { speedOptions } from "../Const/speedOptions";
53
53
 
54
54
  const { log_debug } = createLogger({
@@ -65,8 +65,6 @@ type Dimensions = {
65
65
 
66
66
  type Configuration = {
67
67
  [key: string]: any;
68
- magic_background?: boolean;
69
- audio_player_background_image_query?: string;
70
68
  audio_player_background_image_default_color?: string;
71
69
  tablet_landscape_sidebar_width?: string;
72
70
  tablet_landscape_player_container_background_color?: string;
@@ -75,7 +73,6 @@ type Configuration = {
75
73
  type Props = {
76
74
  children: React.ReactNode;
77
75
  inline?: boolean;
78
- docked?: boolean;
79
76
  configuration: Configuration;
80
77
  style: ViewStyle & Dimensions;
81
78
  entry: ZappEntry;
@@ -108,10 +105,10 @@ const edges: Edge[] = ["right", "left", "top"];
108
105
  export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
109
106
  const player = usePlayer();
110
107
  const playerState = usePlayerState("audio-player-wrapper");
111
- const theme = useTheme();
108
+
109
+ const modalBottomSheetState = useModalStoreState();
112
110
 
113
111
  const {
114
- docked,
115
112
  configuration,
116
113
  style,
117
114
  entry,
@@ -148,6 +145,31 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
148
145
  }
149
146
  }, [player]);
150
147
 
148
+ useEffect(() => {
149
+ if (!player) return;
150
+
151
+ const unsubscribe = player.addListener({
152
+ id: "audio-player-wrapper-bottom-sheet-modal",
153
+ listener: {
154
+ onVideoEnd: () => {
155
+ // Dismiss the bottom sheet modal when the video ends to avoid audio breaks and app freeze
156
+ if (modalBottomSheetState.visible) {
157
+ dismissBottomSheetModal();
158
+ }
159
+ },
160
+ },
161
+ });
162
+
163
+ return () => unsubscribe?.();
164
+ }, [player, modalBottomSheetState.visible, sleepTimerManager]);
165
+
166
+ React.useEffect(() => {
167
+ if (playerState?.isLive) {
168
+ // Resetting a sleep timer when audio content is live (Timer not supported on live video)
169
+ sleepTimerManager.setSleepTimer(SLEEP_TIMER_OFF).catch();
170
+ }
171
+ }, [playerState?.isLive]);
172
+
151
173
  const [playbackSpeed, setPlaybackSpeed] =
152
174
  useState<PlaybackSpeed>(DEFAULT_SPEED);
153
175
 
@@ -278,12 +300,7 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
278
300
  const onSleepButtonPress = React.useCallback(() => {
279
301
  openBottomSheetModal({
280
302
  modalBottomSheetContentProps: {
281
- items: [
282
- {
283
- label: configuration["playback_sleep_off_label"],
284
- value: 0,
285
- },
286
- ].concat(sleepTimerOptions),
303
+ items: getSleepTimerOptions(configuration),
287
304
  current_selection: sleepTimerState.timer,
288
305
  onPress: onSleepSelect,
289
306
  title: configuration["playback_sleep_title"],
@@ -335,114 +352,61 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
335
352
  player?.seekTo(0);
336
353
  }, [player]);
337
354
 
338
- const MainContent = React.useMemo(() => {
339
- return (
340
- <SafeAreaView style={[style, Styles.playerContainer]} edges={edges}>
341
- <AnimationComponent
342
- animationType={ComponentAnimationType.moveUpComponent}
343
- additionalData={{ saveArea: true }}
344
- style={Styles.playerContainer}
345
- >
346
- <AnimatedScrollModal>
347
- <View style={Styles.playerContainer} onLayout={onLayout}>
348
- <Layout
349
- entry={entry}
350
- playerState={playerState}
351
- layoutState={layoutState}
352
- value={value}
353
- onPlaybackButtonPress={onPlaybackButtonPress}
354
- onRewindButtonPress={onRewindButtonPress}
355
- onForwardButtonPress={onForwardButtonPress}
356
- onPlayerSeek={onPlayerSeek}
357
- onSkipStart={onSkipStart}
358
- onSpeedButtonPress={onSpeedButtonPress}
359
- onSleepButtonPress={onSleepButtonPress}
360
- playbackSpeedName={formatSpeed(playbackSpeed.value)}
361
- playbackSleepName={
362
- sleepTimerState.timer.value === 0
363
- ? "sleep_timer"
364
- : "sleep_timer_active"
365
- }
366
- sleepTimerDate={sleepTimerState.timerDate}
367
- cancelSleepTimer={cancelSleepTimer}
368
- onSkipLive={onSkipLive}
369
- onCloseVideoModal={onCloseVideoModal}
370
- maximiseVideoModal={maximiseVideoModal}
371
- configuration={configuration}
372
- dimensions={dimensions}
373
- playNextData={playNextData}
374
- title={title}
375
- summary={summary}
376
- defaultDimensions={defaultDimensions}
377
- />
378
- <View style={Styles.paddingHorizontal}>
379
- {children}
380
- <AnimationComponent
381
- animationType={ComponentAnimationType.componentFade}
382
- >
383
- <PlayerDetails
384
- isAudioPlayer
385
- configuration={configuration}
386
- style={Styles.playerDetails}
387
- entry={entry}
388
- isTabletLandscape={isTabletLandscape}
389
- />
390
- </AnimationComponent>
391
- </View>
392
- </View>
393
- </AnimatedScrollModal>
394
- </AnimationComponent>
395
- </SafeAreaView>
396
- );
397
- }, [
398
- docked,
399
- style,
400
- entry,
401
- playerState,
402
- layoutState,
403
- value,
404
- onPlaybackButtonPress,
405
- onRewindButtonPress,
406
- onForwardButtonPress,
407
- onPlayerSeek,
408
- onCloseVideoModal,
409
- maximiseVideoModal,
410
- configuration,
411
- dimensions,
412
- children,
413
- playNextData,
414
- onSkipStart,
415
- onSkipLive,
416
- sleepTimerState.timer.value,
417
- sleepTimerState.timerDate,
418
- ]);
419
-
420
- if (configuration.magic_background) {
421
- const baseUrl = imageSrcFromMediaItem(entry, null);
422
-
423
- const queryParamName =
424
- configuration.audio_player_background_image_query || "width";
425
-
426
- const defaultBackgroundColor =
427
- configuration.audio_player_background_image_default_color ||
428
- theme?.app_background_color;
429
-
430
- const queryParamValue = 15;
431
-
432
- const url =
433
- baseUrl && addQueryParam(baseUrl, queryParamName, queryParamValue);
434
-
435
- return (
436
- <MagicBG
437
- image={url}
438
- fallbackUrl={baseUrl}
439
- colors={entry?.extensions?.backgroundColors}
440
- defaultColor={defaultBackgroundColor}
355
+ return (
356
+ <SafeAreaView style={[style, Styles.playerContainer]} edges={edges}>
357
+ <AnimationComponent
358
+ animationType={ComponentAnimationType.moveUpComponent}
359
+ additionalData={{ saveArea: true }}
360
+ style={Styles.playerContainer}
441
361
  >
442
- {MainContent}
443
- </MagicBG>
444
- );
445
- }
446
-
447
- return MainContent;
362
+ <AnimatedScrollModal>
363
+ <View style={Styles.playerContainer} onLayout={onLayout}>
364
+ <Layout
365
+ entry={entry}
366
+ playerState={playerState}
367
+ layoutState={layoutState}
368
+ value={value}
369
+ onPlaybackButtonPress={onPlaybackButtonPress}
370
+ onRewindButtonPress={onRewindButtonPress}
371
+ onForwardButtonPress={onForwardButtonPress}
372
+ onPlayerSeek={onPlayerSeek}
373
+ onSkipStart={onSkipStart}
374
+ onSpeedButtonPress={onSpeedButtonPress}
375
+ onSleepButtonPress={onSleepButtonPress}
376
+ playbackSpeedName={formatSpeed(playbackSpeed.value)}
377
+ playbackSleepName={
378
+ sleepTimerState.timer.value === 0
379
+ ? "sleep_timer"
380
+ : "sleep_timer_active"
381
+ }
382
+ sleepTimerDate={sleepTimerState.timerDate}
383
+ cancelSleepTimer={cancelSleepTimer}
384
+ onSkipLive={onSkipLive}
385
+ onCloseVideoModal={onCloseVideoModal}
386
+ maximiseVideoModal={maximiseVideoModal}
387
+ configuration={configuration}
388
+ dimensions={dimensions}
389
+ playNextData={playNextData}
390
+ title={title}
391
+ summary={summary}
392
+ />
393
+ <View style={Styles.paddingHorizontal}>
394
+ {children}
395
+ <AnimationComponent
396
+ animationType={ComponentAnimationType.componentFade}
397
+ >
398
+ <PlayerDetails
399
+ isAudioPlayer
400
+ configuration={configuration}
401
+ style={Styles.playerDetails}
402
+ entry={entry}
403
+ isTabletLandscape={isTabletLandscape}
404
+ />
405
+ </AnimationComponent>
406
+ </View>
407
+ </View>
408
+ </AnimatedScrollModal>
409
+ </AnimationComponent>
410
+ </SafeAreaView>
411
+ );
448
412
  };
@@ -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
  };