add subtitlesOffset
This commit is contained in:
parent
398e3f6749
commit
28d8271174
4 changed files with 11 additions and 1 deletions
|
|
@ -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)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue