add subtitlesOffset
This commit is contained in:
parent
398e3f6749
commit
28d8271174
4 changed files with 11 additions and 1 deletions
|
@ -92,6 +92,7 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
subtitles: [],
|
||||
subtitlesDefaultTrack: 'en',
|
||||
subtitlesLayer: null,
|
||||
subtitlesOffset: 0,
|
||||
subtitlesTrack: 'en',
|
||||
timeline: '',
|
||||
timelines: [],
|
||||
|
@ -404,6 +405,7 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
|||
sizeIsLarge: self.options.videoSize == 'large',
|
||||
subtitles: Ox.clone(self.options.subtitles, true),
|
||||
subtitlesDefaultTrack: self.options.subtitlesDefaultTrack,
|
||||
subtitlesOffset: self.options.subtitlesOffset,
|
||||
subtitlesTrack: self.options.subtitlesTrack,
|
||||
type: type,
|
||||
video: type == 'play' ? self.options.video : self.options.getFrameURL,
|
||||
|
|
|
@ -48,6 +48,7 @@ Ox.VideoEditPanel = function(options, self) {
|
|||
sort: [],
|
||||
sortOptions: [],
|
||||
subtitles: [],
|
||||
subtitlesOffset: 0,
|
||||
timeline: '',
|
||||
timelineTooltip: 'timeline',
|
||||
type: 'static',
|
||||
|
@ -238,6 +239,7 @@ Ox.VideoEditPanel = function(options, self) {
|
|||
scaleToFill: self.options.scaleToFill,
|
||||
showMilliseconds: 3,
|
||||
subtitles: self.options.subtitles,
|
||||
subtitlesOffset: self.options.subtitlesOffset,
|
||||
timeline: self.options.smallTimelineURL,
|
||||
video: self.options.video,
|
||||
volume: self.options.volume,
|
||||
|
|
|
@ -71,6 +71,7 @@ Ox.VideoPlayer <f> Generic Video Player
|
|||
out <n> Out point (sec)
|
||||
text <s> Text
|
||||
tracks <[s]> Track names, like "English" or "Director's Commentary"
|
||||
subtitlesOffset <n|0> adds bottom offset below subtitles in % of height
|
||||
subtitlesDefaultTrack <s|'English'> Track name
|
||||
subtitlesTrack <s|'English'> Track name
|
||||
timeline <s> Timeline image URL
|
||||
|
@ -167,6 +168,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
sizeIsLarge: false,
|
||||
subtitles: [],
|
||||
subtitlesDefaultTrack: 'English',
|
||||
subtitlesOffset: 0,
|
||||
subtitlesTrack: 'English',
|
||||
timeline: '',
|
||||
timelineType: '',
|
||||
|
@ -1509,7 +1511,9 @@ Ox.VideoPlayer = function(options, self) {
|
|||
} else if (element == 'subtitle') {
|
||||
css = {
|
||||
bottom: (Math.floor(self.height / 16)
|
||||
+ !!self.controlsBottomAreVisible * 16) + 'px',
|
||||
+ Math.floor(self.options.subtitlesOffset/100 * self.height)
|
||||
+ !!self.controlsBottomAreVisible * 16
|
||||
) + 'px',
|
||||
width: self.width + 'px',
|
||||
fontSize: Math.floor(self.height / 20) + 'px',
|
||||
WebkitTextStroke: (self.height / 1000) + 'px rgb(0, 0, 0)'
|
||||
|
|
|
@ -78,6 +78,7 @@ Ox.VideoPlayerPanel = function(options, self) {
|
|||
subtitles: [],
|
||||
subtitlesDefaultTrack: 'English',
|
||||
subtitlesLayer: null,
|
||||
subtitlesOffset: 0,
|
||||
subtitlesTrack: 'English',
|
||||
timeline: '',
|
||||
timelineTooltip: 'timeline',
|
||||
|
@ -237,6 +238,7 @@ Ox.VideoPlayerPanel = function(options, self) {
|
|||
scaleToFill: self.options.scaleToFill,
|
||||
subtitles: Ox.clone(self.options.subtitles, true),
|
||||
subtitlesDefaultTrack: self.options.subtitlesDefaultTrack,
|
||||
subtitlesOffset: self.options.subtitlesOffset,
|
||||
subtitlesTrack: self.options.subtitlesTrack,
|
||||
timeline: self.options.smallTimelineURL,
|
||||
video: self.options.video,
|
||||
|
|
Loading…
Reference in a new issue