avoid shoing first frame if seeking inside VideoElement

This commit is contained in:
j 2014-02-08 12:32:45 +00:00
parent 74101b1e22
commit 5c0d28a00d
2 changed files with 12 additions and 4 deletions

View file

@ -290,14 +290,22 @@ Ox.VideoElement = function(options, self) {
self.video.volume = volume;
self.video.muted = muted;
self.$video.css(css);
onLoadedMetadata(self.$video, function() {
self.$video.show();
});
!self.paused && self.video.play();
Ox.Log('Video', 'sCV', self.video.src, item['in']);
if (item['in']) {
setCurrentItemTime(item['in']);
}
if (self.video.seeking || item['in'] != self.video.currentTime) {
self.seeking = true;
self.$video.one('seeked', function() {
self.seeking = false;
self.$video.show();
})
} else {
onLoadedMetadata(self.$video, function() {
self.$video.show();
});
}
loadNextVideo();
}

View file

@ -1795,7 +1795,7 @@ Ox.VideoPlayer = function(options, self) {
}
function hidePoster() {
if (self.posterIsVisible) {
if (self.loadedMetadata && self.posterIsVisible) {
self.$poster.animate({
opacity: 0
}, 250);