more fixes and changes, crash, design …
This commit is contained in:
@@ -24,6 +24,8 @@ import { goBack, navigate } from "../../navigation/NavigationService";
|
||||
import { gutters, Palette } from "../../styles";
|
||||
import { FONT_FAMILY } from "../../styles/Fonts";
|
||||
import CreateLyricsHeader from "../Writing/components/CreateLyricsHeader";
|
||||
import { background } from "../../assets";
|
||||
import playbackBG2 from "../../assets/UI/playbackBG2.png";
|
||||
|
||||
const TIME_BEFORE_INCREMENT_MS = 20000;
|
||||
const LOG_PREFIX = "[RecordPlayback.web]";
|
||||
@@ -169,7 +171,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"mediaRecorder:stopPrevious:error",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -187,7 +189,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"mediaRecorder:createError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
setMediaError(e instanceof Error ? e : new Error(String(e || "")));
|
||||
return false;
|
||||
@@ -209,7 +211,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"mediaRecorder:error",
|
||||
String(err?.message || err || "")
|
||||
String(err?.message || err || ""),
|
||||
);
|
||||
setMediaError(err instanceof Error ? err : new Error(String(err || "")));
|
||||
};
|
||||
@@ -230,7 +232,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"mediaRecorder:onstop:createBlobError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
releaseRecordingUrl();
|
||||
}
|
||||
@@ -253,7 +255,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"mediaRecorder:startError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
if (stopRecordingResolveRef.current) {
|
||||
stopRecordingResolveRef.current(null);
|
||||
@@ -283,7 +285,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"mediaRecorder:stopError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -298,7 +300,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"mediaRecorder:waitStopError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
} finally {
|
||||
stopRecordingPromiseRef.current = null;
|
||||
@@ -320,7 +322,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"resetSession:error",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
try {
|
||||
@@ -330,7 +332,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"resetSession:recorderError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
console.log(LOG_PREFIX, "resetSession:end");
|
||||
@@ -360,7 +362,7 @@ const RecordPlayback = ({ route }) => {
|
||||
setLooping(!!originalLoopingValueRef.current.value);
|
||||
}
|
||||
};
|
||||
}, [setLooping])
|
||||
}, [setLooping]),
|
||||
);
|
||||
|
||||
useFocusEffect(
|
||||
@@ -370,7 +372,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(LOG_PREFIX, "focusEffect:cleanup");
|
||||
void resetSessionRef.current?.();
|
||||
};
|
||||
}, [])
|
||||
}, []),
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -385,7 +387,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"requestingCameraPermission:error",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
})();
|
||||
@@ -410,7 +412,7 @@ const RecordPlayback = ({ route }) => {
|
||||
!navigator.mediaDevices?.getUserMedia
|
||||
) {
|
||||
setMediaError(
|
||||
new Error("La capture vidéo n'est pas supportée sur ce navigateur")
|
||||
new Error("La capture vidéo n'est pas supportée sur ce navigateur"),
|
||||
);
|
||||
setMediaReady(false);
|
||||
return;
|
||||
@@ -460,7 +462,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"previewVideo:attachError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
@@ -502,7 +504,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"stopAndNavigate:pauseError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -516,7 +518,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"stopAndNavigate:recorderError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -562,7 +564,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"progressLoop:correctInitialJumpError",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -644,7 +646,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"listenLoop:incrementViews:error",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -654,7 +656,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"listenLoop:error",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
}
|
||||
}, 500);
|
||||
@@ -683,7 +685,7 @@ const RecordPlayback = ({ route }) => {
|
||||
console.log(
|
||||
LOG_PREFIX,
|
||||
"startPlayback:error",
|
||||
String(e?.message || e || "")
|
||||
String(e?.message || e || ""),
|
||||
);
|
||||
setIsRecording(false);
|
||||
setIsPreparing(false);
|
||||
@@ -702,7 +704,7 @@ const RecordPlayback = ({ route }) => {
|
||||
},
|
||||
},
|
||||
],
|
||||
{ cancelable: false }
|
||||
{ cancelable: false },
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -743,6 +745,7 @@ const RecordPlayback = ({ route }) => {
|
||||
maxWidth={800}
|
||||
containerStyle={{ margin: 0, padding: 0, backgroundColor: Palette.black }}
|
||||
headerType="NONE"
|
||||
backgroundImg={background.playbackBG2}
|
||||
>
|
||||
<MusicLandHeader progress={9} onPressBack={goBack} />
|
||||
|
||||
@@ -767,7 +770,7 @@ const RecordPlayback = ({ route }) => {
|
||||
height: "100%",
|
||||
objectFit: "cover",
|
||||
transform: "scaleX(-1)",
|
||||
backgroundColor: "#000000",
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -793,7 +796,7 @@ const RecordPlayback = ({ route }) => {
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
backgroundColor: "#00000099",
|
||||
backgroundColor: "transparent",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
paddingHorizontal: gutters,
|
||||
@@ -820,7 +823,7 @@ const RecordPlayback = ({ route }) => {
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
backgroundColor: "#00000066",
|
||||
backgroundColor: "transparent",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user