swf-emitter

0.14.0 • Public • Published
Open Flash logo

SWF Emitter (Typescript)

npm GitHub repository Build status

SWF emitter implemented in Typescript, for Node and browsers. Converts swf-types movies to bytes.

Usage

import fs from "fs";
import { CompressionMethod } from "swf-types";
import { Movie } from "swf-types/movie";
import { emitSwf } from "swf-emitter";

function main(): void {
  const movie: Movie = fs.readFileSync("movie.json");
  const bytes: Uint8Array = emitSwf(movie, CompressionMethod.Deflate);
  fs.writeFileSync("movie.swf", bytes);
}

main();

Contributing

This repo uses Git submodules for its test samples:

# Clone with submodules
git clone --recurse-submodules git://github.com/open-flash/swf-emitter.git
# Update submodules for an already-cloned repo
git submodule update --init --recursive --remote

This library uses Gulp and npm for its builds, yarn is recommended for the dependencies.

npm install
# work your changes...
npm test

Prefer non-master branches when sending a PR so your changes can be rebased if needed. All the commits must be made on top of master (fast-forward merge). CI must pass for changes to be accepted.

Readme

Keywords

Package Sidebar

Install

npm i swf-emitter

Weekly Downloads

0

Version

0.14.0

License

none

Unpacked Size

344 kB

Total Files

59

Last publish

Collaborators

  • demurgos