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: [],
|
subtitles: [],
|
||||||
subtitlesDefaultTrack: 'en',
|
subtitlesDefaultTrack: 'en',
|
||||||
subtitlesLayer: null,
|
subtitlesLayer: null,
|
||||||
|
subtitlesOffset: 0,
|
||||||
subtitlesTrack: 'en',
|
subtitlesTrack: 'en',
|
||||||
timeline: '',
|
timeline: '',
|
||||||
timelines: [],
|
timelines: [],
|
||||||
|
@ -404,6 +405,7 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
||||||
sizeIsLarge: self.options.videoSize == 'large',
|
sizeIsLarge: self.options.videoSize == 'large',
|
||||||
subtitles: Ox.clone(self.options.subtitles, true),
|
subtitles: Ox.clone(self.options.subtitles, true),
|
||||||
subtitlesDefaultTrack: self.options.subtitlesDefaultTrack,
|
subtitlesDefaultTrack: self.options.subtitlesDefaultTrack,
|
||||||
|
subtitlesOffset: self.options.subtitlesOffset,
|
||||||
subtitlesTrack: self.options.subtitlesTrack,
|
subtitlesTrack: self.options.subtitlesTrack,
|
||||||
type: type,
|
type: type,
|
||||||
video: type == 'play' ? self.options.video : self.options.getFrameURL,
|
video: type == 'play' ? self.options.video : self.options.getFrameURL,
|
||||||
|
|
|
@ -48,6 +48,7 @@ Ox.VideoEditPanel = function(options, self) {
|
||||||
sort: [],
|
sort: [],
|
||||||
sortOptions: [],
|
sortOptions: [],
|
||||||
subtitles: [],
|
subtitles: [],
|
||||||
|
subtitlesOffset: 0,
|
||||||
timeline: '',
|
timeline: '',
|
||||||
timelineTooltip: 'timeline',
|
timelineTooltip: 'timeline',
|
||||||
type: 'static',
|
type: 'static',
|
||||||
|
@ -238,6 +239,7 @@ Ox.VideoEditPanel = function(options, self) {
|
||||||
scaleToFill: self.options.scaleToFill,
|
scaleToFill: self.options.scaleToFill,
|
||||||
showMilliseconds: 3,
|
showMilliseconds: 3,
|
||||||
subtitles: self.options.subtitles,
|
subtitles: self.options.subtitles,
|
||||||
|
subtitlesOffset: self.options.subtitlesOffset,
|
||||||
timeline: self.options.smallTimelineURL,
|
timeline: self.options.smallTimelineURL,
|
||||||
video: self.options.video,
|
video: self.options.video,
|
||||||
volume: self.options.volume,
|
volume: self.options.volume,
|
||||||
|
|
|
@ -71,6 +71,7 @@ Ox.VideoPlayer <f> Generic Video Player
|
||||||
out <n> Out point (sec)
|
out <n> Out point (sec)
|
||||||
text <s> Text
|
text <s> Text
|
||||||
tracks <[s]> Track names, like "English" or "Director's Commentary"
|
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
|
subtitlesDefaultTrack <s|'English'> Track name
|
||||||
subtitlesTrack <s|'English'> Track name
|
subtitlesTrack <s|'English'> Track name
|
||||||
timeline <s> Timeline image URL
|
timeline <s> Timeline image URL
|
||||||
|
@ -167,6 +168,7 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
sizeIsLarge: false,
|
sizeIsLarge: false,
|
||||||
subtitles: [],
|
subtitles: [],
|
||||||
subtitlesDefaultTrack: 'English',
|
subtitlesDefaultTrack: 'English',
|
||||||
|
subtitlesOffset: 0,
|
||||||
subtitlesTrack: 'English',
|
subtitlesTrack: 'English',
|
||||||
timeline: '',
|
timeline: '',
|
||||||
timelineType: '',
|
timelineType: '',
|
||||||
|
@ -1509,7 +1511,9 @@ Ox.VideoPlayer = function(options, self) {
|
||||||
} else if (element == 'subtitle') {
|
} else if (element == 'subtitle') {
|
||||||
css = {
|
css = {
|
||||||
bottom: (Math.floor(self.height / 16)
|
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',
|
width: self.width + 'px',
|
||||||
fontSize: Math.floor(self.height / 20) + 'px',
|
fontSize: Math.floor(self.height / 20) + 'px',
|
||||||
WebkitTextStroke: (self.height / 1000) + 'px rgb(0, 0, 0)'
|
WebkitTextStroke: (self.height / 1000) + 'px rgb(0, 0, 0)'
|
||||||
|
|
|
@ -78,6 +78,7 @@ Ox.VideoPlayerPanel = function(options, self) {
|
||||||
subtitles: [],
|
subtitles: [],
|
||||||
subtitlesDefaultTrack: 'English',
|
subtitlesDefaultTrack: 'English',
|
||||||
subtitlesLayer: null,
|
subtitlesLayer: null,
|
||||||
|
subtitlesOffset: 0,
|
||||||
subtitlesTrack: 'English',
|
subtitlesTrack: 'English',
|
||||||
timeline: '',
|
timeline: '',
|
||||||
timelineTooltip: 'timeline',
|
timelineTooltip: 'timeline',
|
||||||
|
@ -237,6 +238,7 @@ Ox.VideoPlayerPanel = function(options, self) {
|
||||||
scaleToFill: self.options.scaleToFill,
|
scaleToFill: self.options.scaleToFill,
|
||||||
subtitles: Ox.clone(self.options.subtitles, true),
|
subtitles: Ox.clone(self.options.subtitles, true),
|
||||||
subtitlesDefaultTrack: self.options.subtitlesDefaultTrack,
|
subtitlesDefaultTrack: self.options.subtitlesDefaultTrack,
|
||||||
|
subtitlesOffset: self.options.subtitlesOffset,
|
||||||
subtitlesTrack: self.options.subtitlesTrack,
|
subtitlesTrack: self.options.subtitlesTrack,
|
||||||
timeline: self.options.smallTimelineURL,
|
timeline: self.options.smallTimelineURL,
|
||||||
video: self.options.video,
|
video: self.options.video,
|
||||||
|
|
Loading…
Reference in a new issue