Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid filter "fadein" / "fadeout" #141

Open
wernerdweight opened this issue Feb 16, 2023 · 0 comments
Open

Invalid filter "fadein" / "fadeout" #141

wernerdweight opened this issue Feb 16, 2023 · 0 comments

Comments

@wernerdweight
Copy link

Hi there,

The docs list fadein and fadeout as supported filters (here), but if I try to use it, there's a validation error saying:

TypeError: Validation Errors:
  filter: { name } attribute in addFilter must be of type brightness, contrast, grayscale, lighten, negative, saturation. Got: "fadein"

I'm not sure if this is an error with the docs or with the library, or just a missing feature.

Code to reproduce:

import { Editframe } from "@editframe/editframe-js"
import * as fs from 'fs'

const videoFile = fs.createReadStream('[some video file here]')

const composition = await editframe.videos.new(
  {
    backgroundColor: "#c400ac",
    dimensions: {
      height: 1080,
      width: 1920,
    },
    duration: 10,
    metadata: {
      user_id: 1,
      anything: 'test'
    }
  }
)

await composition.addVideo(videoFile)

await composition.addFilter({ name: 'fadein', options: { color: '#55aaff', duration: 1, startTime: 0 } })
await composition.addFilter({ name: 'fadeout', options: { color: '#55aaff', duration: 1, startTime: 9 } })

await composition.encode()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant