From ae55130f4748eef54ca435ca1f36ac33d104f3c4 Mon Sep 17 00:00:00 2001
From: j <0x006A@0x2620.org>
Date: Tue, 14 Apr 2015 15:53:47 +0100
Subject: [PATCH] add subtitles offset, fixes #2732
---
pandora/config.0xdb.jsonc | 1 +
pandora/config.indiancinema.jsonc | 1 +
pandora/config.padma.jsonc | 2 ++
pandora/config.pandora.jsonc | 1 +
static/js/editPanel.js | 1 +
static/js/editor.js | 1 +
static/js/embedPlayer.js | 1 +
static/js/player.js | 1 +
8 files changed, 9 insertions(+)
diff --git a/pandora/config.0xdb.jsonc b/pandora/config.0xdb.jsonc
index 0d6d504c6..6919e92b8 100644
--- a/pandora/config.0xdb.jsonc
+++ b/pandora/config.0xdb.jsonc
@@ -969,6 +969,7 @@
"videoScale": "fit",
"videoSize": "small",
"videoSubtitles": true,
+ "videoSubtitlesOffset": 0,
"videoTimeline": "antialias",
"videoView": "player",
"videoVolume": 1
diff --git a/pandora/config.indiancinema.jsonc b/pandora/config.indiancinema.jsonc
index dad2902a1..d821c9716 100644
--- a/pandora/config.indiancinema.jsonc
+++ b/pandora/config.indiancinema.jsonc
@@ -984,6 +984,7 @@
"videoScale": "fit",
"videoSize": "small",
"videoSubtitles": true,
+ "videoSubtitlesOffset": 0,
"videoTimeline": "slitscan",
"videoView": "player",
"videoVolume": 1
diff --git a/pandora/config.padma.jsonc b/pandora/config.padma.jsonc
index 15b4e4d8e..714651fce 100644
--- a/pandora/config.padma.jsonc
+++ b/pandora/config.padma.jsonc
@@ -618,6 +618,7 @@
"id": "transcripts",
"title": "Transcripts",
"canAddAnnotations": {"member": true, "staff": true, "admin": true},
+ "isSubtitles": true,
"item": "Transcript",
"showInfo": true,
"type": "text"
@@ -868,6 +869,7 @@
"videoScale": "fit",
"videoSize": "large",
"videoSubtitles": false,
+ "videoSubtitlesOffset": 0,
"videoTimeline": "antialias",
"videoView": "player",
"videoVolume": 1
diff --git a/pandora/config.pandora.jsonc b/pandora/config.pandora.jsonc
index abf58e659..705978a5f 100644
--- a/pandora/config.pandora.jsonc
+++ b/pandora/config.pandora.jsonc
@@ -911,6 +911,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"videoScale": "fit",
"videoSize": "small",
"videoSubtitles": true,
+ "videoSubtitlesOffset": 0,
"videoTimeline": "antialias",
"videoView": "player",
"videoVolume": 1
diff --git a/static/js/editPanel.js b/static/js/editPanel.js
index 9c5547540..c405b5413 100644
--- a/static/js/editPanel.js
+++ b/static/js/editPanel.js
@@ -147,6 +147,7 @@ pandora.ui.editPanel = function(isEmbed) {
})
),
subtitles: getSubtitles(edit.clips),
+ subtitlesOffset: ui.videoSubtitlesOffset,
timeline: ui.videoTimeline,
timelineTooltip: Ox._('timeline') + ' ' + Ox.SYMBOLS.shift + 'T',
video: getVideos(),
diff --git a/static/js/editor.js b/static/js/editor.js
index 3fbcc4196..d1bc77fd6 100644
--- a/static/js/editor.js
+++ b/static/js/editor.js
@@ -74,6 +74,7 @@ pandora.ui.editor = function(data) {
subtitles: data.subtitles,
subtitlesDefaultTrack: Ox.getLanguageNameByCode(pandora.site.language),
subtitlesLayer: data.subtitlesLayer,
+ subtitlesOffset: ui.videoSubtitlesOffset,
subtitlesTrack: Ox.getLanguageNameByCode(pandora.site.language),
timeline: ui.videoTimeline,
timelines: pandora.site.timelines,
diff --git a/static/js/embedPlayer.js b/static/js/embedPlayer.js
index 98f44718e..101cc1df2 100644
--- a/static/js/embedPlayer.js
+++ b/static/js/embedPlayer.js
@@ -104,6 +104,7 @@ pandora.ui.embedPlayer = function() {
scaleToFill: ui.videoScale == 'fill',
showIconOnLoad: true,
subtitles: video.subtitles,
+ subtitlesOffset: ui.videoSubtitlesOffset,
timeline: options.playInToOut ? function(size, i) {
return pandora.getMediaURL('/' + options.item
+ '/timelineantialias'
diff --git a/static/js/player.js b/static/js/player.js
index 06db9db6e..ebd8e8c07 100644
--- a/static/js/player.js
+++ b/static/js/player.js
@@ -51,6 +51,7 @@ pandora.ui.player = function(data) {
smallTimelineURL: pandora.getMediaURL('/' + ui.item + '/timeline16p.jpg'),
subtitlesDefaultTrack: Ox.getLanguageNameByCode(pandora.site.language),
subtitlesLayer: data.subtitlesLayer,
+ subtitlesOffset: ui.videoSubtitlesOffset,
subtitlesTrack: Ox.getLanguageNameByCode(pandora.site.language),
timeline: ui.videoTimeline,
timelineTooltip: Ox._('timeline') + ' ' + Ox.SYMBOLS.shift + 'T',