From 95dc46bc1ae2f57eaa06238315bbe793e7f9e3c6 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 7 Sep 2014 17:44:26 -0700 Subject: [PATCH] use thumbnail image as poster to suppress black screen flashes --- src/Images/ImageLoader.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Images/ImageLoader.coffee b/src/Images/ImageLoader.coffee index 37a4eaf96..d16d61619 100755 --- a/src/Images/ImageLoader.coffee +++ b/src/Images/ImageLoader.coffee @@ -84,13 +84,16 @@ ImageLoader = video2 = $.el 'video' $.one video2, 'loadeddata', => ImageLoader.replaceVideo clone, video2 video2.src = video.src + if chrome? + # This supresses black screen flashes in Chromium, but causes loading image icon flash in Firefox. + video.poster = thumb.src + video.loop = true video.textContent = thumb.alt video.dataset.md5 = thumb.dataset.md5 video.style.height = style.height video.style.width = style.width video.style.maxHeight = style.maxHeight video.style.maxWidth = style.maxWidth - video.loop = true video.className = thumb.className $.on video, 'mouseover', ImageHover.mouseover if Conf['Image Hover'] $.replace thumb, video