Programmatic SDK (scrollsequence/sdk)
You can run the asset processing pipeline programmatically within Node.js automation scripts, build tools, or custom browser applications using scrollsequence/sdk.
Installation
npm install scrollsequenceUsage Example
import { AssetPipeline, NodeDriver } from 'scrollsequence/sdk';
const pipeline = new AssetPipeline({
apiKey: process.env.SSQ_API,
driver: new NodeDriver(), // Or BrowserDriver for client-side processing
onProgress: (p) => {
console.log(`[${p.step}] ${p.message} (${Math.round(p.progress * 100)}%)`);
},
});
// Run video-to-scrollsequence transformation
const result = await pipeline.vid2ssq({
input: './source-video.mp4',
name: 'product-reveal',
sizes: [1280, 1920],
depth: true,
outputZip: true,
});
console.log('Generated Manifest:', result.manifest);
console.log('Output Path:', result.outputPath);AssetPipeline Options
| Option | Type | Required | Description |
|---|---|---|---|
apiKey | string | Optional | Scrollsequence Cloud API key for AI features. |
driver | PipelineDriver | Yes | NodeDriver (Node.js/FFmpeg) or BrowserDriver (Wasm FFmpeg). |
onProgress | Function | Optional | Progress callback hook for status reporting. |
Last updated on