mirror of
https://github.com/immich-app/immich
synced 2026-08-29 13:15:45 +00:00
fix(web): do not play memory video if the MemoryVideoViewer element is not visible (#30947)
This commit is contained in:
parent
b22483de33
commit
6eb1c93882
1 changed files with 2 additions and 1 deletions
|
|
@ -172,7 +172,8 @@
|
|||
galleryInView = false;
|
||||
// only call play after the first page load. When page first loads the gallery will not be visible
|
||||
// and calling play here will result in duplicate invocation.
|
||||
if (!galleryFirstLoad) {
|
||||
// also check if the element is visible to avoid playback in the background
|
||||
if (!galleryFirstLoad && videoPlayer?.checkVisibility()) {
|
||||
handlePromiseError(handleAction('galleryOutOfView', 'play'));
|
||||
}
|
||||
galleryFirstLoad = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue