Skip to content

Commit 075a3ae

Browse files
committed
Add support Apple’s QuickTime File Format
1 parent 4266bbe commit 075a3ae

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

lib/mp4/Mp4Loader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { IParserLoader } from '../ParserFactory.js';
22

33
export const mp4ParserLoader: IParserLoader = {
44
parserType: 'mp4',
5-
extensions: ['.mp4', '.m4a', '.m4b', '.m4pa', 'm4v', 'm4r', '3gp'],
6-
mimeTypes: ['audio/mp4', 'audio/m4a', 'video/m4v', 'video/mp4'],
5+
extensions: ['.mp4', '.m4a', '.m4b', '.m4pa', 'm4v', 'm4r', '3gp', '.mov', '.movie', '.qt'],
6+
mimeTypes: ['audio/mp4', 'audio/m4a', 'video/m4v', 'video/mp4', 'video/quicktime'],
77
async load() {
88
return (await import('./MP4Parser.js')).MP4Parser
99
}
561 KB
Binary file not shown.

test/test-file-mp4.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,19 @@ describe('Parse MPEG-4 files with iTunes metadata', () => {
351351
});
352352
});
353353

354+
describe('Parse Apple’s QuickTime File Format', () => {
355+
356+
Parsers.forEach(parser => {
357+
it(parser.description, async ()=> {
358+
359+
const filePath = path.join(mp4Samples, 'sample_640x360.mov');
360+
const {format} = await mm.parseFile(filePath);
361+
assert.strictEqual(format.container, 'qt');
362+
});
363+
});
364+
365+
});
366+
354367
describe('should support extended atom header', () => {
355368

356369
Parsers.forEach(parser => {

0 commit comments

Comments
 (0)