1
0
Fork 0
forked from 0x2620/oxjs

implement 'show subtitles' functionality for players and timelines

This commit is contained in:
rlx 2012-02-19 18:26:57 +00:00
commit 02b5b56be8
6 changed files with 83 additions and 40 deletions

View file

@ -173,6 +173,7 @@ Ox.LargeVideoTimeline = function(options, self) {
}
function setSubtitles() {
that.find('.OxSubtitle').remove();
self.$subtitles = [];
self.options.subtitles.forEach(function(subtitle, i) {
var found = self.options.find
@ -220,14 +221,13 @@ Ox.LargeVideoTimeline = function(options, self) {
self.setOption = function(key, value) {
if (key == 'find') {
that.find('.OxSubtitle').remove();
setSubtitles();
} else if (key == 'in' || key == 'out') {
setPointMarker(key);
} else if (key == 'position') {
setPosition();
} else if (key == 'subtitles') {
// ...
setSubtitles();
} else if (key == 'width') {
setWidth();
}