swf-properties

1.0.1 • Public • Published

SWF properties reader

A (standalone) node module for reading SWF format properties. This is a ES6 fork of swf-reader, with a simplier intend (no internal tags/clip lookup, just main scene properties).

Installation

$ npm install swf-properties

Usage

var SWFReader = require('swf-properties');
 
SWFReader( 'swf_path.swf', function(err, props) {
  if ( err ) {
    // handle error
    ...
  }
  console.log(props);
});

SWFReader(file, callback)

Returns a SWF Object to callback function. If it's not possible to read the SWF, an error object is passed as the first argument of callback.

SWF Object

The SWF Object method has the following properties :

  • version: The SWF version.
  • fileLength: An Object containing the following properties :
    • compressed: The SWF compressed size in bytes.
    • uncompressed: The SWF uncompressed size in bytes.
  • frameSize: An Object containing the width and height of the SWF.
  • frameRate: The SWF framerate.
  • frameCount: Number of frames in the SWF.

Credits

License

MIT

Build Status Coverage Status

Readme

Keywords

Package Sidebar

Install

npm i swf-properties

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • 131