Pause muted videos when offscreen.
This commit is contained in:
parent
0fa2498d71
commit
a89d2b5b90
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user