New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

codec-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codec-parser - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

1

index.d.ts

@@ -140,2 +140,3 @@ declare type OggMimeType = "application/ogg" | "audio/ogg";

enableLogging?: boolean;
enableFrameCRC32?: boolean;
}

@@ -142,0 +143,0 @@

6

package.json
{
"name": "codec-parser",
"version": "2.1.0",
"version": "2.2.0",
"description": "Library that parses raw data from audio codecs into frames containing data, header values, duration, and other information.",

@@ -39,6 +39,6 @@ "main": "index.js",

"devDependencies": {
"@types/jest": "^28.1.3",
"jest": "^28.1.1",
"@types/jest": "^28.1.6",
"jest": "^28.1.3",
"prettier": "^2.7.1"
}
}

@@ -174,2 +174,3 @@ # Codec Parser

* `options.enableLogging` *optional* Set to true to enable warning and error messages.
* `options.enableFrameCRC32` *optional* Set to false to disable the crc32 calculation for each frame. This will save a marginal amount of execution time if you don't need this information.

@@ -176,0 +177,0 @@ ### Methods

@@ -29,3 +29,11 @@ /* Copyright 2020-2022 Ethan Halsall

export default class CodecParser {
constructor(mimeType, { onCodecUpdate, onCodec, enableLogging } = {}) {
constructor(
mimeType,
{
onCodecUpdate,
onCodec,
enableLogging = false,
enableFrameCRC32 = true,
} = {}
) {
this._inputMimeType = mimeType;

@@ -35,2 +43,3 @@ this._onCodec = onCodec || noOp;

this._enableLogging = enableLogging;
this._crc32 = enableFrameCRC32 ? crc32 : noOp;

@@ -171,3 +180,3 @@ this._generator = this._getGenerator();

frame.totalDuration = (this._totalSamples / this._sampleRate) * 1000;
frame.crc32 = crc32(frame.data);
frame.crc32 = this._crc32(frame.data);

@@ -174,0 +183,0 @@ this._headerCache.checkCodecUpdate(

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc