renderizando projetos no mmpCreator utilizando o lmms
Deploy / Deploy (push) Successful in 2m8s
Details
Deploy / Deploy (push) Successful in 2m8s
Details
This commit is contained in:
parent
1ee2b43285
commit
897a5b54b5
|
|
@ -5,7 +5,7 @@ import {
|
||||||
restartAudioEditorIfPlaying,
|
restartAudioEditorIfPlaying,
|
||||||
} from "./audio/audio_audio.js";
|
} from "./audio/audio_audio.js";
|
||||||
import { initializeAudioContext } from "./audio.js";
|
import { initializeAudioContext } from "./audio.js";
|
||||||
import { handleFileLoad, generateMmpFile } from "./file.js";
|
import { handleFileLoad, generateMmpFile, generateXmlFromStateExported } from "./file.js";
|
||||||
import {
|
import {
|
||||||
renderAll,
|
renderAll,
|
||||||
loadAndRenderSampleBrowser,
|
loadAndRenderSampleBrowser,
|
||||||
|
|
@ -27,6 +27,20 @@ window.ROOM_NAME = ROOM_NAME;
|
||||||
|
|
||||||
const PROJECT_NAME = new URLSearchParams(window.location.search).get("project");
|
const PROJECT_NAME = new URLSearchParams(window.location.search).get("project");
|
||||||
|
|
||||||
|
const body = {
|
||||||
|
roomName: ROOM_NAME || null,
|
||||||
|
format,
|
||||||
|
name:
|
||||||
|
appState.global?.currentBeatBasslineName ||
|
||||||
|
appState.global?.projectName ||
|
||||||
|
"projeto",
|
||||||
|
};
|
||||||
|
|
||||||
|
// ✅ Modo local: manda o XML direto
|
||||||
|
if (!ROOM_NAME) {
|
||||||
|
body.xml = generateXmlFromStateExported();
|
||||||
|
}
|
||||||
|
|
||||||
// --- LÓGICA DE INICIALIZAÇÃO ---
|
// --- LÓGICA DE INICIALIZAÇÃO ---
|
||||||
|
|
||||||
// Função autoinvocada assíncrona para gerenciar o carregamento inicial
|
// Função autoinvocada assíncrona para gerenciar o carregamento inicial
|
||||||
|
|
|
||||||
|
|
@ -721,7 +721,10 @@ app.post("/render", async (req, res) => {
|
||||||
|
|
||||||
// prioridade: sala -> pega do estado autoritativo
|
// prioridade: sala -> pega do estado autoritativo
|
||||||
let projectXml = null;
|
let projectXml = null;
|
||||||
if (roomName) {
|
|
||||||
|
if (xml && String(xml).trim().length > 0) {
|
||||||
|
projectXml = xml;
|
||||||
|
} else if (roomName) {
|
||||||
if (renderLocks.get(roomName)) {
|
if (renderLocks.get(roomName)) {
|
||||||
return res.status(429).json({ ok: false, error: "render_in_progress" });
|
return res.status(429).json({ ok: false, error: "render_in_progress" });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue