@applicaster/quick-brick-player 13.0.0-rc.99 → 14.0.0-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 +5 -6
- package/src/Player/AudioLayer/AudioDescription.tsx +109 -68
- package/src/Player/AudioLayer/AudioPlayerWrapper.tsx +81 -189
- package/src/Player/AudioLayer/Layout/Controls/VerticalGutter.tsx +23 -5
- package/src/Player/AudioLayer/Layout/Controls/index.tsx +24 -49
- package/src/Player/AudioLayer/Layout/Controls/utils.ts +2 -2
- package/src/Player/AudioLayer/Layout/DockedControls/index.tsx +38 -19
- package/src/Player/AudioLayer/Layout/MobileLayout.tsx +4 -13
- package/src/Player/AudioLayer/Layout/PlayerImage/AnimatedImage.tsx +38 -34
- package/src/Player/AudioLayer/Layout/PlayerImage/FlexImage.tsx +4 -16
- package/src/Player/AudioLayer/Layout/PlayerImage/hooks/index.ts +1 -0
- package/src/Player/AudioLayer/Layout/PlayerImage/hooks/useChangePlayerState.ts +99 -0
- package/src/Player/AudioLayer/Layout/PlayerImage/index.tsx +37 -20
- package/src/Player/AudioLayer/Layout/PlayerImage/styles.ts +19 -0
- package/src/Player/AudioLayer/Layout/TabletLandscapeLayout.tsx +101 -105
- package/src/Player/AudioLayer/Layout/TabletPortraitLayout.tsx +2 -11
- package/src/Player/AudioLayer/Layout/TransportInfo/index.tsx +19 -5
- package/src/Player/AudioLayer/Layout/const.ts +4 -0
- package/src/Player/AudioLayer/Layout/hooks/useTransportInfoHeight.ts +1 -1
- package/src/Player/AudioLayer/Layout/utils.ts +7 -0
- package/src/Player/AudioLayer/SleepTimerManager.ts +22 -11
- package/src/Player/AudioLayer/components/SleepTimerModalHeader/SleepTimerModalHeader.tsx +66 -0
- package/src/Player/AudioLayer/components/SleepTimerModalHeader/index.ts +1 -0
- package/src/Player/AudioLayer/useSleepTimerModal.ts +109 -0
- package/src/Player/Const/sleepTimerOptions.ts +7 -5
- package/src/Player/Utils/index.tsx +6 -0
- package/src/Player/hooks/useIsCasting.tsx +57 -0
- package/src/Player/index.tsx +78 -33
- package/src/QuickBrickPlayer.tsx +3 -0
- package/src/Player/AudioLayer/LinearGradient/LinearGradientProxy.ts +0 -3
- package/src/Player/AudioLayer/LinearGradient/LinearGradientProxy.web.ts +0 -3
- package/src/Player/AudioLayer/LinearGradient/index.ts +0 -1
- package/src/Player/AudioLayer/MagicBG/index.tsx +0 -155
- package/src/utils/utils.ts +0 -25
package/src/utils/utils.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import RNColorThief from "@applicaster/react-native-color-thief";
|
|
2
|
-
import { createLogger } from "@applicaster/zapp-react-native-utils/logger";
|
|
3
|
-
|
|
4
|
-
const { log_error } = createLogger({
|
|
5
|
-
subsystem: "UIComponent",
|
|
6
|
-
category: "MagicBackground",
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export const getDominantColor = async (imageUrl: string): Promise<any> => {
|
|
10
|
-
try {
|
|
11
|
-
return await RNColorThief.getColor(imageUrl, 1, false);
|
|
12
|
-
} catch (error) {
|
|
13
|
-
log_error("Failed to get the dominant color", { error });
|
|
14
|
-
throw error;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const getPalettes = async (imageUrl: string): Promise<any> => {
|
|
19
|
-
try {
|
|
20
|
-
return await RNColorThief.getPalette(imageUrl, 3, 1, true);
|
|
21
|
-
} catch (error) {
|
|
22
|
-
log_error("Failed to get the palette", { error });
|
|
23
|
-
throw error;
|
|
24
|
-
}
|
|
25
|
-
};
|