Pause muted videos when offscreen.

This commit is contained in:
ccd0 2015-01-31 18:36:37 -08:00
parent 0fa2498d71
commit a89d2b5b90

View File

@ -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()