Skip to content

Commit

Permalink
feat: fix audio fadeIn time
Browse files Browse the repository at this point in the history
  • Loading branch information
drawcall committed Sep 10, 2021
1 parent 2e6dc55 commit 102b569
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions lib/audio/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ class FFAudio extends FFBase {

toDelayFilter() {
const delay = DateUtil.toMilliseconds(this.start);
this.delay = delay;
return `adelay=${delay}|${delay}`;
}

Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 102b569

Please sign in to comment.