How to access your systems media player when coding a VSCode extension, through a nodejs backend

I am using the library play-sound. I have tried 2 different statements, which yield different results, neither successful. When I use

const player = require('play-sound')({player: "mplayer"}) The extension works with no error codes, but no audio is played.

const player = require('play-sound')() The extension still runs, but I get the error code

Could not play sound: Error: Couldn't find a suitable audio player. Likewise, no sound is produced.

How can I access my systems audio while coding a vscode extension?

PS: Here is the code I run to play the audio'noise.mp3', (err) => {
            if (err) console.log(`Could not play sound: ${err}`);

Read more here:

Content Attribution

This content was originally published by Christopher Rupert at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: