简体   繁体   中英

How can I change my system audio output / input device through Node JS (or command line)

I'm attempting to build a little dashboard for my computer in Electron and something that would be really useful for me is having the ability to change my audio output at the click of a button (on the electron app). Is there any way this is possible through the Node API or a command through Command Prompt/PowerShell? I'm open to any options that would allow this outside of Node/Electron/CMD as well

This link might have what you are looking for (CMD example). To execute cmd/bash you can use child_process / node-cmd / shelljs packages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM