Add support to play .mov files (#672)

* update allowed mimetypes

* fix .mov files failing to play in Chromium

* add check for  before passing to FileReader

* add missing semi-colon
This commit is contained in:
James 2022-07-18 17:33:11 +01:00 committed by GitHub
parent 1979646b4b
commit e6f395c643
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -46,7 +46,12 @@ function loadVideo(videoFile) {
reader.onerror = (e) => {
reject(e);
};
reader.readAsDataURL(videoFile);
if (videoFile.type === 'video/quicktime') {
const quicktimeVideoFile = new File([videoFile], videoFile.name, { type: 'video/mp4' });
reader.readAsDataURL(quicktimeVideoFile);
} else {
reader.readAsDataURL(videoFile);
}
});
}
function getVideoThumbnail(video, width, height, mimeType) {