minor fixes

This commit is contained in:
rolux 2011-05-17 09:43:20 +02:00
parent bed3e1ea70
commit e60ac585d4
2 changed files with 23 additions and 17 deletions

View file

@ -160,7 +160,7 @@ Ox.load('UI', {
$videos[2].options({height: size - 48});
}
}),
size: 240,
size: 320,
resizable: true,
resize: [100, 400]
},

View file

@ -476,9 +476,7 @@ Ox.VideoPlayer = function(options, self) {
})
.css({float: 'left'})
.bindEvent({
click: function() {
self.$find.hide();
}
click: toggleFind
})
.appendTo(self.$find);
@ -751,8 +749,8 @@ Ox.VideoPlayer = function(options, self) {
type: 'image'
})
.css({float: 'left'})
.bindEvent('click', function() {
self.$volume.toggle();
.bindEvent({
click: toggleVolume
})
.appendTo(self['$controls' + titlecase]);
@ -792,9 +790,7 @@ Ox.VideoPlayer = function(options, self) {
})
.css({float: 'left'})
.bindEvent({
click: function() {
self.$volume.hide();
}
click: toggleVolume
})
.appendTo(self.$volume);
@ -944,14 +940,19 @@ Ox.VideoPlayer = function(options, self) {
height: logoHeight + 'px',
};
} else if (element == 'player') {
var height = self.options.fullscreen ? window.innerHeight : self.height;
if (self.options.externalControls) {
height += (
!!self.options.controlsTop.length +
!!self.options.controlsBottom.length
) * self.barHeight;
}
if (self.options.largeTimeline) {
height += 64;
}
css = Ox.extend({
width: self.width + 'px',
height: (self.options.fullscreen
? window.innerHeight
: self.height + (
self.options.externalControls
? (!!self.options.controlsTop.length + !!self.options.controlsBottom.length) * self.barHeight
: 0)) + 'px'
height: height + 'px'
}, self.options.fullscreen ? {
left: 0,
top: 0
@ -1499,7 +1500,6 @@ Ox.VideoPlayer = function(options, self) {
if (!found) {
position = self.results[direction == 1 ? 0 : self.results.length - 1]['in'];
}
Ox.print('>>', self.results, position)
setPosition(position + self.secondsPerFrame, true);
}
@ -1519,8 +1519,10 @@ Ox.VideoPlayer = function(options, self) {
}
function toggleFind() {
var show = self.$find.is(':hidden');
!show && self.$findInput.blurInput();
self.$find.toggle();
self.$find.is(':visible') && self.$findInput.focusInput(false);
show && self.$findInput.focusInput(false);
}
function toggleFullscreen(toggleButton) {
@ -1671,6 +1673,10 @@ Ox.VideoPlayer = function(options, self) {
});
}
function toggleVolume() {
self.$volume.toggle();
}
self.setOption = function(key, value) {
if (key == 'fullscreen') {
toggleFullscreen(true);