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

238
Views
Cómo usar el módulo de reproducción de sonido en node.js

Traté de instalar varios módulos para reproducir audio en node.js. Probé varios módulos, pero ninguno funcionó.

Entre ellos, me gustaría preguntarle si funciona el módulo más popular.

El enlace al módulo está aquí. https://npm.io/package/sound-play

Aquí está el código que falló.

 const express = require("express"),nunjucks = require("nunjucks"),fs = require("fs").promises; const app = express(); const path = require("path"); const sound = require("sound-play"); .... app.get("/play", (req, res) => { fs.readdir("./musicBox") .then((filelist) => { const filePath = path.join(`./musicBox/`, filelist[count]); console.log(filePath); sound.play(filePath); }) .catch((err) => { throw err; }); res.redirect("/"); });

e index.html es

 ... <form action="/play" method="get"> <input type="submit" value="재생"/> </form> ... There's no error message when you click it.

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!