mirror of
https://github.com/codedread/bitjs
synced 2025-10-04 01:59:15 +02:00
Add proper support for AVI and WAV files. Up-rev to 1.1.3.
This commit is contained in:
parent
97cfb3b388
commit
5a00a3fdd0
4 changed files with 61 additions and 14 deletions
|
@ -455,4 +455,40 @@ describe('codecs test suite', () => {
|
|||
.and.equals('audio/webm; codecs="ac-3"');
|
||||
});
|
||||
});
|
||||
|
||||
describe('AVI', () => {
|
||||
it('detects AVI', () => {
|
||||
/** @type {ProbeInfo} */
|
||||
let info = {
|
||||
format: { format_name: 'avi' },
|
||||
streams: [
|
||||
{ codec_type: 'video', codec_name: 'mpeg4', codec_tag_string: 'XVID' },
|
||||
{ codec_type: 'audio', codec_name: 'mp3' },
|
||||
{ codec_type: 'audio', codec_name: 'mp3' },
|
||||
],
|
||||
};
|
||||
expect(getShortMIMEString(info))
|
||||
.to.be.a('string')
|
||||
.and.equals('video/x-msvideo');
|
||||
expect(getFullMIMEString(info))
|
||||
.to.be.a('string')
|
||||
.and.equals('video/x-msvideo');
|
||||
});
|
||||
});
|
||||
|
||||
describe('WAV', () => {
|
||||
it('detects WAV', () => {
|
||||
/** @type {ProbeInfo} */
|
||||
let info = {
|
||||
format: { format_name: 'wav' },
|
||||
streams: [ { codec_type: 'audio', codec_name: 'pcm_s16le' } ],
|
||||
};
|
||||
expect(getShortMIMEString(info))
|
||||
.to.be.a('string')
|
||||
.and.equals('audio/wav');
|
||||
expect(getFullMIMEString(info))
|
||||
.to.be.a('string')
|
||||
.and.equals('audio/wav');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue