feat: background

This commit is contained in:
2025-12-10 11:21:49 +01:00
parent 70ace4cc57
commit d92303dd8a
8 changed files with 23 additions and 21 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

+2
View File
@@ -207,6 +207,8 @@ export const background = {
profileBgWeb: require("./UI/profileBgWeb.png"), profileBgWeb: require("./UI/profileBgWeb.png"),
hitParadeBG, hitParadeBG,
hitParadeBG2: require("./UI/hitparadeBG2.jpg"), hitParadeBG2: require("./UI/hitparadeBG2.jpg"),
playbackWeb: require("./UI/playbackWeb.png"),
playbackMobile: require("./UI/playbackMobile.png"),
homeBG, homeBG,
homeBGWeb: require("./UI/homeBGWeb.png"), homeBGWeb: require("./UI/homeBGWeb.png"),
loginBgWeb: require("./UI/loginBgWeb.png"), loginBgWeb: require("./UI/loginBgWeb.png"),
+3 -3
View File
@@ -417,9 +417,9 @@ export const VOICE = [
{ {
title: "BASE", title: "BASE",
data: [ data: [
"Une voix féminine interpretra ta chanson.", "Une voix féminine interprétera ta chanson.",
"Une voix masculine interpretera ta chanson.", "Une voix masculine interprétera ta chanson.",
"Deux voix pour interpreter ta chanson.", "Deux voix pour interpréter ta chanson.",
"Solo vocal puissant et dramatique.", "Solo vocal puissant et dramatique.",
"Un chœur gospel pour (dimension spirituelle ou émotionnelle).", "Un chœur gospel pour (dimension spirituelle ou émotionnelle).",
"Un cri brut et puissant (émotion intense).", "Un cri brut et puissant (émotion intense).",
+1 -2
View File
@@ -395,8 +395,7 @@ const Home = ({ navigation, route }) => {
const handleStartVisit = useCallback(() => { const handleStartVisit = useCallback(() => {
setVideoUrl(isWeb ? videos?.landingWeb : videos?.landing); setVideoUrl(isWeb ? videos?.landingWeb : videos?.landing);
}, []); }, []);
console.log("is web ? : ", isWeb);
console.log("landing video url is : ", videoUrl);
const handleReturnToLanding = useCallback(() => { const handleReturnToLanding = useCallback(() => {
navigate(Routes.LandingPage); navigate(Routes.LandingPage);
}, []); }, []);
+1 -1
View File
@@ -31,7 +31,7 @@ const Playback = ({ route, navigation }) => {
}, [project]); }, [project]);
return ( return (
<Page headerType="NONE" backgroundImg={background.playbackBG2}> <Page headerType="NONE" backgroundImg={isWeb ? background.playbackWeb : background.playbackMobile}>
<Image source={ai.theo} style={styles.img} resizeMode="contain" /> <Image source={ai.theo} style={styles.img} resizeMode="contain" />
<MusicLandHeader <MusicLandHeader
onPressBack={() => navigation.navigate(Routes.Home)} onPressBack={() => navigation.navigate(Routes.Home)}
+3 -2
View File
@@ -7,13 +7,14 @@ import Page from "../../layouts/Page";
import { Routes } from "../../navigation"; import { Routes } from "../../navigation";
import { gutters, Palette } from "../../styles"; import { gutters, Palette } from "../../styles";
import { FONT_FAMILY } from "../../styles/Fonts"; import { FONT_FAMILY } from "../../styles/Fonts";
import { isWeb } from "../../hooks/useLayoutType";
const PlaybackGuide = ({ navigation }) => { const PlaybackGuide = ({ navigation }) => {
return ( return (
<Page headerType="NONE" backgroundImg={background.playbackBG2}> <Page headerType="NONE" backgroundImg={isWeb ? background.playbackWeb : background.playbackMobile}>
<MusicLandHeader onPressBack={() => navigation.goBack()} /> <MusicLandHeader onPressBack={() => navigation.goBack()} />
<View style={styles.container}> <View style={styles.container}>
<BlurView intensity={Platform.OS === "ios" ? 80 : 50} style={styles.blurContainer}> <BlurView intensity={Platform.OS === "ios" ? 80 : 40} style={styles.blurContainer} experimentalBlurMethod="dimezisBlurView">
<ScrollView <ScrollView
contentContainerStyle={styles.scrollContent} contentContainerStyle={styles.scrollContent}
showsVerticalScrollIndicator={false} showsVerticalScrollIndicator={false}
+13 -13
View File
@@ -40,10 +40,10 @@ const RecordedPlayback = ({ route }) => {
const stopPlayback = useCallback(async () => { const stopPlayback = useCallback(async () => {
try { try {
if (audioPlayer?.playing) await audioPlayer.pause?.(); if (audioPlayer?.playing) await audioPlayer.pause?.();
} catch (e) {} } catch (e) { }
try { try {
if (videoPlayer?.playing) videoPlayer.pause(); if (videoPlayer?.playing) videoPlayer.pause();
} catch (e) {} } catch (e) { }
}, [audioPlayer, videoPlayer]); }, [audioPlayer, videoPlayer]);
useEffect(() => { useEffect(() => {
@@ -52,7 +52,7 @@ const RecordedPlayback = ({ route }) => {
try { try {
if (audioPlayer && songUrl) await audioPlayer.play?.(); if (audioPlayer && songUrl) await audioPlayer.play?.();
if (videoPlayer) videoPlayer.play(); if (videoPlayer) videoPlayer.play();
} catch (e) {} } catch (e) { }
}; };
start(); start();
return () => { return () => {
@@ -78,7 +78,7 @@ const RecordedPlayback = ({ route }) => {
videoPlayer.currentTime = Math.max(0, (pos || 0) / 1000); videoPlayer.currentTime = Math.max(0, (pos || 0) / 1000);
} }
} }
} catch (e) {} } catch (e) { }
}, 250); }, 250);
return () => global.clearInterval(id); return () => global.clearInterval(id);
}, [audioPlayer, videoPlayer]); }, [audioPlayer, videoPlayer]);
@@ -90,7 +90,7 @@ const RecordedPlayback = ({ route }) => {
if (audioPlayer && dur > 0) if (audioPlayer && dur > 0)
await audioPlayer.seekTo?.(Math.floor(pos / 1000)); await audioPlayer.seekTo?.(Math.floor(pos / 1000));
if (videoPlayer) videoPlayer.currentTime = Math.max(0, pos / 1000); if (videoPlayer) videoPlayer.currentTime = Math.max(0, pos / 1000);
} catch (e) {} } catch (e) { }
}; };
const onSeekStart = useCallback(() => { const onSeekStart = useCallback(() => {
@@ -100,19 +100,19 @@ const RecordedPlayback = ({ route }) => {
const pauseDuringSeek = useCallback(async () => { const pauseDuringSeek = useCallback(async () => {
try { try {
if (audioPlayer?.playing) await audioPlayer.pause?.(); if (audioPlayer?.playing) await audioPlayer.pause?.();
} catch (e) {} } catch (e) { }
try { try {
if (videoPlayer?.playing) videoPlayer.pause(); if (videoPlayer?.playing) videoPlayer.pause();
} catch (e) {} } catch (e) { }
}, [audioPlayer, videoPlayer]); }, [audioPlayer, videoPlayer]);
const resumeAfterSeek = useCallback(async () => { const resumeAfterSeek = useCallback(async () => {
try { try {
if (audioPlayer) await audioPlayer.play?.(); if (audioPlayer) await audioPlayer.play?.();
} catch (e) {} } catch (e) { }
try { try {
if (videoPlayer) videoPlayer.play(); if (videoPlayer) videoPlayer.play();
} catch (e) {} } catch (e) { }
}, [audioPlayer, videoPlayer]); }, [audioPlayer, videoPlayer]);
const sliderProgress = useMemo(() => { const sliderProgress = useMemo(() => {
@@ -140,7 +140,7 @@ const RecordedPlayback = ({ route }) => {
try { try {
const duration = progressInfo?.dur || 0; const duration = progressInfo?.dur || 0;
const position = progressInfo?.pos || 0; const position = progressInfo?.pos || 0;
const isAtEnd = duration > 0 && duration - position < 350; const isAtEnd = duration > 0 && duration - position < 1000;
const isCurrentlyPlaying = const isCurrentlyPlaying =
!!audioPlayer?.playing || !!videoPlayer?.playing; !!audioPlayer?.playing || !!videoPlayer?.playing;
@@ -159,7 +159,7 @@ const RecordedPlayback = ({ route }) => {
playbackEndedRef.current = false; playbackEndedRef.current = false;
if (songUrl && audioPlayer) await audioPlayer.play?.(); if (songUrl && audioPlayer) await audioPlayer.play?.();
if (videoPlayer) videoPlayer.play(); if (videoPlayer) videoPlayer.play();
} catch (e) {} } catch (e) { }
}; };
return ( return (
@@ -233,7 +233,7 @@ const RecordedPlayback = ({ route }) => {
onPress={async () => { onPress={async () => {
try { try {
await stopPlayback(); await stopPlayback();
} catch (e) {} } catch (e) { }
try { try {
if (videoUri) { if (videoUri) {
const info = await FileSystem.getInfoAsync(videoUri); const info = await FileSystem.getInfoAsync(videoUri);
@@ -242,7 +242,7 @@ const RecordedPlayback = ({ route }) => {
idempotent: true, idempotent: true,
}); });
} }
} catch (e) {} } catch (e) { }
navigate(Routes.RecordPlayback, { project }); navigate(Routes.RecordPlayback, { project });
}} }}
/> />