loosen checks on vtt file (#5359)
parent
0681727b64
commit
d62e14eca1
|
@ -28,8 +28,9 @@ export function SubtitleFilePicker({
|
||||||
if (selectedFile) {
|
if (selectedFile) {
|
||||||
if (
|
if (
|
||||||
selectedFile.type === 'text/vtt' ||
|
selectedFile.type === 'text/vtt' ||
|
||||||
(selectedFile.type === 'text/plain' &&
|
// HACK: sometimes the mime type is just straight-up missing
|
||||||
selectedFile.name.endsWith('.vtt'))
|
// best we can do is check the file extension and hope for the best
|
||||||
|
selectedFile.name.endsWith('.vtt')
|
||||||
) {
|
) {
|
||||||
onSelectFile(selectedFile)
|
onSelectFile(selectedFile)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue