First create a Blank “captions_en.vtt” file and add text “WEBVTT” in the file
than add the file url in below script
jQuery(document).ready(function($) { $('video').each(function() { var track = $('<track>', { kind: 'captions', label: 'English', src: '/wp-content/uploads/2024/10/captions_en.vtt', srclang: 'en', default: true }); $(this).append(track); }); });
Jagdish Sarma Asked question October 16, 2024