From a9ea92a8bc46cabdd9bf180bb5cfaefa1f48a6bd Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sun, 27 Jul 2014 13:33:38 -0700 Subject: [PATCH] make waiting for insertion before playing video apply to all posts --- src/Images/ImageExpand.coffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index 79bd0882c..e930989ec 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -26,8 +26,7 @@ ImageExpand = ImageExpand.expand @ else if @file.isExpanded and @file.isVideo ImageExpand.setupVideoCB @ - if !@origin.file.fullImage?.paused or @origin.file.wasPlaying - $.asap (=> doc.contains @nodes.root), => ImageExpand.play @ + ImageExpand.play @ if !@origin.file.fullImage?.paused or @origin.file.wasPlaying else if ImageExpand.on and !@isHidden and (Conf['Expand spoilers'] or !@file.isSpoiler) and (Conf['Expand videos'] or !@file.isVideo) @@ -207,11 +206,12 @@ 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 - post.file.wasPlaying = true + {fullImage} = post.file + $.asap (=> doc.contains fullImage), => + if !d.hidden and Header.isNodeVisible fullImage + fullImage.play() + else + post.file.wasPlaying = true videoControls: $.el 'span', className: 'video-controls'