1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-04 10:09:16 +02:00

v1.08: Add handling of AC-3 audio codec too...

This commit is contained in:
Jeff Schiller 2023-02-01 21:59:26 -08:00
parent a24524e772
commit 44beb992bf
3 changed files with 29 additions and 6 deletions

View file

@ -276,6 +276,27 @@ describe('codecs test suite', () => {
});
});
describe('MPEG2', () => {
/** @type {ProbeInfo} */
let info;
beforeEach(() => {
info = {
format: { format_name: 'matroska,webm' },
streams: [{
codec_type: 'video',
codec_name: 'mpeg2video',
}],
};
});
it('detects mpeg2video', () => {
expect(getFullMIMEString(info))
.to.be.a('string')
.and.equals('video/webm; codecs="mpeg2video"');
});
});
describe('MP4A / AAC', () => {
/** @type {ProbeInfo} */
let info;
@ -355,7 +376,7 @@ describe('codecs test suite', () => {
});
});
describe('MPEG2', () => {
describe('AC-3', () => {
/** @type {ProbeInfo} */
let info;
@ -363,16 +384,16 @@ describe('codecs test suite', () => {
info = {
format: { format_name: 'matroska,webm' },
streams: [{
codec_type: 'video',
codec_name: 'mpeg2video',
codec_type: 'audio',
codec_name: 'ac3',
}],
};
});
it('detects mpeg2video', () => {
it('detects AC-3', () => {
expect(getFullMIMEString(info))
.to.be.a('string')
.and.equals('video/webm; codecs="mpeg2video"');
.and.equals('audio/webm; codecs="ac-3"');
});
});
});