Work around Firefox 42 controls bug. #450

This commit is contained in:
ccd0 2015-09-05 23:26:59 -07:00
parent 13119d4ea9
commit 38aa7fed0c

View File

@ -79,6 +79,15 @@ ImageCommon =
# Add controls, but not until the mouse is moved over the video.
addControls: (video) ->
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=1192302
if /Gecko\/20100101\ \w+\/42\./.test navigator.userAgent
video.controls = true
if doc.contains video
{parentNode, nextSibling, paused} = video
$.rm video
parentNode.insertBefore video, nextSibling
video.play() unless paused
return
handler = ->
$.off video, 'mouseover', handler
# Hacky workaround for Firefox forever-loading bug for very short videos