I myself managed to add captions,
You can add to by adding these lines into videojs-html5-player.php file
global $post;
$track = get_field("video_caption_url", $post->ID);
$captions = '';
if(!empty($track) && $track){
$captions = "<track class='ld_tracks' kind='captions' src='".$track."' srclang='en' label='English'>";
}
now add this caption var to html video player
<video id="$player" class="video-js vjs-default-skin vjs-big-play-centered"{$controls}{$preload}{$autoplay}{$loop}{$muted}{$poster}{$playsinline} data-setup='{"fluid": true}'>
$src
$captions
</video>
-
This reply was modified 4 years, 2 months ago by doozielabs.