diff --git a/src/Images/ImageCommon.coffee b/src/Images/ImageCommon.coffee index c4a4eafc7..ea8bc5bd2 100644 --- a/src/Images/ImageCommon.coffee +++ b/src/Images/ImageCommon.coffee @@ -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 diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index f6a825498..79bd0882c 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -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