1.0.1 • Published 9 years ago
swf-properties v1.0.1
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-propertiesUsage
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 thewidthandheightof the SWF.frameRate: The SWF framerate.frameCount: Number of frames in the SWF.
Credits
License
MIT