From 47e4f1cd84e1cd14a3eaf9c02df4ac9e7ebc2206 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 3 Jun 2021 17:32:01 +0100 Subject: [PATCH] pass subtitles to player too --- static/js/player.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/static/js/player.js b/static/js/player.js index 409f1821..3ed11e83 100644 --- a/static/js/player.js +++ b/static/js/player.js @@ -47,10 +47,11 @@ pandora.ui.player = function(data) { showUsers: pandora.site.annotations.showUsers, showTimeline: ui.showTimeline, smallTimelineURL: pandora.getMediaURL('/' + ui.item + '/timeline16p.jpg?' + data.modified), - subtitlesDefaultTrack: Ox.getLanguageNameByCode(pandora.site.language), + subtitles: data.subtitles || [], + subtitlesDefaultTrack: data.subtitlesDefaultTrack || Ox.getLanguageNameByCode(pandora.site.language), subtitlesLayer: data.subtitlesLayer, subtitlesOffset: ui.videoSubtitlesOffset, - subtitlesTrack: Ox.getLanguageNameByCode(pandora.site.language), + subtitlesTrack: data.subtitlesTrack || Ox.getLanguageNameByCode(pandora.site.language), timeline: ui.videoTimeline, timelineTooltip: Ox._('timeline') + ' ' + Ox.SYMBOLS.shift + 'T', video: data.video,