Reputation: 498
My video and webvtt subtitles are not synced. Is there a JavaScript way to manage webvtt subtitle synchronization/delay/offset in html5 native player?
I found this lib (https://github.com/florinn/vtt-shift) but it rewrite the webvtt file on disk. I'd prefer a client side way to resync with the video.
<video>
<source class="videosource" src="{{media}}?play=true" type="video/mp4"/>
<track kind="subtitles" label="Default" src="{{subtitle}}" default>
</video>
Upvotes: 4
Views: 3363
Reputation: 498
Finally I made a lib to live change subtitles position, style and offset.
https://www.npmjs.com/package/vtt-live-edit
Upvotes: 5