oxjs/demos/videotimelineplayer2/js/demo.js

85 lines
2.5 KiB
JavaScript
Raw Normal View History

2012-03-20 11:01:10 +00:00
Ox.load('UI', function() {
Ox.Theme('modern');
var $innerPanel = Ox.SplitPanel({
elements: [
{
element: Ox.Element(),
resizable: true,
resize: [64, 128, 192],
size: 64
},
{
element: Ox.Element()
}
],
orientation: 'vertical'
}),
$outerPanel = Ox.SplitPanel({
elements: [
{
element: Ox.Element(),
resizable: true,
resize: [128, 256, 384],
size: 128
},
{
element: $innerPanel
}
],
orientation: 'horizontal'
}).appendTo(Ox.$body);
2012-03-20 19:28:15 +00:00
//Ox.get('srt/0097514.srt', function(srt) {
2012-03-20 11:01:10 +00:00
//var id = '0097514',
var id = '0318034',
$videoTimelinePlayer = Ox.VideoTimelinePlayer({
//duration: 3029.96,
duration: 5956.24,
getFrameURL: function(position) {
return 'http://0xdb.org/' + id + '/64p' + position + '.jpg'
},
getImageURL: function(i) {
//return 'http://0xdb.org/' + id + '/timeline64p' + i + '.png'
return 'jpg/timelineslitscan64p' + i + '.jpg'
},
height: window.innerHeight - 65,
paused: true,
//position: 1000,
2012-03-20 19:28:15 +00:00
position: 1800,
//subtitles: Ox.parseSRT(srt),
2012-03-20 11:01:10 +00:00
timelineURL: 'http://0xdb.org/' + id + '/timeline16p.png',
//videoRatio: 1.291667,
videoRatio: 1.833333,
videoURL: 'http://0xdb.org/' + id + '/96p.webm',
width: window.innerWidth - 129
})
.bindEvent({
resizeend: function(data) {
Ox.print('RESIZE', data.size)
$videoTimelinePlayer.options({
height: data.size
});
}
});
$innerPanel
.replaceElement(1, $videoTimelinePlayer)
.bindEvent({
resize: function(data) {
Ox.print('RESIZE', data.size)
$videoTimelinePlayer.options({
width: data.size
});
}
});
$videoTimelinePlayer.gainFocus();
2012-03-20 19:28:15 +00:00
//});
2012-03-20 11:01:10 +00:00
});