A repository of over 1000 quality jQuery plugins

jQuery jQuery Videosub

jQuery Videosub is a jQuery Audio & Video plugin.

Created by Icelab

jQuery plugin for enabling HTML5 video with SRT Subtitles

Not what you're looking for? Click here to view more Audio & Video jQuery plugins

VideoSub v0.9.6

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

Usage

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

$('video').videoSub();

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:

<video>
  <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">
</video>

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.

Options

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

$('video').videoSub({
  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.

Changelog

0.9.6

  • Deal with line-endings correctly

0.9.5

  • Initial jQuery release

License

VideoSub is released under the MIT license.



You might also like these other Audio & Video jQuery Plugins

  • articulate.js

    A jQuery plugin that lets the browser speak to you.

  • JqVideoBox

    jqVideoBox is jquery lightbox for videos from Youtube, Metacafe, Google Video, Dailymotion, Blip, Revver, Veoh, Vimeo and more

  • jQuery Video Lightning

    Turn any element into a lightbox or popover link for Youtube and Vimeo videos.

License:

Copyright (C) 2011 by Max Wheeler