From 102b56966a851c760aa4deee968b63f2f60c6677 Mon Sep 17 00:00:00 2001 From: drawcall Date: Fri, 10 Sep 2021 11:09:45 +0800 Subject: [PATCH] feat: fix audio fadeIn time --- lib/audio/audio.js | 5 ++--- package.json | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/audio/audio.js b/lib/audio/audio.js index 59120e88..bc28a874 100755 --- a/lib/audio/audio.js +++ b/lib/audio/audio.js @@ -98,7 +98,6 @@ class FFAudio extends FFBase { toDelayFilter() { const delay = DateUtil.toMilliseconds(this.start); - this.delay = delay; return `adelay=${delay}|${delay}`; } @@ -109,9 +108,9 @@ class FFAudio extends FFBase { } toFadeInFilter() { - const { fadeIn = -1, delay } = this; + const { fadeIn = -1, start = 0 } = this; if (fadeIn === -1) return ''; - return `,afade=t=in:st=${delay}:d=${fadeIn}`; + return `,afade=t=in:st=${start}:d=${fadeIn}`; } toFadeOutFilter(duration) { diff --git a/package.json b/package.json index 68649db6..600ab57a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffcreator", - "version": "5.2.6", + "version": "5.2.7", "description": "FFCreator is a lightweight and flexible short video production library", "main": "lib/index.js", "types": "types/index.d.ts",