avoid shoing first frame if seeking inside VideoElement
This commit is contained in:
parent
74101b1e22
commit
5c0d28a00d
2 changed files with 12 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue