diff options
| author | Zephyrrus <[email protected]> | 2020-07-08 04:00:12 +0300 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2020-07-08 04:00:12 +0300 |
| commit | ad852de51a0d2dd5d29c08838d5a430c58849e74 (patch) | |
| tree | a4ab9a720f66271c9eba10916061a9b06c43656e /src/api/utils/videoPreview/FragmentPreview.js | |
| parent | refactor: refactor grid to use vuex for every action (diff) | |
| download | host.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.tar.xz host.fuwn.me-ad852de51a0d2dd5d29c08838d5a430c58849e74.zip | |
chore: linter the entire project using the new rules
Diffstat (limited to 'src/api/utils/videoPreview/FragmentPreview.js')
| -rw-r--r-- | src/api/utils/videoPreview/FragmentPreview.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/api/utils/videoPreview/FragmentPreview.js b/src/api/utils/videoPreview/FragmentPreview.js index 8815392..bf623c1 100644 --- a/src/api/utils/videoPreview/FragmentPreview.js +++ b/src/api/utils/videoPreview/FragmentPreview.js @@ -1,3 +1,4 @@ +/* eslint-disable no-bitwise */ const ffmpeg = require('fluent-ffmpeg'); const probe = require('ffmpeg-probe'); @@ -24,7 +25,7 @@ const getStartTime = (vDuration, fDuration, ignoreBeforePercent, ignoreAfterPerc return getRandomInt(ignoreBeforePercent * safeVDuration, ignoreAfterPercent * safeVDuration); }; -module.exports = async opts => { +module.exports = async (opts) => { const { log = noop, @@ -37,7 +38,7 @@ module.exports = async opts => { fragmentDurationSecond = 3, ignoreBeforePercent = 0.25, - ignoreAfterPercent = 0.75 + ignoreAfterPercent = 0.75, } = opts; const info = await probe(input); @@ -77,7 +78,7 @@ module.exports = async opts => { .outputOptions([`-t ${fragmentDurationSecond}`]) .noAudio() .output(output) - .on('start', cmd => log && log({ cmd })) + .on('start', (cmd) => log && log({ cmd })) .on('end', resolve) .on('error', reject) .run(); |