update embed panel
This commit is contained in:
parent
ff0dcf5028
commit
9da8d9a0a6
1 changed files with 19 additions and 4 deletions
|
@ -163,6 +163,21 @@ pandora.ui.embedPanel = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.showAnnotations) {
|
if (options.showAnnotations) {
|
||||||
|
if (options.playInToOut) {
|
||||||
|
video.annotations.forEach(function(layer) {
|
||||||
|
var items = [];
|
||||||
|
layer.items.forEach(function(item) {
|
||||||
|
if ((
|
||||||
|
item['in'] >= options['in'] && item['in'] <= options.out
|
||||||
|
) || (
|
||||||
|
item.out >= options['in'] && item.out <= options.out
|
||||||
|
)) {
|
||||||
|
items.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
layer.items = items;
|
||||||
|
});
|
||||||
|
}
|
||||||
$annotations = Ox.AnnotationPanel(Ox.extend({
|
$annotations = Ox.AnnotationPanel(Ox.extend({
|
||||||
font: options.annotationsFont,
|
font: options.annotationsFont,
|
||||||
layers: video.annotations,
|
layers: video.annotations,
|
||||||
|
@ -170,7 +185,8 @@ pandora.ui.embedPanel = function() {
|
||||||
range: options.annotationsRange,
|
range: options.annotationsRange,
|
||||||
showLayers: options.showLayers,
|
showLayers: options.showLayers,
|
||||||
showUsers: true,
|
showUsers: true,
|
||||||
sort: options.annotationsSort
|
sort: options.annotationsSort,
|
||||||
|
width: window.innerWidth
|
||||||
}, options['in'] ? {
|
}, options['in'] ? {
|
||||||
'in': options['in']
|
'in': options['in']
|
||||||
} : {}, options.out ? {
|
} : {}, options.out ? {
|
||||||
|
@ -293,9 +309,8 @@ pandora.ui.embedPanel = function() {
|
||||||
|
|
||||||
function selectAnnotation(data) {
|
function selectAnnotation(data) {
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
setPosition(data['in']);
|
setPosition(Math.max(data['in'], options['in'] || 0));
|
||||||
//setPoint('in', data['in']);
|
$annotations.options({selected: ''});
|
||||||
//setPoint('out', data.out);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue