From 5505d495cf1850d8d33d549614f72004eb83f892 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 21 Jan 2022 17:32:24 +0000 Subject: [PATCH] use same subtitle defaults for embedded player --- static/js/embedPlayer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/embedPlayer.js b/static/js/embedPlayer.js index 0db6a7b8..504d012e 100644 --- a/static/js/embedPlayer.js +++ b/static/js/embedPlayer.js @@ -42,7 +42,9 @@ pandora.ui.embedPlayer = function() { sizes = getSizes(); options.height = sizes.videoHeight; - video.subtitles = pandora.getSubtitles(video); + if (!video.subtitles) { + video.subtitles = pandora.getSubtitles(video); + } if (options.title) { $title = Ox.Element() @@ -107,7 +109,10 @@ pandora.ui.embedPlayer = function() { scaleToFill: ui.videoScale == 'fill', showIconOnLoad: true, subtitles: video.subtitles, + subtitlesDefaultTrack: video.subtitlesDefaultTrack || Ox.getLanguageNameByCode(pandora.site.language), + subtitlesLayer: video.subtitlesLayer, subtitlesOffset: ui.videoSubtitlesOffset, + subtitlesTrack: video.subtitlesTrack || Ox.getLanguageNameByCode(pandora.site.language), timeline: options.playInToOut ? function(size, i) { return pandora.getMediaURL('/' + options.item + '/timelineantialias'