Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luke Young
authored and
Luke Young
committed
Feb 13, 2012
1 parent
eb2a60a
commit 4ba1ec2
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//Require exec from child processes | ||
var exec = require('child_process').exec; | ||
//Require spwan from child processes | ||
var spawn = require('child_process').spawn; | ||
//Require join from path | ||
var join = require('path').join; | ||
|
||
var media = {}; | ||
|
||
media.toggle = function(cb){ | ||
exec(join(__dirname, '..', 'compiled','sbmedia')+" -t", function (error, stdout, stderr) { | ||
//callback | ||
cb(error); | ||
}); | ||
} | ||
|
||
media.prev = function(cb){ | ||
exec(join(__dirname, '..', 'compiled','sbmedia')+" -p", function (error, stdout, stderr) { | ||
//callback | ||
cb(error); | ||
}); | ||
} | ||
|
||
media.next = function(cb){ | ||
exec(join(__dirname, '..', 'compiled','sbmedia')+" -n", function (error, stdout, stderr) { | ||
//callback | ||
cb(error); | ||
}); | ||
} | ||
|
||
module.exports = media; |