forked from 0x2620/pandora
make subtitlesLayer part of object returned by getVideoOptions
This commit is contained in:
parent
559140ca76
commit
e18ea23a75
1 changed files with 5 additions and 5 deletions
|
@ -1615,11 +1615,11 @@ pandora.getVideoURL = function(id, resolution, part) {
|
||||||
pandora.getVideoOptions = function(data) {
|
pandora.getVideoOptions = function(data) {
|
||||||
var canPlayClips = data.editable || pandora.site.capabilities.canPlayClips[pandora.user.level] >= data.rightslevel,
|
var canPlayClips = data.editable || pandora.site.capabilities.canPlayClips[pandora.user.level] >= data.rightslevel,
|
||||||
canPlayVideo = data.editable || pandora.site.capabilities.canPlayVideo[pandora.user.level] >= data.rightslevel,
|
canPlayVideo = data.editable || pandora.site.capabilities.canPlayVideo[pandora.user.level] >= data.rightslevel,
|
||||||
options = {},
|
options = {};
|
||||||
subtitlesLayer = pandora.site.layers.filter(function(layer) {
|
options.subtitlesLayer = pandora.site.layers.filter(function(layer) {
|
||||||
return layer.isSubtitles;
|
return layer.isSubtitles;
|
||||||
})[0];
|
})[0];
|
||||||
options.subtitles = subtitlesLayer ? data.layers[subtitlesLayer.id].map(function(subtitle) {
|
options.subtitles = options.subtitlesLayer ? data.layers[options.subtitlesLayer.id].map(function(subtitle) {
|
||||||
return {
|
return {
|
||||||
id: subtitle.id,
|
id: subtitle.id,
|
||||||
'in': subtitle['in'],
|
'in': subtitle['in'],
|
||||||
|
|
Loading…
Reference in a new issue