SWF emitter implemented in Typescript, for Node and browsers.
Converts swf-types
movies to bytes.
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();
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.