forked from 0x2620/pandora
refactor embed js
This commit is contained in:
parent
6877cd592c
commit
b94681dcb0
1 changed files with 5 additions and 5 deletions
|
@ -164,11 +164,6 @@ Ox.load('UI', {
|
||||||
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 = {};
|
||||||
options.subtitles = data.layers.subtitles
|
|
||||||
? data.layers.subtitles.map(function(subtitle) {
|
|
||||||
return {'in': subtitle['in'], out: subtitle.out, text: subtitle.value};
|
|
||||||
})
|
|
||||||
: [];
|
|
||||||
options.censored = canPlayVideo ? []
|
options.censored = canPlayVideo ? []
|
||||||
: canPlayClips ? (
|
: canPlayClips ? (
|
||||||
options.subtitles.length
|
options.subtitles.length
|
||||||
|
@ -205,6 +200,11 @@ Ox.load('UI', {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
options.posterFrame = data.posterFrame;
|
options.posterFrame = data.posterFrame;
|
||||||
|
options.subtitles = data.layers.subtitles
|
||||||
|
? data.layers.subtitles.map(function(subtitle) {
|
||||||
|
return {'in': subtitle['in'], out: subtitle.out, text: subtitle.value};
|
||||||
|
})
|
||||||
|
: [];
|
||||||
options.video = {};
|
options.video = {};
|
||||||
pandora.site.video.resolutions.forEach(function(resolution) {
|
pandora.site.video.resolutions.forEach(function(resolution) {
|
||||||
options.video[resolution] = Ox.range(data.parts).map(function(i) {
|
options.video[resolution] = Ox.range(data.parts).map(function(i) {
|
||||||
|
|
Loading…
Reference in a new issue