Transforms
Transforms are ways to combine and compose multiple Operations.
note
Currently Transforms are in Alpha and only supported in JavaScript
Getting Started#
First, let's initialize a transform. You'll need a:
An array of input files
A webhook url
All transforms are processed asynchronously
Adding Operations#
Now that we have a transform, we can start adding our desired operations.
We do this by calling transform.add() and supplying a function which takes an array of input files, and returns
a new instance of an operation.
The array of input files contains the output video of the last operation.
Type Reference#
The function has an argument of type AcceptedFiles and expects a return of type OperationClass.
OperationClass here is the parent class of all operations, so any valid operation is accepted
Wrapping things up#
Once you've added all your operations, we can now start executing the transform ๐
When processing is completed you will get a webhook response, check Async Processing to learn how to deal with the webhook