Created
May 29, 2019 11:19
-
-
Save nondanee/65afb137f6923052768afeda68d156b1 to your computer and use it in GitHub Desktop.
Remote control test with mpg123 for Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const net = require('net') | |
const spawn = require('child_process').spawn | |
const mpg123 = spawn('mpg123.exe', ['-R', '--fifo', '\\\\.\\pipe\\mpg123'], {shell: true}) | |
const remote = net.connect('\\\\.\\pipe\\mpg123') | |
remote.write('LOAD test.mp3\n') |
f = open(r'\\.\pipe\mpg123', 'w+b', 0)
f.write('LOAD test.mp3\n')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
reference