feat: fix timestamps
This commit is contained in:
@@ -20,6 +20,7 @@ import CreateLyricsHeader from '../Writing/components/CreateLyricsHeader'
|
||||
import { background } from '../../assets'
|
||||
import RestartSpinnerIcon from '../../assets/UI/RestartSpinnerIcon'
|
||||
import { registerBlobUrl, releaseBlobUrl } from '../../utils/blobUrlCache'
|
||||
import trimLeadingDuplicateSection from '../../utils/trimLeadingDuplicateSection'
|
||||
|
||||
const TIME_BEFORE_INCREMENT_MS = 20000
|
||||
const COUNTDOWN_SECONDS = __DEV__ ? 1 : 10
|
||||
@@ -123,8 +124,9 @@ const RecordPlayback = ({ route }) => {
|
||||
// Lyrics
|
||||
const alignedWords = useMemo(() => {
|
||||
const ts = project?.musicTimestamps?.[songIndex]
|
||||
const arr = Array.isArray(ts?.alignedWords) ? ts.alignedWords : []
|
||||
return arr.map((w) => ({
|
||||
const rawAlignedWords = Array.isArray(ts?.alignedWords) ? ts.alignedWords : []
|
||||
const trimmedAlignedWords = trimLeadingDuplicateSection(rawAlignedWords)
|
||||
return trimmedAlignedWords.map((w) => ({
|
||||
word: String(w?.word ?? ''),
|
||||
startS: Number(w?.startS ?? 0),
|
||||
endS: Number(w?.endS ?? 0),
|
||||
|
||||
Reference in New Issue
Block a user