fix animation bug when switching back from fullscreen
This commit is contained in:
parent
dec0832de6
commit
f1f66cce81
1 changed files with 65 additions and 49 deletions
|
@ -189,6 +189,12 @@ Ox.VideoPlayer = function(options, self) {
|
|||
key_shift_g: function() {
|
||||
goToNextResult(-1);
|
||||
},
|
||||
key_shift_left: function() {
|
||||
setPosition(self.options.position - 1);
|
||||
},
|
||||
key_shift_right: function() {
|
||||
setPosition(self.options.position + 1);
|
||||
},
|
||||
key_space: togglePaused
|
||||
})
|
||||
}
|
||||
|
@ -374,6 +380,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
if (self.options.enableFind) {
|
||||
|
||||
self.$find = $('<div>')
|
||||
.addClass('OxControls')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
|
@ -713,6 +720,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
.appendTo(self['$controls' + titlecase]);
|
||||
|
||||
self.$resolution = $('<div>')
|
||||
.addClass('OxControls')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
|
@ -907,6 +915,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
if (self.options.enableVolume) {
|
||||
|
||||
self.$volume = $('<div>')
|
||||
.addClass('OxControls')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
|
@ -1360,8 +1369,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
function hideInterface() {
|
||||
Ox.print('hideInterface');
|
||||
clearTimeout(self.interfaceTimeout);
|
||||
self.interfaceTimeout = setTimeout(function() {
|
||||
if (!self.exitFullscreen && !self.inputHasFocus && !self.mouseIsInControls) {
|
||||
self.interfaceIsVisible = false;
|
||||
self.controlsTopAreVisible = false;
|
||||
self.controlsBottomAreVisible = false;
|
||||
self.$controlsTop && self.$controlsTop.animate({
|
||||
|
@ -1471,12 +1482,14 @@ Ox.VideoPlayer = function(options, self) {
|
|||
}
|
||||
|
||||
function playInToOut() {
|
||||
if (self.options.out > self.options['in']) {
|
||||
self.playInToOut = true;
|
||||
setPosition(self.options['in']);
|
||||
if (self.options.paused) {
|
||||
togglePaused();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function progress() {
|
||||
var buffered = self.video.buffered;
|
||||
|
@ -1643,6 +1656,8 @@ Ox.VideoPlayer = function(options, self) {
|
|||
function showInterface() {
|
||||
Ox.print('showInterface');
|
||||
clearTimeout(self.interfaceTimeout);
|
||||
if (!self.interfaceIsVisible) {
|
||||
self.interfaceIsVisible = true;
|
||||
if (self.$controlsTop) {
|
||||
self.controlsTopAreVisible = true;
|
||||
}
|
||||
|
@ -1686,6 +1701,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
bottom: getCSS('subtitle').bottom,
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
|
||||
function showLoadingIcon() {
|
||||
self.$loadingIcon.attr({
|
||||
|
@ -1775,10 +1791,10 @@ Ox.VideoPlayer = function(options, self) {
|
|||
playOnFullscreen && self.video.play();
|
||||
that.bind({
|
||||
mousemove: function() {
|
||||
if (!self.mouseIsInControls) {
|
||||
showInterface();
|
||||
//if (!self.mouseIsInControls) {
|
||||
hideInterface();
|
||||
}
|
||||
//}
|
||||
}
|
||||
});
|
||||
that.find('.OxControls').bind({
|
||||
|
@ -1800,7 +1816,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
.trigger('mouseleave')
|
||||
.unbind('mouseenter')
|
||||
.unbind('mouseleave');
|
||||
Ox.print('???', self.mouseIsInControls);
|
||||
clearTimeout(self.interfaceTimeout);
|
||||
setSizes(function() {
|
||||
self.exitFullscreen = false;
|
||||
that.detach()
|
||||
|
|
Loading…
Reference in a new issue