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