playlist importando sample track
This commit is contained in:
1 parent
14eb463f2d
commit
7bfbffd700
2 files changed
+13
-4
No files matched your search
@@ -145,9 +145,18 @@ export async function loadAudioForClip(clip) {
|
||||
}
|
||||
|
||||
try {
|
||||
const safeUrl = encodeURI(clip.sourcePath).replace(/#/g, "%23");
|
||||
// ✅ NÃO use encodeURI/encodeURIComponent aqui
|
||||
let safeUrl = String(clip.sourcePath);
|
||||
|
||||
// se chegou double-encoded, normaliza (caso %2523 apareça)
|
||||
safeUrl = safeUrl.replace(/%2523/gi, "%23");
|
||||
|
||||
// se chegou com # cru, escapa
|
||||
safeUrl = safeUrl.replace(/#/g, "%23");
|
||||
|
||||
const response = await fetch(safeUrl);
|
||||
|
||||
|
||||
if (!response.ok)
|
||||
throw new Error(`Falha ao buscar áudio: ${clip.sourcePath}`);
|
||||
|
||||
|
||||
Reference in new issue
Block a user