Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
Como grabar audio y video a través de plataforma con electron

Así que estaba haciendo un proyecto de electrones que graba su pantalla y su escritorio o el audio de la aplicación seleccionada con desktopCapture. Obtuve el registro de pantalla, y en un momento incluso hice que el micrófono funcionara, pero en ningún momento, sin importar lo que intentara, no pude grabar el audio del escritorio ni el audio de ninguna aplicación. Después de algunas investigaciones, descubrí que no puede grabar ningún escritorio ni el audio de la aplicación con Chrome en Linux.

Entonces, ¿cuál podría ser la solución o alguna otra forma de intentar grabar audio de escritorio? Tal vez haya alguna forma de grabar audio de escritorio con una biblioteca diferente y luego combinar el video con el audio de alguna manera.

Cualquier sugerencia sera apreciada.

Código para la propia grabadora de pantalla:

 videoSelectBtn.onclick = getVideoSources; async function getVideoSources() { const inputSources = await desktopCapturer.getSources({ types: ["window", "screen", "audio"], }); inputSources.forEach((source) => { if (source.name === "Screen 1") { selectSource(source); } else { console.log(source); } }); } async function selectSource(source) { videoSelectBtn.innerText = source.name; const constraints = { audio: { mandatory: { chromeMediaSource: "desktop", }, }, video: { mandatory: { chromeMediaSource: "desktop", }, }, }; const stream = await navigator.mediaDevices.getUserMedia(constraints); videoElement.srcObject = stream; videoElement.play(); const options = { mimeType: "video/webm; codecs=vp9", }; mediaRecorder = new MediaRecorder(stream, options); mediaRecorder.ondataavailable = handleDataAvailable; mediaRecorder.onstop = handleStop; } function handleDataAvailable(e) { console.log("video data available"); recordedChunks.push(e.data); } async function handleStop(e) { const blob = new Blob(recordedChunks, { type: "video/webm; codecs=vp9", }); const buffer = Buffer.from(await blob.arrayBuffer()); const { filePath } = await dialog.showSaveDialog({ buttonLabel: "Save video", defaultPath: `vid-${Date.now()}.webm`, }); if (filePath) { writeFile(filePath, buffer, () => console.log("video saved successfully!")); } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!