@@ -115,9 +115,21 @@ describe('codecs test suite', () => {
115
115
format : { format_name : 'matroska,webm' } ,
116
116
streams : [ { codec_type : 'video' , codec_name : 'vp8' } ] ,
117
117
} ) ) . 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' ) ;
118
126
} ) ;
119
127
120
128
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' ) ;
121
133
expect ( getShortMIMEString ( {
122
134
format : { format_name : 'matroska,webm' } ,
123
135
streams : [ { codec_type : 'audio' , codec_name : 'vorbis' } ] ,
@@ -129,9 +141,29 @@ describe('codecs test suite', () => {
129
141
format : { format_name : 'matroska,webm' } ,
130
142
streams : [ { codec_type : 'video' , codec_name : 'h264' } ] ,
131
143
} ) ) . 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' ) ;
132
160
} ) ;
133
161
134
162
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' ) ;
135
167
expect ( getShortMIMEString ( {
136
168
format : { format_name : 'matroska,webm' } ,
137
169
streams : [ { codec_type : 'audio' , codec_name : 'dts' } ] ,
0 commit comments