plugin v1.0.1

This commit is contained in:
JotaChina committed 2025-11-23 16:51:16 -03:00
1 parent 9b0acaea61
commit fafe88b28a
4 files changed
+50 -7

No files matched your search

+12 -1
View File
@@ -371,7 +371,18 @@ export function updateClipPan(clipId, pan) {
export function addAudioTrackLane() {
const newTrackName = `Pista de Áudio ${audioState.tracks.length + 1}`;
audioState.tracks.push({ id: Date.now(), name: newTrackName });
// 1. Cria o objeto da pista
const newTrack = { id: Date.now(), name: newTrackName };
// 2. Adiciona ao estado
audioState.tracks.push(newTrack);
// 3. ATUALIZAÇÃO CRÍTICA: Renderiza a UI imediatamente para a pista aparecer
renderAudioEditor();
// 4. ATUALIZAÇÃO CRÍTICA: Retorna a pista para que o recording.js possa usar o ID
return newTrack;
}
export function removeAudioClip(clipId) {