From d3fc02e344c3ddbb54be537313e93e750894e1cf Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 7 Feb 2014 05:08:17 +0000 Subject: [PATCH] avoid flicker on load if no poster is set --- source/Ox.UI/js/Video/VideoElement.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Video/VideoElement.js b/source/Ox.UI/js/Video/VideoElement.js index 2aa41195..8f5dde39 100644 --- a/source/Ox.UI/js/Video/VideoElement.js +++ b/source/Ox.UI/js/Video/VideoElement.js @@ -289,7 +289,10 @@ Ox.VideoElement = function(options, self) { } self.video.volume = volume; self.video.muted = muted; - self.$video.css(css).show(); + 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']) {