forked from 0x2620/oxjs
implement 'show subtitles' functionality for players and timelines
This commit is contained in:
parent
b5a7b9b28d
commit
02b5b56be8
6 changed files with 83 additions and 40 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue