From 62415dd9e8706894860754a8f7a43c21abe3cb68 Mon Sep 17 00:00:00 2001 From: Thijs Triemstra Date: Mon, 8 Mar 2021 19:59:16 +0100 Subject: [PATCH] saveAs: check for extended mimetype fixes #731 --- dev/Cross-Browser-Declarations.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dev/Cross-Browser-Declarations.js b/dev/Cross-Browser-Declarations.js index 9b007987..4bfa47c7 100644 --- a/dev/Cross-Browser-Declarations.js +++ b/dev/Cross-Browser-Declarations.js @@ -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];