diff --git a/static/js/utils.js b/static/js/utils.js index f9a5f972..e55c5eb1 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -1758,6 +1758,19 @@ pandora.getVideoOptions = function(data) { }).map(function(layer) { return layer.id; })[0]; + options.subtitles = options.subtitlesLayer + ? data.layers[options.subtitlesLayer].map(function(subtitle) { + return Ox.extend({ + id: subtitle.id, + 'in': subtitle['in'], + out: subtitle.out, + text: subtitle.value.replace(/\n/g, ' ').replace(//g, '\n') + }, subtitle.languages ? { + tracks: subtitle.languages + } : {}); + }) + : []; + options.censored = canPlayVideo ? [] : canPlayClips ? ( options.subtitles.length