1
0
Fork 0
forked from 0x2620/oxjs

smaller fixes (tooltip corner cases, block timeline)

This commit is contained in:
rolux 2011-05-17 19:04:33 +02:00
commit 9650a29a90
4 changed files with 21 additions and 15 deletions

View file

@ -635,8 +635,13 @@ Ox.VideoPlayer = function(options, self) {
.bind({
click: function() {
if (!self.options.paused) {
self.wasPlaying = true;
self.playOnSubmit = true;
togglePaused(true);
} else if (self.playOnLoad) {
// if clicked during resolution switch,
// don't play on load
self.playOnLoad = false;
self.playOnSubmit = true;
}
self.$position.hide();
self.$positionInput
@ -758,7 +763,7 @@ Ox.VideoPlayer = function(options, self) {
},
mouseleave: function() {
$(this).css({
background: 'rgba(64, 64, 64, 0.25)'
background: 'rgba(32, 32, 32, 0.5)'
});
}
})
@ -1713,10 +1718,10 @@ Ox.VideoPlayer = function(options, self) {
self.$positionInput.hide();
self.$position.html('').show();
setPosition(parsePositionInput(self.$positionInput.options('value')), true);
if (self.wasPlaying) {
if (self.playOnSubmit) {
togglePaused(true);
self.video.play();
self.wasPlaying = false;
self.playOnSubmit = false;
}
if (self.focus == 'mouseenter' && !self.mouseHasLeft) {
that.gainFocus();
@ -1732,12 +1737,12 @@ Ox.VideoPlayer = function(options, self) {
}
function toggleFullscreen(toggleButton) {
var parentOffset, wasPlaying;
var parentOffset, playOnFullscreen;
self.options.fullscreen = !self.options.fullscreen;
if (!self.options.paused) {
// video won't keep playing accross detach/append
self.video.pause();
wasPlaying = true;
playOnFullscreen = true;
}
if (self.options.fullscreen) {
self.$parent = that.parent();
@ -1755,7 +1760,7 @@ Ox.VideoPlayer = function(options, self) {
})
.appendTo(Ox.UI.$body);
setSizes(function() {
wasPlaying && self.video.play();
playOnFullscreen && self.video.play();
that.bind({
mousemove: function() {
if (!self.mouseIsInControls) {
@ -1793,7 +1798,7 @@ Ox.VideoPlayer = function(options, self) {
zIndex: 1
})
.appendTo(self.$parent);
wasPlaying && self.video.play();
playOnFullscreen && self.video.play();
self.options.enableKeyboard && that.gainFocus();
//showInterface();
});