Skip to content

Commit

Permalink
loosen checks on vtt file (#5359)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius authored Sep 16, 2024
1 parent 0681727 commit d62e14e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/view/com/composer/videos/SubtitleFilePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export function SubtitleFilePicker({
if (selectedFile) {
if (
selectedFile.type === 'text/vtt' ||
(selectedFile.type === 'text/plain' &&
selectedFile.name.endsWith('.vtt'))
// HACK: sometimes the mime type is just straight-up missing
// best we can do is check the file extension and hope for the best
selectedFile.name.endsWith('.vtt')
) {
onSelectFile(selectedFile)
} else {
Expand Down

0 comments on commit d62e14e

Please sign in to comment.