use same subtitle defaults for embedded player

This commit is contained in:
j 2022-01-21 17:32:24 +00:00
parent af65750363
commit 5505d495cf

View file

@ -42,7 +42,9 @@ pandora.ui.embedPlayer = function() {
sizes = getSizes(); sizes = getSizes();
options.height = sizes.videoHeight; options.height = sizes.videoHeight;
if (!video.subtitles) {
video.subtitles = pandora.getSubtitles(video); video.subtitles = pandora.getSubtitles(video);
}
if (options.title) { if (options.title) {
$title = Ox.Element() $title = Ox.Element()
@ -107,7 +109,10 @@ pandora.ui.embedPlayer = function() {
scaleToFill: ui.videoScale == 'fill', scaleToFill: ui.videoScale == 'fill',
showIconOnLoad: true, showIconOnLoad: true,
subtitles: video.subtitles, subtitles: video.subtitles,
subtitlesDefaultTrack: video.subtitlesDefaultTrack || Ox.getLanguageNameByCode(pandora.site.language),
subtitlesLayer: video.subtitlesLayer,
subtitlesOffset: ui.videoSubtitlesOffset, subtitlesOffset: ui.videoSubtitlesOffset,
subtitlesTrack: video.subtitlesTrack || Ox.getLanguageNameByCode(pandora.site.language),
timeline: options.playInToOut ? function(size, i) { timeline: options.playInToOut ? function(size, i) {
return pandora.getMediaURL('/' + options.item return pandora.getMediaURL('/' + options.item
+ '/timelineantialias' + '/timelineantialias'