-
Notifications
You must be signed in to change notification settings - Fork 103
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
Wait for all fonts to load #69
Comments
(Previously a method that does not work properly in edited)
In subtitles-octopus-worker.js I don't know if this is the best approach to do this. |
You can try storing the font files in IndexedDB. When initializing the SubtitlesOctopus instance, retrieve the fonts from IndexedDB and convert them into data URL format to provide to the SubtitlesOctopus instance for configuration. This way, the font files will load quickly. Although you cannot listen for the completion of font loading in SubtitlesOctopus, you can use setTimeout to wait for a while, which should be sufficient. |
Hi
Is there a possibility to wait for all fonts to load?
If I set OnReady option to start playing (eg. video.play()) it start immediately without waiting for fonts or subtitles.
I'm using videojs (npm package) and NuxtJS.
JavascriptSubtitlesOctopus is added as local_modules
Function for initializing player and JavascriptSubtitlesOctopus.
source - video,
ur - subtitles url,
font - array of fonts
The text was updated successfully, but these errors were encountered: