forked from 0x2620/pandora
options.subtitles still needed in tv mode
This commit is contained in:
parent
e381609b9e
commit
35c9ce73cc
1 changed files with 13 additions and 0 deletions
|
@ -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(/<br\/?>/g, '\n')
|
||||
}, subtitle.languages ? {
|
||||
tracks: subtitle.languages
|
||||
} : {});
|
||||
})
|
||||
: [];
|
||||
|
||||
options.censored = canPlayVideo ? []
|
||||
: canPlayClips ? (
|
||||
options.subtitles.length
|
||||
|
|
Loading…
Reference in a new issue