@applicaster/quick-brick-player 13.0.0-rc.65 → 13.0.0-rc.66
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.
|
|
3
|
+
"version": "13.0.0-rc.66",
|
|
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": "13.0.0-rc.
|
|
39
|
+
"@applicaster/quick-brick-mobile-transport-controls": "13.0.0-rc.66",
|
|
40
40
|
"@applicaster/quick-brick-tv-transport-controls": "13.0.0-rc.56",
|
|
41
|
-
"@applicaster/zapp-react-native-tvos-app": "13.0.0-rc.
|
|
42
|
-
"@applicaster/zapp-react-native-ui-components": "13.0.0-rc.
|
|
43
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-rc.
|
|
41
|
+
"@applicaster/zapp-react-native-tvos-app": "13.0.0-rc.66",
|
|
42
|
+
"@applicaster/zapp-react-native-ui-components": "13.0.0-rc.66",
|
|
43
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-rc.66",
|
|
44
44
|
"keymirror": "^0.1.1",
|
|
45
45
|
"query-string": "7.1.3",
|
|
46
46
|
"react-native-web-linear-gradient": "1.1.2",
|
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
} from "./SleepTimerManager";
|
|
42
42
|
import { SpeedController, PlaybackSpeed, DEFAULT_SPEED } from "./SpeedManager";
|
|
43
43
|
import { imageSrcFromMediaItem } from "@applicaster/zapp-react-native-utils/configurationUtils";
|
|
44
|
+
import { useTheme } from "@applicaster/zapp-react-native-utils/theme";
|
|
44
45
|
|
|
45
46
|
const { log_debug } = createLogger({
|
|
46
47
|
subsystem: "UIComponent",
|
|
@@ -58,6 +59,7 @@ type Configuration = {
|
|
|
58
59
|
[key: string]: any;
|
|
59
60
|
magic_background?: boolean;
|
|
60
61
|
audio_player_background_image_query?: string;
|
|
62
|
+
audio_player_background_image_default_color?: string;
|
|
61
63
|
tablet_landscape_sidebar_width?: string;
|
|
62
64
|
tablet_landscape_player_container_background_color?: string;
|
|
63
65
|
};
|
|
@@ -130,6 +132,7 @@ const sleeps = [
|
|
|
130
132
|
export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
131
133
|
const player = usePlayer();
|
|
132
134
|
const playerState = usePlayerState("audio-player-wrapper");
|
|
135
|
+
const theme = useTheme();
|
|
133
136
|
|
|
134
137
|
const {
|
|
135
138
|
docked,
|
|
@@ -451,6 +454,10 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
451
454
|
const queryParamName =
|
|
452
455
|
configuration.audio_player_background_image_query || "width";
|
|
453
456
|
|
|
457
|
+
const defaultBackgroundColor =
|
|
458
|
+
configuration.audio_player_background_image_default_color ||
|
|
459
|
+
theme?.app_background_color;
|
|
460
|
+
|
|
454
461
|
const queryParamValue = 15;
|
|
455
462
|
|
|
456
463
|
const url =
|
|
@@ -461,7 +468,7 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
461
468
|
image={url}
|
|
462
469
|
fallbackUrl={baseUrl}
|
|
463
470
|
colors={entry?.extensions?.backgroundColors}
|
|
464
|
-
defaultColor=
|
|
471
|
+
defaultColor={defaultBackgroundColor}
|
|
465
472
|
>
|
|
466
473
|
{MainContent}
|
|
467
474
|
</MagicBG>
|
|
@@ -33,8 +33,10 @@ import {
|
|
|
33
33
|
ComponentAnimationType,
|
|
34
34
|
useModalAnimationContext,
|
|
35
35
|
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation";
|
|
36
|
+
import { PlayerAnimationStateT } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation/ModalAnimationContext";
|
|
36
37
|
import DockedLayout from "./DockedLayout";
|
|
37
38
|
import { isValidDate } from "../../Utils";
|
|
39
|
+
import { calculateBorderRadius } from "../utils";
|
|
38
40
|
|
|
39
41
|
type Dimensions = {
|
|
40
42
|
width: number;
|
|
@@ -121,14 +123,16 @@ const Styles = {
|
|
|
121
123
|
isTablet: boolean,
|
|
122
124
|
docked: boolean,
|
|
123
125
|
startComponentsAnimation: boolean,
|
|
124
|
-
isActiveGesture: boolean
|
|
126
|
+
isActiveGesture: boolean,
|
|
127
|
+
playerAnimationState: PlayerAnimationStateT
|
|
125
128
|
) => ({
|
|
126
|
-
borderRadius:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
borderRadius: calculateBorderRadius(
|
|
130
|
+
isTablet,
|
|
131
|
+
docked,
|
|
132
|
+
startComponentsAnimation,
|
|
133
|
+
isActiveGesture,
|
|
134
|
+
playerAnimationState
|
|
135
|
+
),
|
|
132
136
|
}),
|
|
133
137
|
|
|
134
138
|
paddingHorizontal: {
|
|
@@ -340,7 +344,7 @@ export default function DefaultLayout(props: LayoutProps) {
|
|
|
340
344
|
[defaultDimensions, isTablet]
|
|
341
345
|
);
|
|
342
346
|
|
|
343
|
-
const { isActiveGesture, startComponentsAnimation } =
|
|
347
|
+
const { isActiveGesture, startComponentsAnimation, playerAnimationState } =
|
|
344
348
|
useModalAnimationContext();
|
|
345
349
|
|
|
346
350
|
return (
|
|
@@ -388,7 +392,8 @@ export default function DefaultLayout(props: LayoutProps) {
|
|
|
388
392
|
isTablet,
|
|
389
393
|
docked,
|
|
390
394
|
startComponentsAnimation,
|
|
391
|
-
isActiveGesture
|
|
395
|
+
isActiveGesture,
|
|
396
|
+
playerAnimationState
|
|
392
397
|
)}
|
|
393
398
|
defaultImageDimensions={defaultImageDimensions}
|
|
394
399
|
/>
|
|
@@ -230,7 +230,7 @@ export default function DockedLayout(props: LayoutProps) {
|
|
|
230
230
|
} = useModalAnimationContext();
|
|
231
231
|
|
|
232
232
|
const maximazeVideoModal = React.useCallback(
|
|
233
|
-
() => setPlayerAnimationState(PlayerAnimationStateEnum.
|
|
233
|
+
() => setPlayerAnimationState(PlayerAnimationStateEnum.maximize),
|
|
234
234
|
[]
|
|
235
235
|
);
|
|
236
236
|
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { localStorage } from "@applicaster/zapp-react-native-bridge/ZappStorage/LocalStorage";
|
|
2
|
+
import {
|
|
3
|
+
PlayerAnimationStateEnum,
|
|
4
|
+
PlayerAnimationStateT,
|
|
5
|
+
} from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/ModalAnimation/ModalAnimationContext";
|
|
2
6
|
import { parseJsonIfNeeded } from "@applicaster/zapp-react-native-utils/functionUtils";
|
|
3
7
|
|
|
4
8
|
export const NAMESPACE = "audio-player";
|
|
@@ -31,3 +35,23 @@ export const formatSpeed = (value: number) => {
|
|
|
31
35
|
// Return the formatted string with "speed_" prefix
|
|
32
36
|
return `speed_${formattedValue}`;
|
|
33
37
|
};
|
|
38
|
+
|
|
39
|
+
export const calculateBorderRadius = (
|
|
40
|
+
isTablet: boolean,
|
|
41
|
+
docked: boolean,
|
|
42
|
+
startComponentsAnimation: boolean,
|
|
43
|
+
isActiveGesture: boolean,
|
|
44
|
+
playerAnimationState: PlayerAnimationStateT
|
|
45
|
+
): number => {
|
|
46
|
+
const shouldRemoveBorderRadius =
|
|
47
|
+
(startComponentsAnimation &&
|
|
48
|
+
isActiveGesture &&
|
|
49
|
+
playerAnimationState !== PlayerAnimationStateEnum.maximize) ||
|
|
50
|
+
docked;
|
|
51
|
+
|
|
52
|
+
if (shouldRemoveBorderRadius) {
|
|
53
|
+
return 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return isTablet ? 24 : 10;
|
|
57
|
+
};
|