From 5bba3800ea5ccff2c35922caae1d16389f17553d Mon Sep 17 00:00:00 2001 From: Kristi Witts Date: Wed, 28 Oct 2015 09:30:41 -0700 Subject: [PATCH] Add subtitles support --- README.md | 36 ++++++++++++++++++---- subtitles.html | 59 ++++++++++++++++++++++++++++++++++++ subtitles/js-playlist-sub.js | 24 +++++++++++++++ subtitles/subtitles.html | 59 ++++++++++++++++++++++++++++++++++++ 4 files changed, 172 insertions(+), 6 deletions(-) create mode 100644 subtitles.html create mode 100644 subtitles/js-playlist-sub.js create mode 100644 subtitles/subtitles.html diff --git a/README.md b/README.md index 30cfe22..0135359 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,17 @@ # js-playlist A simple video playlist using HTML5 and vanilla JS. For a full how-to on how to build this, go to the full tutorial. -MIT License. - +## How to Use --- -To use, create an HTML5 video container, like this: - +###HTML ```html

Videos

@@ -22,10 +21,35 @@ To use, create an HTML5 video container, like this:
``` + +### Javascript +```html + +``` + --- -If using the external JS file, copy this into your HTML page: +## Including Subtitles +--- +Oct 28, 2015 - I was recently asked about subtitles. I added a coupe of lines to the playlist js file and it is included in the folder "subtitles". It requires the use of a plugin called VideoSub by thomassturm. All you need to do is use js-playlist-sub.js instead of the original js-playlist.js and add two lines to your HTML file. +#### Add this to the bottom of the video source list (inside the