JQuery-HTML5-Subtitle-plugin is a project mainly written in JavaScript, it's free.
jQuery plugin which provides HTML5 video subtitle support from SRT files through the <track> tag
<video id="examplevideo" />
<source src="myvideo.webm" type="video/webm" />
<track kind="subtitle" src-lang="US" label="English" src="{{STATIC_URL}}media/test.srt" />
</video>
$(function () {
var video = $('#examplevideo');
video.srt(); //Starts disabled
video.srt('enable'); //Enable (and show) subtitles
video.srt('disable'); //Disable (and hide subtitles
if (video.srt('isEnabled')) { // Check if subs are enabled
console.log('Subs are enabled!')
}
});