import BlendDuck, { Clip, Text, AudioPlay } from "@blendduck/node-sdk";
const clip = new Clip(5); // Create a 5-second clip
clip.transition = 'fade';
// Add a text element to the clip
const textElement = new Text();
textElement.text = "Hello, BlendDuck!";
clip.addElement(textElement);
// Add an audio track to the clip
const audio = new AudioPlay({ url: "https://s.blendduck.com/audios/motivation.mp3" });
clip.addAudioPlay(audio);
// Set a custom background for this clip
clip.background = {
color: {
type: "color",
color: "#00ff33ff"
}
};