jQuery plugin for enabling HTML5 video with SRT Subtitles
Switch branches/tags
Nothing to show
Clone or download
Latest commit 7c78168 Apr 6, 2011


VideoSub v0.9.6

Standards compliant video subtitles for HTML5 video tags. Original MooTools implementation by Thomas Sturm, jQuery port by Max Wheeler.


Dead simple. Call the videoSub() function on any jQuery collection of video elements. This will probably look something like:


Doing the following will parse the <video> elements you've specified and look for a <track> element. Your HTML should look something like the following:

  <source src="/path/to/movie.mp4" type="video/mp4">
  <source src="/path/to/movie.ogg" type="video/ogg">
  <track src="/path/to/movie.srt" kind="subtitle" srclang="en-au" label="English">

If there is a <track> subtitle, it will load and parse the subtitle file (SRT or WebSRT standard) and display the subtitles over the playing video. Should your browser already support <track> tags, VideoSub will feature detect and hide silently.


There are some basic options/defaults you can override for now:

  containerClass:     'videosub-container',
  barClass:           'videosub-bar',
  useBarDefaultStyle: true

By default, some simple styling is applied to the subtitles. You can remove them by setting useBarDefaultStyle to false and do all your styling via CSS instead.



  • Deal with line-endings correctly


  • Initial jQuery release


VideoSub is released under the MIT license.