Added a comment

This commit is contained in:
loicbersier 2020-07-16 09:22:54 +02:00
parent c754195abb
commit ed805a9a0f
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,6 @@
const hbjs = require('handbrake-js'); const hbjs = require('handbrake-js');
const events = require('events'); const events = require('events');
// Compress submitted video
module.exports = function(input, output) { module.exports = function(input, output) {
let eventEmitter = new events.EventEmitter(); let eventEmitter = new events.EventEmitter();

View file

@ -1,7 +1,7 @@
const fs = require('fs'); const fs = require('fs');
const events = require('events'); const events = require('events');
const youtubedl = require('youtube-dl'); const youtubedl = require('youtube-dl');
// Download submitted video
module.exports = function (url, option, output) { module.exports = function (url, option, output) {
let eventEmitter = new events.EventEmitter(); let eventEmitter = new events.EventEmitter();
@ -23,6 +23,7 @@ module.exports = function (url, option, output) {
video.on('end', function() { video.on('end', function() {
eventEmitter.emit('end', output); eventEmitter.emit('end', output);
}); });
return eventEmitter; return eventEmitter;
}; };