Skip to content

Remote control

Rafostar edited this page Apr 2, 2020 · 2 revisions

Extension also supports using API for remote controls of playback.

Launching below example in node.js should result in pausing currently playing media.

const http = require('http');
const postData = { action: 'PAUSE' };

const options = {
  host: '127.0.0.1',
  port: 4000,
  path: '/api/remote',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  }
};

var req = http.request(options);
req.write(JSON.stringify(postData));
req.end();
Clone this wiki locally