fix a bug where the loading icon would not disappear after seeking

This commit is contained in:
rolux 2011-05-17 21:53:46 +02:00
parent bb6af0ad41
commit dec0832de6

View file

@ -754,10 +754,10 @@ Ox.VideoPlayer = function(options, self) {
mouseenter: function() { mouseenter: function() {
$(this) $(this)
.css({ .css({
backgroundImage: '-moz-linear-gradient(top, rgba(64, 64, 64, 0.5), rgba(0, 0, 0, 0.5))' backgroundImage: '-moz-linear-gradient(top, rgba(48, 48, 48, 0.5), rgba(16, 16, 16, 0.5))'
}) })
.css({ .css({
backgroundImage: '-webkit-linear-gradient(top, rgba(64, 64, 64, 0.5), rgba(0, 0, 0, 0.5))' backgroundImage: '-webkit-linear-gradient(top, rgba(48, 48, 48, 0.5), rgba(16, 16, 16, 0.5))'
}) })
}, },
mouseleave: function() { mouseleave: function() {
@ -1493,17 +1493,24 @@ Ox.VideoPlayer = function(options, self) {
} }
function seeked() { function seeked() {
Ox.print('XX seeked')
clearTimeout(self.seekTimeout); clearTimeout(self.seekTimeout);
self.seekTimeout = 0;
Ox.print('XX hide')
hideLoadingIcon(); hideLoadingIcon();
self.$playIcon && self.$playIcon.show(); self.$playIcon && self.$playIcon.show();
} }
function seeking() { function seeking() {
Ox.print('XX seeking')
if (!self.seekTimeout) {
self.seekTimeout = setTimeout(function() { self.seekTimeout = setTimeout(function() {
self.$playIcon && self.$playIcon.hide(); self.$playIcon && self.$playIcon.hide();
Ox.print('XX show')
showLoadingIcon(); showLoadingIcon();
}, 250); }, 250);
} }
}
function setPosition(position, from) { function setPosition(position, from) {
position = Ox.limit(position, self['in'], self['out']); position = Ox.limit(position, self['in'], self['out']);