use 'isSubtitle' layer property

This commit is contained in:
rolux 2012-02-19 07:52:08 +00:00
parent b1e8267a87
commit e6c6a19255
3 changed files with 5 additions and 9 deletions

View file

@ -545,8 +545,8 @@
"canAddAnnotations": {"staff": true, "admin": true},
"hasEvents": true,
"hasPlaces": true,
"isSubtitles": true,
"item": "Subtitle",
"overlay": true,
"type": "text"
}
],
@ -623,7 +623,7 @@
"newsletter": true,
"ui": {
"annotationsFont": "small",
"annotationsRange": "position",
"annotationsRange": "all",
"annotationsSize": 256,
"annotationsSort": "position",
"clipsColumns": 2,

View file

@ -459,7 +459,6 @@
"title": "Descriptions",
"canAddAnnotations": {"member": true, "staff": true, "admin": true},
"item": "Description",
"overlay": true,
"showInfo": true,
"type": "text"
},
@ -468,7 +467,6 @@
"title": "Transcripts",
"canAddAnnotations": {"member": true, "staff": true, "admin": true},
"item": "Transcript",
"overlay": true,
"showInfo": true,
"type": "text"
}

View file

@ -793,11 +793,9 @@ pandora.getVideoOptions = function(data) {
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,
options = {};
options.subtitles = data.layers.subtitles
? data.layers.subtitles.map(function(subtitle) {
options.subtitles = Ox.getObject(data.layers, 'isSubtitle', true) || []).map(function(subtitle) {
return {'in': subtitle['in'], out: subtitle.out, text: subtitle.value};
})
: [];
});
options.censored = canPlayVideo ? []
: canPlayClips ? (
options.subtitles.length