Skip to content

uupaa/AACProfile.js

Repository files navigation

AACProfile.js Build Status

npm

AAC Profile and Level detection.

This module made of WebModule.

Documentation

Browser, NW.js and Electron

<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/lib/AACProfile.js"></script>
<script>

var codecs     = "mp4a.40.2, avc1.4d4015";
var codecArray = codecs.split(","); // -> ["mp4a.40.2", " avc1.42c01e"]

for (var i = 0, iz = codecArray.length; i < iz; ++i) {
    var codec = codecArray[i].trim();

    if (/mp4a/.test(codec)) {
        console.info( AACProfile.getProfile(codec) ); // -> "AAC-LC";
    }
}

</script>

WebWorkers

importScripts("<module-dir>/lib/WebModule.js");
importScripts("<module-dir>/lib/AACProfile.js");

Node.js

require("<module-dir>/lib/WebModule.js");
require("<module-dir>/lib/AACProfile.js");

About

AAC Profile and Level detection.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published