1
0
Fork 0
forked from 0x2620/oxjs

first demo of auto-resizing textarea

This commit is contained in:
rolux 2011-05-19 12:18:39 +02:00
commit 7f904cda1f
5 changed files with 175 additions and 50 deletions

View file

@ -3,39 +3,53 @@ Ox.load('UI', {
theme: 'modern'
}, function() {
Ox.get('srt/0393109.srt', function(srt) {
//var id = '0393109';
var id = '0097514';
var subtitles = Ox.parseSRT(srt, 25);
Ox.get('srt/' + id + '.srt', function(srt) {
var subtitles = Ox.parseSRT(srt, 25),
layers = [
{
id: 'subtitles',
items: subtitles.map(function(subtitle, i) {
return {id: i, 'in': subtitle.in, out: subtitle.out, value: subtitle.text};
}),
title: 'Subtitles'
}
];
var $appPanel, $mainPanel;
var $videoEditor = Ox.VideoEditor({
annotationsSize: 256,
duration: 6336.08,
duration: 3029.96,
find: 'dode',
getFrameURL: function(position, width) {
return 'http://next.0xdb.org/0393109/frame/' + width + '/' + position + '.jpg'
return 'http://next.0xdb.org/' + id + '/frame/' + width + '/' + position + '.jpg'
},
getLargeTimelineImageURL: function(i) {
return 'http://next.0xdb.org/0393109/timelines/timeline.64.' + i + '.png';
return 'http://next.0xdb.org/' + id + '/timelines/timeline.64.' + i + '.png';
},
getSmallTimelineImageURL: function(i) {
return 'http://next.0xdb.org/0393109/timelines/timeline.16.' + i + '.png';
return 'http://next.0xdb.org/' + id + '/timelines/timeline.16.' + i + '.png';
},
height: window.innerHeight - 129,
'in': 3128.76,
out: 3130.72,
position: 3168.04,
posterFrame: 3168.04,
'in': 0,
layers: layers,
out: 0,
position: 0,
posterFrame: 1515,
showAnnotations: true,
subtitles: subtitles,
video: {
96: 'http://next.0xdb.org/0393109/96p.webm',
240: 'http://next.0xdb.org/0393109/96p.webm?240p',
480: 'http://next.0xdb.org/0393109/96p.webm?480p'
96: 'http://next.0xdb.org/' + id + '/96p.webm',
240: 'http://next.0xdb.org/' + id + '/96p.webm?240p',
480: 'http://next.0xdb.org/' + id + '/96p.webm?480p'
},
videoHeight: 96,
videoSize: 'small',
videoWidth: 180,
videoWidth: 124,
width: window.innerWidth - 257
});
@ -89,7 +103,6 @@ Ox.load('UI', {
$videoEditor.bindEvent({
resize: function(foo, size) {
Ox.print('RESIZE!!!!!!!!!')
$videoEditor.options({
height: size
});