Skip to content

fix(web): do not play memory video if the MemoryVideoViewer element is not visible - #30947

Open
Zlendy wants to merge 1 commit into
immich-app:mainfrom
Zlendy:fix/memory-video-viewer-background-playback
Open

fix(web): do not play memory video if the MemoryVideoViewer element is not visible#30947
Zlendy wants to merge 1 commit into
immich-app:mainfrom
Zlendy:fix/memory-video-viewer-background-playback

Conversation

@Zlendy

@Zlendy Zlendy commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Description

Clicking on a gallery video while having a memory video open can start a double playback in certain situations.
This happens because the code responsible for auto playing/pausing the memory video doesn't check if the element is visible.

To fix it, I used the Element.checkVisibility() method. This Web API is currently "Newly available", however, I couldn't find a FAQ entry or contributing guideline regarding the usage of newly added Web APIs.

I don't think it would be an issue considering that it is supported by 93.39% of browser installations according to caniuse, but wanted to disclose it anyway.

image

How Has This Been Tested?

  1. Open a memory containing a video (memory video starts playing)
  2. Scroll down to the gallery (memory video stops playing)
  3. Click on a video in the gallery (with my patch the memory video doesn't start automatically, without it, it does)

Screenshots (if appropriate)

Checklist:

  • I have carefully read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

This code is 100% hand-made.

@immich-push-o-matic

Copy link
Copy Markdown

Label error. Requires exactly 1 of: changelog:.*. Found: 🖥️web. A maintainer will add the required label.

@Zlendy
Zlendy force-pushed the fix/memory-video-viewer-background-playback branch from 6415174 to 63302b7 Compare August 26, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant