music-metadata
Advanced tools
Comparing version 10.8.0-beta.3 to 10.8.0
@@ -13,9 +13,3 @@ import type { IGetToken, ITokenizer } from 'strtok3'; | ||
captureStackTrace(targetObject: object, constructorOpt?: Function): void; | ||
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite /** | ||
* Specifies the amount of time to buffer data before starting to play the file, in millisecond units. | ||
* If this value is nonzero, the Play Duration field and all of the payload Presentation Time fields have been offset | ||
* by this amount. Therefore, player software must subtract the value in the preroll field from the play duration and | ||
* presentation times to calculate their actual values. It follows that all payload Presentation Time fields need to | ||
* be at least this value. | ||
*/[]) => any) | undefined; | ||
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined; | ||
stackTraceLimit: number; | ||
@@ -22,0 +16,0 @@ }; |
@@ -19,3 +19,8 @@ /** | ||
const tokenizer = await fromStream(stream, { fileInfo: typeof fileInfo === 'string' ? { mimeType: fileInfo } : fileInfo }); | ||
return parseFromTokenizer(tokenizer, options); | ||
try { | ||
return await parseFromTokenizer(tokenizer, options); | ||
} | ||
finally { | ||
await tokenizer.close(); | ||
} | ||
} | ||
@@ -22,0 +27,0 @@ /** |
@@ -294,3 +294,3 @@ import type { IToken, IGetToken } from 'strtok3'; | ||
dataReferenceIndex: number; | ||
description: Uint8Array; | ||
description: Uint8Array | undefined; | ||
} | ||
@@ -297,0 +297,0 @@ export interface IAtomStsd { |
@@ -217,3 +217,3 @@ import * as Token from 'token-types'; | ||
* Atom: Sample Description Atom ('stsd') | ||
* Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25691 | ||
* Ref: https://developer.apple.com/documentation/quicktime-file-format/sample_description_atom | ||
*/ | ||
@@ -225,6 +225,7 @@ class SampleDescriptionTable { | ||
get(buf, off) { | ||
const descrLen = this.len - 12; | ||
return { | ||
dataFormat: FourCcToken.get(buf, off), | ||
dataReferenceIndex: Token.UINT16_BE.get(buf, off + 10), | ||
description: new Token.Uint8ArrayType(this.len - 12).get(buf, off + 12) | ||
description: descrLen > 0 ? new Token.Uint8ArrayType(descrLen).get(buf, off + 12) : undefined | ||
}; | ||
@@ -248,3 +249,3 @@ } | ||
off += Token.UINT32_BE.len; | ||
table.push(new SampleDescriptionTable(size).get(buf, off)); | ||
table.push(new SampleDescriptionTable(size - Token.UINT32_BE.len).get(buf, off)); | ||
off += size; | ||
@@ -251,0 +252,0 @@ } |
@@ -7,5 +7,5 @@ import initDebug from 'debug'; | ||
import * as AtomToken from './AtomToken.js'; | ||
import { Mp4ContentError } from './AtomToken.js'; | ||
import { TrackType } from '../type.js'; | ||
import { uint8ArrayToHex, uint8ArrayToString } from 'uint8array-extras'; | ||
import { Mp4ContentError } from './AtomToken.js'; | ||
const debug = initDebug('music-metadata:parser:MP4'); | ||
@@ -446,11 +446,13 @@ const tagFormat = 'iTunes'; | ||
let offset = 0; | ||
const version = AtomToken.SoundSampleDescriptionVersion.get(sampleDescription.description, offset); | ||
offset += AtomToken.SoundSampleDescriptionVersion.len; | ||
if (version.version === 0 || version.version === 1) { | ||
// Sound Sample Description (Version 0) | ||
ssd.description = AtomToken.SoundSampleDescriptionV0.get(sampleDescription.description, offset); | ||
if (sampleDescription.description) { | ||
const version = AtomToken.SoundSampleDescriptionVersion.get(sampleDescription.description, offset); | ||
offset += AtomToken.SoundSampleDescriptionVersion.len; | ||
if (version.version === 0 || version.version === 1) { | ||
// Sound Sample Description (Version 0) | ||
ssd.description = AtomToken.SoundSampleDescriptionV0.get(sampleDescription.description, offset); | ||
} | ||
else { | ||
debug(`Warning: sound-sample-description ${version} not implemented`); | ||
} | ||
} | ||
else { | ||
debug(`Warning: sound-sample-description ${version} not implemented`); | ||
} | ||
return ssd; | ||
@@ -457,0 +459,0 @@ } |
@@ -0,0 +0,0 @@ The MIT License (MIT) |
{ | ||
"name": "music-metadata", | ||
"description": "Music metadata parser for Node.js, supporting virtual any audio and tag format.", | ||
"version": "10.8.0-beta.3", | ||
"version": "10.8.0", | ||
"author": { | ||
@@ -105,4 +105,3 @@ "name": "Borewit", | ||
"send-codacy": "c8 report --reporter=text-lcov | codacy-coverage", | ||
"doc-gen": "yarn node doc-gen/gen.js", | ||
"prepublish": "yarn run build" | ||
"doc-gen": "yarn node doc-gen/gen.js" | ||
}, | ||
@@ -116,3 +115,3 @@ "dependencies": { | ||
"media-typer": "^1.1.0", | ||
"strtok3": "10.1.0-beta.5", | ||
"strtok3": "10.1.1", | ||
"token-types": "^6.0.0", | ||
@@ -135,3 +134,3 @@ "uint8array-extras": "^1.4.0" | ||
"mime": "^4.0.6", | ||
"mocha": "^11.0.1", | ||
"mocha": "^11.1.0", | ||
"remark-cli": "^12.0.1", | ||
@@ -138,0 +137,0 @@ "remark-preset-lint-consistent": "^6.0.0", |
@@ -0,0 +0,0 @@ [![Node.js CI](https://github.com/Borewit/music-metadata/actions/workflows/nodejs-ci.yml/badge.svg?branch=master)](https://github.com/Borewit/music-metadata/actions?query=branch%3Amaster) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
514746
191
+ Addedpeek-readable@6.1.0(transitive)
+ Addedstrtok3@10.1.1(transitive)
- Removedstrtok3@10.1.0-beta.5(transitive)
Updatedstrtok3@10.1.1