Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebVTT (.vtt) format to build-in assets type list #15514

Closed
4 tasks done
otomad opened this issue Jan 5, 2024 · 6 comments · Fixed by #15538
Closed
4 tasks done

Add WebVTT (.vtt) format to build-in assets type list #15514

otomad opened this issue Jan 5, 2024 · 6 comments · Fixed by #15538
Labels

Comments

@otomad
Copy link

otomad commented Jan 5, 2024

Description

WebVTT is the official subtitles and captions format for media, it's very useful to support it to import as a resolved URL. And it's widely used in all browsers.

<video controls>
    <source src="assets/video.mp4" type="video/mp4" />
    <track kind="subtitles" src="assets/subtitles.vtt" srclang="en" />
</video>

Suggested solution

Add "vtt" type in

export const KNOWN_ASSET_TYPES = [
// images
'apng',
'png',
'jpe?g',
'jfif',
'pjpeg',
'pjp',
'gif',
'svg',
'ico',
'webp',
'avif',
// media
'mp4',
'webm',
'ogg',
'mp3',
'wav',
'flac',
'aac',
'opus',
'mov',
// fonts
'woff2?',
'eot',
'ttf',
'otf',
// other
'webmanifest',
'pdf',
'txt',
]

Alternative

No response

Additional context

No response

Validations

@bluwy
Copy link
Member

bluwy commented Jan 8, 2024

Feel free to contribute this feature. The changes are similar to this: #15189

@thumbsu
Copy link

thumbsu commented Jan 8, 2024

@bluwy Can I try it?

@bluwy
Copy link
Member

bluwy commented Jan 8, 2024

Sure. Go ahead!

@2-NOW
Copy link
Contributor

2-NOW commented Jan 8, 2024

I finished work and get a PR :D @bluwy
#15538

@thumbsu
Copy link

thumbsu commented Jan 8, 2024

I finished work and get a PR :D @bluwy #15538

Oh, I guess I should have acted faster than I said. LOL.

@bluwy
Copy link
Member

bluwy commented Jan 8, 2024

Thanks for the quick contributions y'all 😅

@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants