diff --git a/src/assets/UI/playbackMobile.png b/src/assets/UI/playbackMobile.png new file mode 100644 index 0000000..426fa92 Binary files /dev/null and b/src/assets/UI/playbackMobile.png differ diff --git a/src/assets/UI/playbackWeb.png b/src/assets/UI/playbackWeb.png new file mode 100644 index 0000000..d04b2bc Binary files /dev/null and b/src/assets/UI/playbackWeb.png differ diff --git a/src/assets/index.js b/src/assets/index.js index 0046cdc..2ae8bbc 100644 --- a/src/assets/index.js +++ b/src/assets/index.js @@ -207,6 +207,8 @@ export const background = { profileBgWeb: require("./UI/profileBgWeb.png"), hitParadeBG, hitParadeBG2: require("./UI/hitparadeBG2.jpg"), + playbackWeb: require("./UI/playbackWeb.png"), + playbackMobile: require("./UI/playbackMobile.png"), homeBG, homeBGWeb: require("./UI/homeBGWeb.png"), loginBgWeb: require("./UI/loginBgWeb.png"), diff --git a/src/data/data.js b/src/data/data.js index 4c64fb0..da205cd 100644 --- a/src/data/data.js +++ b/src/data/data.js @@ -417,9 +417,9 @@ export const VOICE = [ { title: "BASE", data: [ - "Une voix féminine interpretra ta chanson.", - "Une voix masculine interpretera ta chanson.", - "Deux voix pour interpreter ta chanson.", + "Une voix féminine interprétera ta chanson.", + "Une voix masculine interprétera ta chanson.", + "Deux voix pour interpréter ta chanson.", "Solo vocal puissant et dramatique.", "Un chœur gospel pour (dimension spirituelle ou émotionnelle).", "Un cri brut et puissant (émotion intense).", diff --git a/src/screens/Home/Home.js b/src/screens/Home/Home.js index f8d17b1..232c128 100644 --- a/src/screens/Home/Home.js +++ b/src/screens/Home/Home.js @@ -395,8 +395,7 @@ const Home = ({ navigation, route }) => { const handleStartVisit = useCallback(() => { setVideoUrl(isWeb ? videos?.landingWeb : videos?.landing); }, []); - console.log("is web ? : ", isWeb); - console.log("landing video url is : ", videoUrl); + const handleReturnToLanding = useCallback(() => { navigate(Routes.LandingPage); }, []); diff --git a/src/screens/Playback/Playback.js b/src/screens/Playback/Playback.js index 555a762..b39ff46 100644 --- a/src/screens/Playback/Playback.js +++ b/src/screens/Playback/Playback.js @@ -31,7 +31,7 @@ const Playback = ({ route, navigation }) => { }, [project]); return ( - + navigation.navigate(Routes.Home)} diff --git a/src/screens/Playback/PlaybackGuide.js b/src/screens/Playback/PlaybackGuide.js index 5e90d25..9c953a4 100644 --- a/src/screens/Playback/PlaybackGuide.js +++ b/src/screens/Playback/PlaybackGuide.js @@ -7,13 +7,14 @@ import Page from "../../layouts/Page"; import { Routes } from "../../navigation"; import { gutters, Palette } from "../../styles"; import { FONT_FAMILY } from "../../styles/Fonts"; +import { isWeb } from "../../hooks/useLayoutType"; const PlaybackGuide = ({ navigation }) => { return ( - + navigation.goBack()} /> - + { const stopPlayback = useCallback(async () => { try { if (audioPlayer?.playing) await audioPlayer.pause?.(); - } catch (e) {} + } catch (e) { } try { if (videoPlayer?.playing) videoPlayer.pause(); - } catch (e) {} + } catch (e) { } }, [audioPlayer, videoPlayer]); useEffect(() => { @@ -52,7 +52,7 @@ const RecordedPlayback = ({ route }) => { try { if (audioPlayer && songUrl) await audioPlayer.play?.(); if (videoPlayer) videoPlayer.play(); - } catch (e) {} + } catch (e) { } }; start(); return () => { @@ -78,7 +78,7 @@ const RecordedPlayback = ({ route }) => { videoPlayer.currentTime = Math.max(0, (pos || 0) / 1000); } } - } catch (e) {} + } catch (e) { } }, 250); return () => global.clearInterval(id); }, [audioPlayer, videoPlayer]); @@ -90,7 +90,7 @@ const RecordedPlayback = ({ route }) => { if (audioPlayer && dur > 0) await audioPlayer.seekTo?.(Math.floor(pos / 1000)); if (videoPlayer) videoPlayer.currentTime = Math.max(0, pos / 1000); - } catch (e) {} + } catch (e) { } }; const onSeekStart = useCallback(() => { @@ -100,19 +100,19 @@ const RecordedPlayback = ({ route }) => { const pauseDuringSeek = useCallback(async () => { try { if (audioPlayer?.playing) await audioPlayer.pause?.(); - } catch (e) {} + } catch (e) { } try { if (videoPlayer?.playing) videoPlayer.pause(); - } catch (e) {} + } catch (e) { } }, [audioPlayer, videoPlayer]); const resumeAfterSeek = useCallback(async () => { try { if (audioPlayer) await audioPlayer.play?.(); - } catch (e) {} + } catch (e) { } try { if (videoPlayer) videoPlayer.play(); - } catch (e) {} + } catch (e) { } }, [audioPlayer, videoPlayer]); const sliderProgress = useMemo(() => { @@ -140,7 +140,7 @@ const RecordedPlayback = ({ route }) => { try { const duration = progressInfo?.dur || 0; const position = progressInfo?.pos || 0; - const isAtEnd = duration > 0 && duration - position < 350; + const isAtEnd = duration > 0 && duration - position < 1000; const isCurrentlyPlaying = !!audioPlayer?.playing || !!videoPlayer?.playing; @@ -159,7 +159,7 @@ const RecordedPlayback = ({ route }) => { playbackEndedRef.current = false; if (songUrl && audioPlayer) await audioPlayer.play?.(); if (videoPlayer) videoPlayer.play(); - } catch (e) {} + } catch (e) { } }; return ( @@ -233,7 +233,7 @@ const RecordedPlayback = ({ route }) => { onPress={async () => { try { await stopPlayback(); - } catch (e) {} + } catch (e) { } try { if (videoUri) { const info = await FileSystem.getInfoAsync(videoUri); @@ -242,7 +242,7 @@ const RecordedPlayback = ({ route }) => { idempotent: true, }); } - } catch (e) {} + } catch (e) { } navigate(Routes.RecordPlayback, { project }); }} />