We want to used closed captions on a video so people can turn them on/off in the player like you do in Youtube. We aren't hosting this particular video on Youtube; it will just be uploaded to the site and embedded by pasting in the video url.
We want to used closed captions on a video so people can turn them on/off in the player like you do in Youtube. We aren't hosting this particular video on Youtube; it will just be uploaded to the site and embedded by pasting in the video url.
Share Improve this question asked Nov 23, 2020 at 12:26 JulianJulian 981 silver badge8 bronze badges 2- It supposed to, at least it has a corresponding interface for adding captions tracks in VTT format to the video media element via the classic editor (default Gutenberg video block does not have such an interface), but when I tried to use it, I can't manage to get it working. – Ivan Shatsky Commented Nov 24, 2020 at 10:57
- My question was about embedding videos in the classic editor but the video block in Wordpress 5.6 now allows you to upload video captions directly in the block editor. – Julian Commented Dec 9, 2020 at 11:31
1 Answer
Reset to default 0I don't know Wordpress has its own video player, but HTML5 video player supports closed captions.
This is the example.
<video width="320" height="240">
<source type="video/mp4" src="/my_video_file.mp4" >
<track src="/captions_file.vtt" label="English" kind="captions" srclang="en-us" default >
<track src="/French_captions_file.vtt" label="French" kind="subtitles" srclang="fr" >
</video>
But, I recommend this Video.js