Skip to content

Commit

Permalink
saveAs: check for extended mimetype
Browse files Browse the repository at this point in the history
fixes #731
  • Loading branch information
thijstriemstra authored Mar 8, 2021
1 parent c3d4382 commit 62415dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev/Cross-Browser-Declarations.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ function invokeSaveAsDialog(file, fileName) {
}

var fileExtension = (file.type || 'video/webm').split('/')[1];

if (fileExtension.indexOf(';') !== -1) {
// extended mimetype, e.g. 'video/webm;codecs=vp8,opus'
fileExtension = fileExtension.split(';')[0];
}
if (fileName && fileName.indexOf('.') !== -1) {
var splitted = fileName.split('.');
fileName = splitted[0];
Expand Down

0 comments on commit 62415dd

Please sign in to comment.