@remotion/media-utils
Advanced tools
Comparing version 2.1.0-alpha.ea6b0d4e to 2.1.0
@@ -14,8 +14,6 @@ "use strict"; | ||
if (Array.isArray(vector[0])) { | ||
//If input vector contains complex numbers | ||
// If input vector contains complex numbers | ||
return [[vector[0][0], vector[0][1]]]; | ||
} | ||
else { | ||
return [[vector[0], 0]]; | ||
} | ||
return [[vector[0], 0]]; | ||
} | ||
@@ -22,0 +20,0 @@ // Recurse: all even samples |
@@ -14,3 +14,3 @@ "use strict"; | ||
for (let j = 0; j < blockSize; j++) { | ||
sum = sum + Math.abs(audioBuffer[blockStart + j]); // find the sum of all the samples in the block | ||
sum += Math.abs(audioBuffer[blockStart + j]); // find the sum of all the samples in the block | ||
} | ||
@@ -22,3 +22,3 @@ filteredData.push(sum / blockSize); // divide the sum by the block size to get the average | ||
const normalizeData = (filteredData) => { | ||
const multiplier = Math.pow(Math.max(...filteredData), -1); | ||
const multiplier = Math.max(...filteredData) ** -1; | ||
return filteredData.map((n) => n * multiplier); | ||
@@ -25,0 +25,0 @@ }; |
@@ -6,3 +6,3 @@ "use strict"; | ||
const remotion_1 = require("remotion"); | ||
const _1 = require("."); | ||
const get_audio_data_1 = require("./get-audio-data"); | ||
const useAudioData = (src) => { | ||
@@ -23,3 +23,3 @@ if (!src) { | ||
const handle = remotion_1.delayRender(); | ||
const data = await _1.getAudioData(src); | ||
const data = await get_audio_data_1.getAudioData(src); | ||
if (mountState.current.isMounted) { | ||
@@ -26,0 +26,0 @@ setMetadata(data); |
{ | ||
"name": "@remotion/media-utils", | ||
"version": "2.1.0-alpha.ea6b0d4e", | ||
"version": "2.1.0", | ||
"description": "Utility functions for audio and video", | ||
"main": "dist/index.js", | ||
"sideEffects": false, | ||
"scripts": { | ||
@@ -17,3 +18,3 @@ "test": "eslint src --ext ts,tsx", | ||
"dependencies": { | ||
"remotion": "2.1.0-alpha.ea6b0d4e" | ||
"remotion": "^2.1.0" | ||
}, | ||
@@ -25,5 +26,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@jonny/eslint-config": "^2.1.210", | ||
"@types/node": "^14.14.14", | ||
"eslint": "^7.4.0", | ||
"@jonny/eslint-config": "^2.1.233", | ||
"@types/node": "^15.0.1", | ||
"eslint": "^7.25.0", | ||
"prettier": "^2.0.5", | ||
@@ -30,0 +31,0 @@ "prettier-plugin-organize-imports": "^1.1.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
56066
648
+ Addedremotion@2.6.16(transitive)
- Removedremotion@2.1.0-alpha.ea6b0d4e(transitive)
Updatedremotion@^2.1.0