show controls immediately for nonplaying videos

This commit is contained in:
ccd0 2014-07-27 13:56:30 -07:00
parent 3fc4f87481
commit 1aced79126

View File

@ -206,13 +206,15 @@ ImageExpand =
setupVideo: (post, playing, controls) -> setupVideo: (post, playing, controls) ->
{fullImage} = post.file {fullImage} = post.file
unless playing
fullImage.controls = controls
return
fullImage.controls = false fullImage.controls = false
if playing $.asap (=> doc.contains fullImage), =>
$.asap (=> doc.contains fullImage), => if !d.hidden and Header.isNodeVisible fullImage
if !d.hidden and Header.isNodeVisible fullImage fullImage.play()
fullImage.play() else
else post.file.wasPlaying = true
post.file.wasPlaying = true
if controls if controls
ImageCommon.addControls fullImage ImageCommon.addControls fullImage