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
|
|
@ -136,6 +136,9 @@ Ox.VideoPanel = function(options, self) {
|
|||
},
|
||||
select: selectAnnotation,
|
||||
subtitles: function(data) {
|
||||
self.$timeline.options({
|
||||
subtitles: data.subtitles ? self.options.subtitles : []
|
||||
});
|
||||
that.triggerEvent('subtitles', data);
|
||||
},
|
||||
volume: function(data) {
|
||||
|
|
@ -154,7 +157,7 @@ Ox.VideoPanel = function(options, self) {
|
|||
find: self.options.find,
|
||||
getImageURL: self.options.getTimelineImageURL,
|
||||
position: self.options.position,
|
||||
subtitles: self.options.subtitles,
|
||||
subtitles: self.options.enableSubtitles ? self.options.subtitles : [],
|
||||
videoId: self.options.videoId,
|
||||
width: getTimelineWidth()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue