Skip to content

Commit 2d0bb47

Browse files
committed
A couple more unit tests for matroska in codecs and update changelog for release.
1 parent bb0f403 commit 2d0bb47

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.4] - 2023-10-19
6+
7+
### Changed
8+
9+
- codecs: Add support for DTS audio codec and AV1 video codec.
10+
- codecs: Update how Matroska video/audio files are detected (video/x-matroska).
11+
[Issue #43](https://github.com/codedread/bitjs/issues/43)
12+
- untar: Fix long path/filenames in 'ustar' format. [Issue #42](https://github.com/codedread/bitjs/issues/43)
13+
514
## [1.1.3] - 2023-10-15
615

716
### Changed

tests/codecs.spec.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,21 @@ describe('codecs test suite', () => {
115115
format: { format_name: 'matroska,webm' },
116116
streams: [ { codec_type: 'video', codec_name: 'vp8' } ],
117117
})).equals('video/webm');
118+
expect(getShortMIMEString({
119+
format: { format_name: 'matroska,webm' },
120+
streams: [ { codec_type: 'video', codec_name: 'vp9' } ],
121+
})).equals('video/webm');
122+
expect(getShortMIMEString({
123+
format: { format_name: 'matroska,webm' },
124+
streams: [ { codec_type: 'video', codec_name: 'av1' } ],
125+
})).equals('video/webm');
118126
});
119127

120128
it('detects WEBM audio', () => {
129+
expect(getShortMIMEString({
130+
format: { format_name: 'matroska,webm' },
131+
streams: [ { codec_type: 'audio', codec_name: 'opus' } ],
132+
})).equals('audio/webm');
121133
expect(getShortMIMEString({
122134
format: { format_name: 'matroska,webm' },
123135
streams: [ { codec_type: 'audio', codec_name: 'vorbis' } ],
@@ -129,9 +141,29 @@ describe('codecs test suite', () => {
129141
format: { format_name: 'matroska,webm' },
130142
streams: [ { codec_type: 'video', codec_name: 'h264' } ],
131143
})).equals('video/x-matroska');
144+
145+
expect(getShortMIMEString({
146+
format: { format_name: 'matroska,webm' },
147+
streams: [
148+
{ codec_type: 'audio', codec_name: 'aac' },
149+
{ codec_type: 'video', codec_name: 'vp9' },
150+
],
151+
})).equals('video/x-matroska');
152+
153+
expect(getShortMIMEString({
154+
format: { format_name: 'matroska,webm' },
155+
streams: [
156+
{ codec_type: 'audio', codec_name: 'vorbis' },
157+
{ codec_type: 'video', codec_name: 'h264' },
158+
],
159+
})).equals('video/x-matroska');
132160
});
133161

134162
it('detects Matroska audio', () => {
163+
expect(getShortMIMEString({
164+
format: { format_name: 'matroska,webm' },
165+
streams: [ { codec_type: 'audio', codec_name: 'aac' } ],
166+
})).equals('audio/x-matroska');
135167
expect(getShortMIMEString({
136168
format: { format_name: 'matroska,webm' },
137169
streams: [ { codec_type: 'audio', codec_name: 'dts' } ],

0 commit comments

Comments
 (0)