From a89d2b5b9078553646770c7338c4c25699ed4fdd Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 31 Jan 2015 18:36:37 -0800 Subject: [PATCH] Pause muted videos when offscreen. --- src/Images/ImageExpand.coffee | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Images/ImageExpand.coffee b/src/Images/ImageExpand.coffee index be64c5ff9..09c46857f 100755 --- a/src/Images/ImageExpand.coffee +++ b/src/Images/ImageExpand.coffee @@ -80,9 +80,7 @@ ImageExpand = continue unless file and file.isVideo and file.isExpanded video = file.fullImage - continue if $.hasAudio video - - visible = Header.isNodeVisible video + visible = ($.hasAudio(video) and not video.muted) or Header.isNodeVisible video if visible and file.wasPlaying delete file.wasPlaying video.play()