Skip to content

Commit 45eca5e

Browse files
committed
bug fix
1 parent ef4b508 commit 45eca5e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/handler.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ module.exports = function(req, res) {
1717
return res.success({cmd, file, url, total});
1818
}
1919

20+
const blurV = command[1] || 10;
21+
2022
if(url) {
2123
res.contentType('mp4');
2224
// const filename = Math.random().toString(36).substr(2) + '.mp4';
@@ -26,7 +28,7 @@ module.exports = function(req, res) {
2628
// console.log(info);
2729
// console.log('progress ' + info + '%');
2830
// })
29-
.videoFilters('boxblur=180:1:cr=0:ar=0')
31+
.videoFilters('boxblur=1:'+ blurV +':cr=0:ar=0')
3032
.on('end', function() {
3133
const stat = fs.statSync(filepath);
3234
const total = stat.size;
@@ -47,7 +49,7 @@ module.exports = function(req, res) {
4749
// console.log(info);
4850
// console.log('progress ' + info + '%');
4951
// })
50-
.videoFilters('boxblur=180:1:cr=0:ar=0')
52+
.videoFilters('boxblur=1:'+ blurV +':cr=0:ar=0')
5153
.on('end', function() {
5254
// console.log(filepath);
5355
const stat = fs.statSync(filepath);

0 commit comments

Comments
 (0)