Skip to content

Instantly share code, notes, and snippets.

@nondanee
Created May 29, 2019 11:19
Show Gist options
  • Save nondanee/65afb137f6923052768afeda68d156b1 to your computer and use it in GitHub Desktop.
Save nondanee/65afb137f6923052768afeda68d156b1 to your computer and use it in GitHub Desktop.
Remote control test with mpg123 for Windows
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')
@nondanee
Copy link
Author

nondanee commented Jun 9, 2019

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