enregistrer
This commit is contained in:
@@ -20,15 +20,14 @@ const Playback = ({ route }) => {
|
|||||||
|
|
||||||
const onPressRecord = useCallback(async () => {
|
const onPressRecord = useCallback(async () => {
|
||||||
try {
|
try {
|
||||||
// If we lack required fields, skip generation but continue UX
|
|
||||||
if (!projectId || songIndex === undefined || !sunoTaskId) {
|
if (!projectId || songIndex === undefined || !sunoTaskId) {
|
||||||
console.log("Missing data for timestamp generation", {
|
return;
|
||||||
projectId,
|
|
||||||
songIndex,
|
|
||||||
sunoTaskId,
|
|
||||||
});
|
|
||||||
// return navigate(Routes.RecordPlayback, { project });
|
// return navigate(Routes.RecordPlayback, { project });
|
||||||
}
|
}
|
||||||
|
if (project.musicTimeStamps.songIndex) {
|
||||||
|
console.log("exists");
|
||||||
|
return navigate(Routes.RecordPlayback, { project });
|
||||||
|
}
|
||||||
|
|
||||||
await setIsLoading(true);
|
await setIsLoading(true);
|
||||||
const callable = firebase
|
const callable = firebase
|
||||||
@@ -59,7 +58,6 @@ const Playback = ({ route }) => {
|
|||||||
}
|
}
|
||||||
}, [projectId, songIndex, sunoTaskId, project]);
|
}, [projectId, songIndex, sunoTaskId, project]);
|
||||||
|
|
||||||
console.log("Playback render", { projectId, songIndex, sunoTaskId });
|
|
||||||
return (
|
return (
|
||||||
<Page headerType="NONE" backgroundImg={background.playbackBG2}>
|
<Page headerType="NONE" backgroundImg={background.playbackBG2}>
|
||||||
<Image source={ai.john} style={styles.img} resizeMode="contain" />
|
<Image source={ai.john} style={styles.img} resizeMode="contain" />
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useFocusEffect } from "@react-navigation/native";
|
|||||||
import { useAudioPlayer } from "expo-audio";
|
import { useAudioPlayer } from "expo-audio";
|
||||||
import { CameraView, useCameraPermissions } from "expo-camera";
|
import { CameraView, useCameraPermissions } from "expo-camera";
|
||||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||||
import { Text, View } from "react-native";
|
import { Platform, Text, View } from "react-native";
|
||||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
import Svg, { Circle } from "react-native-svg";
|
import Svg, { Circle } from "react-native-svg";
|
||||||
import GradientButton from "../../components/GradientButton";
|
import GradientButton from "../../components/GradientButton";
|
||||||
@@ -298,7 +298,10 @@ const RecordPlayback = ({ route }) => {
|
|||||||
<MusicLandHeader progress={9} onPressBack={goBack} />
|
<MusicLandHeader progress={9} onPressBack={goBack} />
|
||||||
|
|
||||||
<View style={{ flex: 1, marginTop: 11 }}>
|
<View style={{ flex: 1, marginTop: 11 }}>
|
||||||
<CreateLyricsHeader>
|
<CreateLyricsHeader
|
||||||
|
disableBlur={Platform.OS !== "ios"}
|
||||||
|
containerStyle={{ backgroundColor: Palette.ultraLightBlack }}
|
||||||
|
>
|
||||||
<Text
|
<Text
|
||||||
style={{
|
style={{
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ const CreateLyricsHeader = ({
|
|||||||
onPress,
|
onPress,
|
||||||
blurViewStyle = {},
|
blurViewStyle = {},
|
||||||
showBorder = true,
|
showBorder = true,
|
||||||
|
disableBlur = false,
|
||||||
}) => {
|
}) => {
|
||||||
const [onLayout, setOnLayout] = useState(null);
|
const [onLayout, setOnLayout] = useState(null);
|
||||||
const { isWeb } = useLayoutType();
|
const { isWeb } = useLayoutType();
|
||||||
@@ -56,43 +57,78 @@ const CreateLyricsHeader = ({
|
|||||||
setOnLayout(event.nativeEvent.layout);
|
setOnLayout(event.nativeEvent.layout);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<BlurView
|
{disableBlur ? (
|
||||||
intensity={intensity}
|
<View
|
||||||
tint={tint}
|
style={{
|
||||||
style={{
|
paddingHorizontal: 12,
|
||||||
paddingHorizontal: 12,
|
paddingVertical: 8,
|
||||||
paddingVertical: 8,
|
gap: 4,
|
||||||
gap: 4,
|
...blurViewStyle,
|
||||||
...blurViewStyle,
|
}}
|
||||||
}}
|
>
|
||||||
experimentalBlurMethod={
|
{title && (
|
||||||
Platform.OS !== "ios" ? "dimezisBlurView" : "none"
|
<Text
|
||||||
}
|
style={{
|
||||||
>
|
fontSize: 22,
|
||||||
{title && (
|
color: Palette.white,
|
||||||
<Text
|
fontFamily: FONT_FAMILY.InterSemiBold,
|
||||||
style={{
|
}}
|
||||||
fontSize: 22,
|
>
|
||||||
color: Palette.white,
|
{title}
|
||||||
fontFamily: FONT_FAMILY.InterSemiBold,
|
</Text>
|
||||||
}}
|
)}
|
||||||
>
|
{subTitle && (
|
||||||
{title}
|
<Text
|
||||||
</Text>
|
style={{
|
||||||
)}
|
fontSize: 12,
|
||||||
{subTitle && (
|
color: Palette.white,
|
||||||
<Text
|
fontFamily: FONT_FAMILY.InterRegular,
|
||||||
style={{
|
}}
|
||||||
fontSize: 12,
|
>
|
||||||
color: Palette.white,
|
{subTitle}
|
||||||
fontFamily: FONT_FAMILY.InterRegular,
|
</Text>
|
||||||
}}
|
)}
|
||||||
>
|
{children}
|
||||||
{subTitle}
|
</View>
|
||||||
</Text>
|
) : (
|
||||||
)}
|
<BlurView
|
||||||
{children}
|
intensity={intensity}
|
||||||
</BlurView>
|
tint={tint}
|
||||||
|
style={{
|
||||||
|
paddingHorizontal: 12,
|
||||||
|
paddingVertical: 8,
|
||||||
|
gap: 4,
|
||||||
|
...blurViewStyle,
|
||||||
|
}}
|
||||||
|
experimentalBlurMethod={
|
||||||
|
Platform.OS !== "ios" ? "dimezisBlurView" : "none"
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{title && (
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 22,
|
||||||
|
color: Palette.white,
|
||||||
|
fontFamily: FONT_FAMILY.InterSemiBold,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
{subTitle && (
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 12,
|
||||||
|
color: Palette.white,
|
||||||
|
fontFamily: FONT_FAMILY.InterRegular,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{subTitle}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
{children}
|
||||||
|
</BlurView>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user