when leaving a video part, set currentTime to 0

This commit is contained in:
rlx 2011-08-23 08:14:22 +00:00
parent e3d9969c93
commit e8347aeabc

View file

@ -222,8 +222,9 @@ Ox.VideoElement = function(options, self) {
css[key] = self.$video.css(key); css[key] = self.$video.css(key);
}); });
if (self.video) { if (self.video) {
self.video.pause();
self.$video.hide(); self.$video.hide();
self.video.pause();
self.video.currentTime = 0;
} }
self.$video = self.items[self.currentItem].$videos[part].css(css).show(); self.$video = self.items[self.currentItem].$videos[part].css(css).show();
self.video = self.$video[0]; self.video = self.$video[0];