Install and configure
Requirements
Section titled “Requirements”- Node.js
>=24 <25for repository development. - Corepack and the repository-pinned pnpm
10.13.1. - A modern secure-context browser for runtime features.
- Vite 6/7 for the first-party Vite integration, or a host that can deploy ESM Worker/Worklet assets.
Install published packages
Section titled “Install published packages”npm install @aelionsdk/sdk @aelionsdk/exportnpm install --save-dev @aelionsdk/vite-plugin vitelatest currently resolves to 1.2.0. After validation, pin the exact version:
npm install @aelionsdk/sdk@1.2.0 @aelionsdk/export@1.2.0npm install --save-dev @aelionsdk/vite-plugin@1.2.0All @aelionsdk/* packages in one application should use the same release.
Run the repository Quickstart
Section titled “Run the repository Quickstart”git clone https://github.com/FoyonaCZY/AelionSDK.gitcd AelionSDKcorepack pnpm install --frozen-lockfilecorepack pnpm dev:quickstartOpen the printed local URL, choose an MP4 or WebM, and verify first-frame preview, scrub, playback, move/undo, and MP4 export.
The fuller editor example lives in Aelion Studio. Clone it
into apps/editor-demo (gitignored in this repository) and run:
corepack pnpm dev:editorCreate an application in the workspace
Section titled “Create an application in the workspace”Use a normal Vite TypeScript application and add its package to the pnpm workspace. Depend on
workspace packages with the same version policy and do not import package src or dist paths.
Configure Vite
Section titled “Configure Vite”import { aelion } from '@aelionsdk/vite-plugin';import { defineConfig } from 'vite';
export default defineConfig({ plugins: [aelion()],});The plugin emits and wires the Renderer Worker, Export Worker, Player AudioWorklet, and renderer AudioWorklet assets. Production URLs include the deployment base path.
For SharedArrayBuffer-backed audio transport, configure development and production responses:
Cross-Origin-Opener-Policy: same-originCross-Origin-Embedder-Policy: require-corpAll cross-origin media, fonts, scripts, workers, and images must satisfy CORS/CORP when isolation is enabled.
Non-Vite and CDN hosts
Section titled “Non-Vite and CDN hosts”Do not import package internals from a CDN URL. Install or fetch the exact public packages, copy the
four runtime assets to your static deployment, then pass absolute URLs through
AelionSessionOptions.runtimeAssets. The Vite package also exposes:
AelionWebpackPluginfor Webpack 5/Rspack;loadAelionRuntimeAssets()for a custom copy pipeline;aelionRuntimeAssetUrls()for a Next client boundary or pinned CDN layout.
CDN paths must pin the exact SDK version, for example @aelionsdk/sdk/1.2.0/.
TypeScript
Section titled “TypeScript”Use a modern ES target and DOM/WebWorker libraries appropriate to the host. Keep strict enabled.
Do not add broad ambient shims for WebCodecs or workers merely to silence an older TypeScript
configuration; use the repository-supported compiler and public types.
Why cross-origin isolation matters
Section titled “Why cross-origin isolation matters”Isolation enables the preferred shared-memory Worker/AudioWorklet transport. Without it, supported browsers use a bounded transferable fallback with different performance. Capability reports expose the active mode; the application should not test browser names.
Verify a production build
Section titled “Verify a production build”Build and serve the final output over HTTP(S), not file://. Confirm:
- all Worker/Worklet assets return 200 with correct MIME;
- base paths work from nested routes;
- CSP allows only the required worker, connect, media, image, and font origins;
crossOriginIsolatedmatches the intended header policy;- a real file probes, previews, plays, seeks, and exports;
- project switch/disposal returns resources to budget.
Lock the exact version
Section titled “Lock the exact version”Commit the lockfile and use frozen installs in CI. Read CHANGELOG.md and the migration guide
before changing versions.
Verify release identity
Section titled “Verify release identity”npm view @aelionsdk/sdk@1.2.0 \ version dist.integrity dist.attestations --jsonnpm view @aelionsdk/sdk dist-tags --jsonCross-check the Git tag v1.2.0,
the release workflow, and the
GitHub release.
Continue with From a local video to MP4.