misc. updates

This commit is contained in:
rolux 2013-07-26 23:29:09 +02:00
parent 7c4270d03f
commit 84bc07c07e

View file

@ -33,7 +33,21 @@ Ox.load('UI', function() {
+ '/timeline' + type + '16p' + i + '.jpg'; + '/timeline' + type + '16p' + i + '.jpg';
}, },
height: window.innerHeight - 24, height: window.innerHeight - 24,
layers: [ layers: [{
id: 'image',
item: 'Image',
items: data['json/hashes.json'].filter(function(value) {
return value.type == 'shape';
}).map(function(value) {
return {
'in': value['in'],
out: value.out,
value: '<img src="' + value.composite + '">'
}
}),
title: 'Images',
type: 'text'
}].concat([
{id: 'shape', item: 'Shape Hash', title: 'Shape Hashes'}, {id: 'shape', item: 'Shape Hash', title: 'Shape Hashes'},
{id: 'color', item: 'Color Hash', title: 'Color Hashes'}, {id: 'color', item: 'Color Hash', title: 'Color Hashes'},
{id: 'pHash', item: 'P Hash', title: 'P Hashes'}, {id: 'pHash', item: 'P Hash', title: 'P Hashes'},
@ -48,7 +62,7 @@ Ox.load('UI', function() {
return { return {
'in': value['in'], 'in': value['in'],
out: value.out, out: value.out,
value: '<img src="' + value.composite + '"><br>' + value.hash + '<br>' value: value.hash + '<br>'
+ value.similar.map(function(value) { + value.similar.map(function(value) {
var position = Ox.formatDuration(value.position, 3); var position = Ox.formatDuration(value.position, 3);
return '<a href="#' + position + '">' + position +'</a> ' + value.distance; return '<a href="#' + position + '">' + position +'</a> ' + value.distance;
@ -58,10 +72,10 @@ Ox.load('UI', function() {
title: layer.title, title: layer.title,
type: 'text' type: 'text'
} }
}), })),
resolution: video.resolution, resolution: video.resolution,
showAnnotations: true, showAnnotations: true,
showLayers: {shape: true, color: true, p: true, dct: true}, showLayers: {image: true, shape: true, color: true, pHash: true, dct: true},
subtitles: data['json/cuts1.json'].map(function(position) { subtitles: data['json/cuts1.json'].map(function(position) {
return {'in': position - 0.08, out: position - 0.04, text: ''}; return {'in': position - 0.08, out: position - 0.04, text: ''};
}), }),