fix playing in clones

This commit is contained in:
ccd0 2014-07-27 13:26:29 -07:00
parent 86d37f6aef
commit 2360185eb4
2 changed files with 4 additions and 1 deletions

View File

@ -44,6 +44,7 @@ ImageCommon =
return cb URL
cb null # report nothing to retry
# Add controls, but not until the mouse is moved over the video.
addControls: (video) ->
handler = ->
$.off video, 'mouseover', handler

View File

@ -26,7 +26,8 @@ ImageExpand =
ImageExpand.expand @
else if @file.isExpanded and @file.isVideo
ImageExpand.setupVideoCB @
ImageExpand.play @ if !@origin.file.fullImage?.paused or @origin.file.wasPlaying
if !@origin.file.fullImage?.paused or @origin.file.wasPlaying
$.asap (=> doc.contains @nodes.root), => ImageExpand.play @
else if ImageExpand.on and !@isHidden and
(Conf['Expand spoilers'] or !@file.isSpoiler) and
(Conf['Expand videos'] or !@file.isVideo)
@ -206,6 +207,7 @@ ImageExpand =
ImageCommon.addControls file.fullImage if Conf['Show Controls']
play: (post) ->
c.log 'play', !d.hidden and Header.isNodeVisible post.file.fullImage
if !d.hidden and Header.isNodeVisible post.file.fullImage
post.file.fullImage.play()
else