fix video player bugs

This commit is contained in:
rlx 2011-12-23 07:15:40 +00:00
parent e2529916b3
commit f062c6001e
2 changed files with 14 additions and 7 deletions

View file

@ -1293,9 +1293,15 @@ Ox.List = function(options, self) {
}, rest ? { }, rest ? {
rest: rest rest: rest
} : {})); } : {}));
self.preview && that.triggerEvent('openpreview', { if (self.preview) {
ids: ids if (ids.length) {
}); that.triggerEvent('openpreview', {
ids: ids
});
} else {
that.triggerEvent('closepreview');
}
}
} }
}); });
}, 100); }, 100);

View file

@ -1066,7 +1066,9 @@ Ox.VideoPlayer = function(options, self) {
hideControls(); hideControls();
} }
}); });
that.find('.OxControls').bind({ showControls();
hideControls();
that.$element.find('.OxControls').bind({
mouseenter: function() { mouseenter: function() {
self.mouseIsInControls = true; self.mouseIsInControls = true;
}, },
@ -1074,8 +1076,6 @@ Ox.VideoPlayer = function(options, self) {
self.mouseIsInControls = false; self.mouseIsInControls = false;
} }
}); });
showControls();
hideControls();
that.gainFocus(); that.gainFocus();
} }
@ -1311,6 +1311,7 @@ Ox.VideoPlayer = function(options, self) {
'in': self.options['in'], 'in': self.options['in'],
out: self.options.out, out: self.options.out,
paused: self.options.paused, paused: self.options.paused,
position: self.options.position,
results: self.results, results: self.results,
showMilliseconds: self.options.showMilliseconds, showMilliseconds: self.options.showMilliseconds,
subtitles: self.options.subtitles, subtitles: self.options.subtitles,
@ -2129,7 +2130,7 @@ Ox.VideoPlayer = function(options, self) {
enterFullscreen(); enterFullscreen();
}); });
} else { } else {
// flag makes the animation end on absolute position // exitFullscreen flag makes the animation end on absolute position
self.exitFullscreen = true; self.exitFullscreen = true;
that.unbind('mousemove'); that.unbind('mousemove');
that.find('.OxControls') that.find('.OxControls')