offset audio after playback and add songs
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 { clampSyncOffsetMs } from '../../utils/playbackSync'
|
||||
import trimLeadingDuplicateSection from '../../utils/trimLeadingDuplicateSection'
|
||||
|
||||
const TIME_BEFORE_INCREMENT_MS = 20000
|
||||
@@ -29,7 +30,6 @@ const MEDIA_BOOTSTRAP_DELAY_MS = 250
|
||||
const MEDIA_RETRY_DELAY_MS = 700
|
||||
const MEDIA_MAX_RETRIES = 2
|
||||
const CAMERA_STARTUP_DELAY_MS = 250
|
||||
const MAX_SYNC_OFFSET_MS = 2000
|
||||
const KARAOKE_LEAD_S = 0.18
|
||||
|
||||
const toSeconds = (v) => {
|
||||
@@ -547,7 +547,7 @@ const RecordPlayback = ({ route }) => {
|
||||
playbackStartedAtRef.current != null && recordingStartAtRef.current != null
|
||||
? playbackStartedAtRef.current - recordingStartAtRef.current
|
||||
: 0
|
||||
const syncOffsetMs = Math.max(0, Math.min(MAX_SYNC_OFFSET_MS, Math.round(rawOffsetMs || 0)))
|
||||
const syncOffsetMs = clampSyncOffsetMs(Math.round(rawOffsetMs || 0))
|
||||
|
||||
navigate(Routes.RecordedPlayback, {
|
||||
project,
|
||||
|
||||
Reference in New Issue
Block a user