Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@andrewstart/av-encoder

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@andrewstart/av-encoder - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

4

dist/encodeAudio.js

@@ -47,3 +47,3 @@ "use strict";

const id = path.basename(file, path.extname(file));
const override = (_a = group.overrides) === null || _a === void 0 ? void 0 : _a[id];
const override = (_a = group.overrides) === null || _a === void 0 ? void 0 : _a[file];
const currentSettings = Object.assign({}, defaults, group, override);

@@ -53,3 +53,3 @@ delete currentSettings.src;

delete currentSettings.overrides;
const oldSettings = cache.getSettings(id) || currentSettings;
const oldSettings = cache.getSettings(file) || currentSettings;
const changed = { opus: false, mp3: false, caf: false };

@@ -56,0 +56,0 @@ if (currentSettings.mono != oldSettings.mono) {

@@ -50,3 +50,3 @@ "use strict";

const id = path.basename(file, path.extname(file));
const override = (_a = group.overrides) === null || _a === void 0 ? void 0 : _a[id];
const override = (_a = group.overrides) === null || _a === void 0 ? void 0 : _a[file];
const currentSettings = Object.assign({}, defaults, group, override);

@@ -57,3 +57,3 @@ delete currentSettings.src;

delete currentSettings.audioOut;
const oldSettings = cache.getSettings(id) || currentSettings;
const oldSettings = cache.getSettings(file) || currentSettings;
let changed = false;

@@ -69,4 +69,2 @@ if (currentSettings.quality != oldSettings.quality || currentSettings.width != oldSettings.width) {

const target = targetBase + '.mp4';
const targetCaf = targetBase + '.caf';
const targetMp3 = targetBase + '.mp3';
if (!await fs.pathExists(target)) {

@@ -73,0 +71,0 @@ changed = true;

@@ -34,8 +34,7 @@ "use strict";

const hash = await hasha.fromFile(absPath, { algorithm: 'md5' });
const filename = path.basename(filePath, path.extname(filePath));
// if not present in cache, return true (add to hashes)
// if present, remove from unseen, compare hash with hasha, and update hashes if changed
let changed = true;
if (this.hashes.has(filename)) {
const data = this.hashes.get(filename);
if (this.hashes.has(filePath)) {
const data = this.hashes.get(filePath);
if (data.hash == hash) {

@@ -46,5 +45,5 @@ changed = false;

if (changed) {
this.hashes.set(filename, { hash, settings });
this.hashes.set(filePath, { hash, settings });
}
this.unseen.delete(filename);
this.unseen.delete(filePath);
return changed;

@@ -51,0 +50,0 @@ }

{
"name": "@andrewstart/av-encoder",
"version": "2.0.0",
"version": "2.0.1",
"description": "Encodes and compresses audio/video for widely supported web formats",

@@ -5,0 +5,0 @@ "bin": {

@@ -47,3 +47,3 @@ # av-encoder

overrides: {
'intro': {
'src/vo/intro.wav': {
opusTargetBitrate: '48k',

@@ -50,0 +50,0 @@ mp3Quality: '7'

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