-
Notifications
You must be signed in to change notification settings - Fork 1
/
extension.js
30 lines (26 loc) · 913 Bytes
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var pjson = require('./package.json'),
debug = require('debug')('openframe:vlc'),
Extension = require('openframe-extension')
/**
*
* Extension initialization method.
*
* Called when the extension (and its dependencies) have been installed.
*
* @param {object} OF An interface provided to extensions giving limited access to the frame environment
*/
module.exports = new Extension({
format: {
// the name should be the same as the package name
'name': pjson.name,
// this is what might get displayed to users
'display_name': 'VLC',
'download': false,
'start_command': function(options, tokens) {
let command = 'cvlc --loop --no-video-title --quiet ' + tokens['$url']
// let command = __dirname + '/startVLC.sh ' + tokens['$url']; //
return command
},
'end_command': 'pkill -f vlc'
}
})