video-compressor
Version:
This package is used to reduce the size of the videos in your project. After including this package to the project, you must provide the input and output file paths as parameter of compress method. Later, when you upload video to the path you specified as
18 lines (15 loc) • 454 B
JavaScript
const fs = require('fs');
function videoCompress (input,output) {
const jsonString = JSON.stringify({
"input": input,
"output": output
})
fs.writeFile('./node_modules/video-compressor/src/res/paths.json', jsonString, err => {
if (err) {
console.log('Error writing file', err)
} else {
const start = require('./app');
}
})
}
module.exports = videoCompress