diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index 30c76902..8b528bf9 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -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, diff --git a/source/UI/js/Video/VideoEditPanel.js b/source/UI/js/Video/VideoEditPanel.js index 10ae9d50..ed458fd1 100644 --- a/source/UI/js/Video/VideoEditPanel.js +++ b/source/UI/js/Video/VideoEditPanel.js @@ -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, diff --git a/source/UI/js/Video/VideoPlayer.js b/source/UI/js/Video/VideoPlayer.js index 3b739f6a..308765ff 100644 --- a/source/UI/js/Video/VideoPlayer.js +++ b/source/UI/js/Video/VideoPlayer.js @@ -71,6 +71,7 @@ Ox.VideoPlayer Generic Video Player out Out point (sec) text Text tracks <[s]> Track names, like "English" or "Director's Commentary" + subtitlesOffset adds bottom offset below subtitles in % of height subtitlesDefaultTrack Track name subtitlesTrack Track name timeline 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)' diff --git a/source/UI/js/Video/VideoPlayerPanel.js b/source/UI/js/Video/VideoPlayerPanel.js index 3e4bd1bd..dc133792 100644 --- a/source/UI/js/Video/VideoPlayerPanel.js +++ b/source/UI/js/Video/VideoPlayerPanel.js @@ -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,