You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Forneça a URL corretamente como uma string
obs.connect("ws://localhost:4455", "JWycd0W8eqxyOyYx")
.then(() => {
console.log("Conectado ao OBS Studio via WebSocket (sem autenticação)");
const sourceName = "NomeDoSeuSource";
const videoFilePath = "caminho/para/video.mp4";
const sourceSettings = {
file: videoFilePath,
};
obs.send("SetSourceSettings", {
sourceName: sourceName,
sourceSettings: sourceSettings,
}).then(() => {
console.log(`Arquivo de vídeo ${videoFilePath} configurado com sucesso para o source ${sourceName}`);
}).catch((error) => {
console.error(`Erro ao configurar o arquivo de vídeo para o source ${sourceName}:`, error);
});
})
.catch((error) => {
console.error("Erro ao conectar ao OBS Studio:", error);
});
error TypeError: obs.send is not a function
The text was updated successfully, but these errors were encountered:
How to send an .mp4 file to the source, obs.send no longer works, it gives me an error, below is my code.
const { default: OBSWebSocket } = require('obs-websocket-js');
const obs = new OBSWebSocket();
// Forneça a URL corretamente como uma string
obs.connect("ws://localhost:4455", "JWycd0W8eqxyOyYx")
.then(() => {
console.log("Conectado ao OBS Studio via WebSocket (sem autenticação)");
})
.catch((error) => {
console.error("Erro ao conectar ao OBS Studio:", error);
});
error TypeError: obs.send is not a function
The text was updated successfully, but these errors were encountered: