From b4b35c1ef398c11cdddebc613cb27602caae187a Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 27 Jul 2014 16:57:52 -0700 Subject: [PATCH] safer version of workaround --- src/Images/ImageCommon.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Images/ImageCommon.coffee b/src/Images/ImageCommon.coffee index ea8bc5bd2..231b82e4a 100644 --- a/src/Images/ImageCommon.coffee +++ b/src/Images/ImageCommon.coffee @@ -49,6 +49,7 @@ ImageCommon = handler = -> $.off video, 'mouseover', handler # Hacky workaround for Firefox forever-loading bug for very short videos - $.asap (-> (video.readyState >= 3 and video.currentTime <= Math.max 0.1, (video.duration - 0.5)) or !d.contains video), -> + t = new Date().getTime() + $.asap (-> chrome? or (video.readyState >= 3 and video.currentTime <= Math.max 0.1, (video.duration - 0.5)) or new Date().getTime() >= t + 1000), -> video.controls = true $.on video, 'mouseover', handler