@vnve/template
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Install

npm install @vnve/core @vnve/template

Usage

import { Creator } from "@vnve/core";
import { TitleScene, DialogueScene } from "@vnve/template";

const creator = new Creator();
// Create a title scene
const titleScene = new TitleScene({
  title: "V N V E",
  subtitle: "Make video programmatically",
  backgroundImgSource: "img url",
  soundSources: [{ source: "sound url" }],
  duration: 3000,
})

// Create a dialog scene
const dialogueScene = new DialogueScene({
  lines: [
    {
      name: "Character A",
      content: "Charater A says..."
    },
    {
      name: "Character B",
      content: "Charater B says..."
    }
  ],
  backgroundImgSource: "img url",
  soundSources: [{ source: "sound url" }],
});

// Add scenes
creator.add(titleScene)
creator.add(dialogueScene)

// Start creating videos
creator.start().then(videoBlob => {
  URL.createObjectURL(videoBlob)  // Wait a few moments and you'll get an mp4 file
})

Open in CodeSandbox

Package Sidebar

Install

npm i @vnve/template

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

33.9 kB

Total Files

7

Last publish

Collaborators

  • foreversc