Skip to content

Commit

Permalink
cleanup & plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Interfiber committed Apr 3, 2022
1 parent 039a9ac commit fd9eadd
Show file tree
Hide file tree
Showing 12 changed files with 894 additions and 30 deletions.
23 changes: 23 additions & 0 deletions plugins/rapd-mpris/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var Player = require('mpris-service');
const { exec, execSync } = require('child_process');


var player = Player({
name: 'rapd',
identity: 'Rust Audio Player Daemon MPRIS Client',
supportedUriSchemes: ['file'],
supportedMimeTypes: ['audio/mpeg', 'application/ogg', 'application/mp3'],
supportedInterfaces: ['player']
});

player.on("pause", () => {
execSync("rapc player_pause");
});

player.on("play", () => {
execSync("rapc player_unpause");
});

player.on("stop", () => {
execSync("rapc player_stop");
});
Loading

0 comments on commit fd9eadd

Please sign in to comment.