Skip to content

Commit

Permalink
build(ngx-utilities): try to fix metadata issue
Browse files Browse the repository at this point in the history
  • Loading branch information
julianpoemp committed Nov 7, 2024
1 parent 066147c commit 46338f0
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 7 deletions.
3 changes: 2 additions & 1 deletion libs/ngx-utilities/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": []
"types": [],
"composite": true
},
"exclude": ["src/**/*.spec.ts", "jest.config.ts", "src/**/*.test.ts"],
"include": ["src/**/*.ts"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AudioFormat } from './audio-format';
import { parseBlob } from 'music-metadata';
import { MpegParser, parseBlob } from 'music-metadata-remastered';

export class MusicMetadataFormat extends AudioFormat {
protected override _decoder: 'web-audio' | 'octra' = 'web-audio';
Expand Down Expand Up @@ -35,7 +35,8 @@ export class MusicMetadataFormat extends AudioFormat {

override async readAudioInformation(buffer: ArrayBuffer) {
const parsed = await parseBlob(
new File([buffer], this._filename, { type: this._mimeType })
new File([buffer], this._filename, { type: this._mimeType }),
MpegParser
);
const format = parsed.format;

Expand Down
54 changes: 51 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"konva": "^9.3.15",
"luxon": "^3.5.0",
"modernizr": "^3.13.0",
"music-metadata": "file:../music-metadata",
"music-metadata-remastered": "file:../music-metadata-remastered",
"ngrx-wieder": "^13.0.0",
"ngx-jodit": "^3.1.3",
"ngx-webstorage": "^18.0.0",
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
],
"@octra/web-media": [
"libs/web-media/src/index.ts"
],
"music-metadata-remastered": [
"node_modules/music-metadata-remastered"
]
}
},
Expand Down

0 comments on commit 46338f0

Please sign in to comment.